building problems using Xcode on MacOSX

Re: building problems using Xcode on MacOSX

Postby Auria » 16 Feb 2011, 15:14

You could try GuardMalloc, which has built-in support in Xcode.
Valgrind also works on OSX, but since the original poster doesn't appear very experienced I don't think it's really feasible
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: building problems using Xcode on MacOSX

Postby mclarge » 17 Feb 2011, 16:08

Busy all day yesterday so I'm just now getting a chance to get back to this issue. Valgrind output attached. It's quite long so I figured it would be easier as an attachment rather than trying to read it all in this window. The interesting stuff starts pretty early (around the 6th clump of text) at "==3544== Invalid read of size 4." The info in here also seems to point to some of the stuff we've seen in previous stack traces.

If you have a chance to look at it that'd be great!

N
Attachments
valgring_supertuxkart.txt
(3.67 MiB) Downloaded 585 times
mclarge
 
Posts: 14
Joined: 09 Feb 2011, 02:16
Location: Chicago, IL

Re: building problems using Xcode on MacOSX

Postby Auria » 17 Feb 2011, 19:42

Unfortunately, this valgrind trace does not hint at any memory corruption occurring before the actual crash :( I'm stumped
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: building problems using Xcode on MacOSX

Postby mclarge » 17 Feb 2011, 20:00

are those runtime errors in libstdc++.6.0.9.dylib an issue? Once that error pops up things seem to fall apart. Is it possible this library is corrupt? (Since this is such a central library, I'd assume if it was corrupt I'd be having problems with more software but I don't really know...) or is this just likely a symptom of some bug I haven't yet uncovered?
mclarge
 
Posts: 14
Joined: 09 Feb 2011, 02:16
Location: Chicago, IL

Re: building problems using Xcode on MacOSX

Postby Auria » 19 Feb 2011, 00:30

I'm afraid I have no idea. A corrupt libstdc++ is not very likely, however
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: building problems using Xcode on MacOSX

Postby mclarge » 24 Feb 2011, 18:16

FINALLY got the thing working. Wanted to tell you what I did so that if it's a bug, it can be fixed, and if not, you'll know how to help others.

Basically the program kept getting hung up when trying to load absent xml files. In particular I copied:
smoke-brown.xml
smoke-yellow.xml
smoke-red.xml
smoke.xml
from data/gfx to tracks/jungle

and a bunch of materials.xml files were missing from many of the karts. So I took the materials.xml from karts/beagle (the "last" one that seemed to be there) and copied it into all the other karts that were missing this file (basically elephpant and beyond). I suspect some of these materials.xml files should have been different than the one I took from beagle, but it worked so what can you do...

Any good reason why these files were missing? I got the source code using svn (and have in fact been updating frequently)...
mclarge
 
Posts: 14
Joined: 09 Feb 2011, 02:16
Location: Chicago, IL

Re: building problems using Xcode on MacOSX

Postby Auria » 24 Feb 2011, 19:55

Well this is just a work-around; basically, when it's time to load files, STK first checks in the local folder (track or kart folder) and if the file is not found there (which is totally normal), it falls back to the global directories. The problem you are meeting is that your exception support seems to be broken; when STK fails to find a file it throws an exception, but in these normal cases the exception is then usually catched and handled. The problem on your build is that the exception causes a crash in the runtime library, for a reason totally unknown to me.

So indeed making sure that files are always found in local folders where they are first looked for will work around the issue but is not supposed to be needed
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: building problems using Xcode on MacOSX

Postby acme_pjz » 25 Feb 2011, 10:04

The problem you are meeting is that your exception support seems to be broken; when STK fails to find a file it throws an exception, but in these normal cases the exception is then usually catched and handled. The problem on your build is that the exception causes a crash in the runtime library, for a reason totally unknown to me.



mclarge: Maybe you disabled C++ exception handling when compile STK? In Visual Studio in Windows, C++ exception handling can be diasbled ...
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: building problems using Xcode on MacOSX

Postby hiker » 26 Feb 2011, 05:54

Hi,
acme_pjz {l Wrote}:mclarge: Maybe you disabled C++ exception handling when compile STK? In Visual Studio in Windows, C++ exception handling can be diasbled ...

unlikely, since I've asked mclarge to do a simple exception handling test just at the start of main, and just before the crash happens, and that worked fine. Also I am 'reasonable' sure that other exceptions are being used in stk - before and after, and they don't appear to cause a problem. valgrind doesn't show a problem (some issues in the graphics drivers, but that's more or less normal).

I admit that I have no good idea. One thing I am not sure about is that mclarge's system has two graphics card - one internal and an ATM (iirc) which is used on demand. Can anyone with a similar issue confirm that it works for them?

It might be a mix up of some system libraries perhaps (afaik libgcc can be around as static or shared library, which can cause problems when catching exceptions from one lib in another - then again in this case it's actually all within STK, so it shouldn't matter).

The only hope I see is either to find a patient support person on a Mac forum, or to first significantly reduce the test case (STK): easy things to test: remove karts and tracks (but of course let one in that raises the exception); remove music, sfx, 3d models, ... - then it gets hard: remove irrlicht, and use irrxml to do the xml reading, and see if you can still reproduce the problem (if not, go to the irrlicht forum ;) ). Then remove opengl (if the problem goes away, ask apple/update graphics drivers, ...). If this works, try to remove irrxml, ... etc.

Now my impression is that mclarge does not have the skills to do that (since it requires a lof of stk and irrlicht knowledge), and I certainly can't do it either (way too much work, even if I had a test case). So I am running out of ideas ... except for finding a patient Mac insider :(

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Re: building problems using Xcode on MacOSX

Postby mclarge » 26 Feb 2011, 09:14

No worries. Thanks for the patience you've had :D ! Before I figured out a fix I found that if I commented out the track, kart, and challenge (strangely) from loading in the main.ccp, STK loads up fine (eventually to crash when when going to the kart selections screen). That at least accounts for some of your plans, but not for irrlicht and beyond.

for the record, you guys have been super helpful. thanks for taking the time!
mclarge
 
Posts: 14
Joined: 09 Feb 2011, 02:16
Location: Chicago, IL

Re: building problems using Xcode on MacOSX

Postby donn » 03 Jun 2011, 17:50

Hi,
I'm trying to compile STK 0.7.1b in MacOSX 10.6.7 with Xcode 3.2.3. I'm having several problems so I decided to post here to get help and help others who might have the same errors in the future.

I think I got all libraries installed properly, Irrlicht 1.8 from svn which I copied to /usr/local/lib and also the headers to include/irrlicht, had both libOgg and libVorbis ./configure'd && make && sudo make install'd.

When I first tried to build STK from the Xcode solution included I had about 50k+ errors. Mostly include and some other errors.
So I decided to check the Project properties and added /usr/local/lib (recursive) to the Library path and also to add the project directory to the Headers path (recursive).

Now I'm having about 16k errors, I have a bunch of these type: "error: '::clock_t' has not been declared".
The first error I get tho is "The file “SuperTuxKart-Info.plist” couldn’t be opened because there is no such file.", which I tried to fix by unchecking Preprocess info.plist file on the Project properties but didn't work, I tried to delete it from the project too but I'm having the same error.

I'd appreciate any help, and also I'll keep you updated about how's it going.
Thanks!
donn
 
Posts: 6
Joined: 03 Jun 2011, 16:46

Re: building problems using Xcode on MacOSX

Postby Auria » 04 Jun 2011, 01:17

Hi,

please check our build instructions on the wiki; you had no need to build the dependencies, we provide binaries of all dependencies, under package format.

If you do not wish to use frameworks and prefer to install the dependencies unix-style, then you will need to build STK from terminal using autotools; the Xcode project correctly does not support unix-style dependencies
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: building problems using Xcode on MacOSX

Postby donn » 04 Jun 2011, 11:58

Thank you for your reply.
I'm sorry I didn't inform you before that I tried to follow the tutorial (http://supertuxkart.sourceforge.net/Bui ... ing_on_OSX) but had no success in compiling it.
One thing I noticed is that the guide should be for STK 0.7 since it uses Irrlicht 1.7, I believe the last source in SF is 0.7b uses the Irrlicht 1.8.
Anyway, I tried to compile both versions following the wiki. I have to install only the last dependency package (DepsFrameworks9.zip), right?
Honestly I fail to see what I'm doing wrong :(

Thanks
I might upload some screenshots to make more clear. I tracked clock_t error back to <time.h> from the std include, that's very strange.
donn
 
Posts: 6
Joined: 03 Jun 2011, 16:46

Re: building problems using Xcode on MacOSX

Postby Auria » 04 Jun 2011, 17:05

Hi,

please post the errors you get when following our instructions.
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: building problems using Xcode on MacOSX

Postby donn » 05 Jun 2011, 03:00

Thank you for your reply Auria, here's what I've done:

1) Downloaded supertuxkart-0.7.1b-src.tar.bz2 (screenshot 1)
Uncompressed it and copied to my Documents/Projects folder (screenshot 4)

2) Created the symbolic link (that already existed) (screenshot 2)

3) Downloaded DepsFrameworks9.zip (screenshot 3)

4) Copied the content of DepsFrameworks9.zip to /Library/Frameworks
I had an error when copying OpenAL. It doesn't allow me to replace the content of the one I already have. (screenshot 5)

5) Double click libint (was in /Library/Frameworks) (screenshot 6)
Installed on Macintosh dir, not in my personal folder.

6) Double click the project on src/ide and after clicking build & run I get a bunch of errors (screenshot 7)
I tried to change the destination build architecture to 10.6 (the default is 10.4), still get a lot of errors (screenshot 8), as I told before many of them seem include errors.

All screenshots can be downloaded in http://www.4shared.com/file/Qz-rCXWn/screenshots.html (aprox. 2MB).

Just to point it, I already builded Irrlicht 1.7 and 1.8 without a single warning so I really don't see what I am doing wrong, but hope it's something silly!
Thank you all!
donn
 
Posts: 6
Joined: 03 Jun 2011, 16:46

Re: building problems using Xcode on MacOSX

Postby Auria » 05 Jun 2011, 19:32

Hi,

the error messages you get are VERY weird

Can you check if you have file Src/audio/music_information.hpp? Also Try clicking on the "little lines" icons on the right of build steps and post here the full GCC command please
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: building problems using Xcode on MacOSX

Postby donn » 05 Jun 2011, 22:57

Hi,
I do have music_information.hpp in src/audio.
I expanded the error msgs as your request:
{l Code}: {l Select All Code}
CompileC build/STK_XCode.build/Debug/SuperTuxKart.build/Objects-normal/i386/music_information.o ../../audio/music_information.cpp normal i386 c++ com.apple.compilers.gcc.4_0
cd /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wnon-virtual-dtor -Wparentheses -Wunused-variable -Wnewline-eof -isysroot /Developer/SDKs/MacOSX10.6.sdk -mfix-and-continue -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/SuperTuxKart-generated-files.hmap -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/SuperTuxKart-own-target-headers.hmap -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/SuperTuxKart-all-target-headers.hmap -iquote /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/SuperTuxKart-project-headers.hmap -F/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/Debug -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/Debug/include -I/usr/local/include -I/usr/local/include/fuse -I/usr/local/include/GL -I/usr/local/include/irrlicht -I/usr/local/include/ogg -I/usr/local/include/vorbis -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/../supertuxkart2/src -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/../supertuxkart2/src/bullet/src -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/DerivedSources/i386 -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/DerivedSources -DDEBUG=1 -c /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/../../audio/music_information.cpp -o /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/Objects-normal/i386/music_information.o

Like I said before that seemed an include problem, since appears gcc isn't getting the *.hpp files with the definitions. I tried to modify the project adding supertuxkart directory in "Header Search Paths" on the project properties. I got a different set of errors, only 8 thousand and none of them seem include missing (the 1st and 2nd are the same, the rest are all different)..look (gcc command is much bigger):
{l Code}: {l Select All Code}
CompileC build/STK_XCode.build/Debug/SuperTuxKart.build/Objects-normal/i386/music_information.o ../../audio/music_information.cpp normal i386 c++ com.apple.compilers.gcc.4_0
cd /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wnon-virtual-dtor -Wparentheses -Wunused-variable -Wnewline-eof -isysroot /Developer/SDKs/MacOSX10.6.sdk -mfix-and-continue -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/SuperTuxKart-generated-files.hmap -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/SuperTuxKart-own-target-headers.hmap -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/SuperTuxKart-all-target-headers.hmap -iquote /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/SuperTuxKart-project-headers.hmap -F/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/Debug -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/Debug/include -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/doc -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/challenges -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/fonts -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/gfx -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/grandprix -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/gui -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/models -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/music -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/po -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/sfx -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/textures -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/addons -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/animations -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/audio -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/challenges -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/config -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/enet -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/graphics -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/guiengine -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/input -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/io -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/items -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/karts -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/modes -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/network -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/physics -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/race -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/replay -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/states_screens -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/tinygettext -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/tracks -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/tutorial -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/utils -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/gui/skins -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/adiumy -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/beagle -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/elephpant -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/emule -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/gnu -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/gooey -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/hexley -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/konqi -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/mozilla -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/nolok -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/pidgin -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/puffy -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/tux -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/karts/wilber -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/canyon -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/cave -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/city -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/crescentcrossing -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/farm -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/fortmagma -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/hacienda -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/islandtrack -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/jungle -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/lighthouse -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/mines -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/olivermath -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/sandtrack -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/scotland -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/secretgarden -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/skyline -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/snowmountain -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/snowtuxpeak -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/stadium -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/startrack -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/tuxtollway -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/tracks/xr591 -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/enet/include -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/guiengine/widgets -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/vc9 -I. -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/karts/controller -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/states_screens/dialogs -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/utils/utf8 -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/gui/skins/glass -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/gui/skins/ocean -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/data/gui/skins/peach -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletCollision -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletDynamics -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/LinearMath -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/enet/include/enet -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletCollision/BroadphaseCollision -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletCollision/CollisionDispatch -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletCollision/CollisionShapes -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletCollision/Gimpact -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletCollision/NarrowPhaseCollision -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletDynamics/Character -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletDynamics/ConstraintSolver -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletDynamics/Dynamics -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/bullet/src/BulletDynamics/Vehicle -I/usr/local/include -I/usr/local/include/fuse -I/usr/local/include/GL -I/usr/local/include/irrlicht -I/usr/local/include/ogg -I/usr/local/include/vorbis -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/../supertuxkart2/src -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/../supertuxkart2/src/bullet/src -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/DerivedSources/i386 -I/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/DerivedSources -DDEBUG=1 -c /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/../../audio/music_information.cpp -o /Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/build/STK_XCode.build/Debug/SuperTuxKart.build/Objects-normal/i386/music_information.o


The errors I get are like (same file music_information.hpp, this time it was found):
{l Code}: {l Select All Code}
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.0.0/ctime:66: error: '::clock_t' has not been declared
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.0.0/ctime:68: error: '::tm' has not been declared
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.0.0/ctime:70: error: '::clock' has not been declared
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.0.0/ctime:71: error: '::difftime' has not been declared
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.0.0/ctime:72: error: '::mktime' has not been declared
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.0.0/ctime:73: error: '::time' has not been declared
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.0.0/ctime:74: error: '::asctime' has not been declared
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.0.0/ctime:75: error: '::ctime' has not been declared
...

I see Xcode is using gcc 4 but I also have gcc 4.2.
What OS are you using to develop STK?

I appreciate all your support!
donn
 
Posts: 6
Joined: 03 Jun 2011, 16:46

Re: building problems using Xcode on MacOSX

Postby donn » 06 Jun 2011, 21:57

Regarding this last set of errors (ctime: error: '::clock_t' has not been declared) I found this http://www.wanderinghill.com/wp/?p=21 and this http://ubuntuforums.org/showthread.php?t=342143 (this one is about Ubuntu but I think the same applies to Mac OS X)
Apparently there's a file named time.h in the project which is conflicting with time.h from the std library.
Have you ever heard about other people complaining about this same error?
I'll keep trying to compile this.

Cheers

Just a quick update...
I managed to almost compile STK. I found that there's a file that's not listed on the Xcode project called time.h (src/enet/include/enet). Had it renamed to timeee.h and replaced its include on protocol.c. Had another error complaining about socklen_t redefinition. Fixed.

NOW I HAVE ONLY 3 (ACTUALLY 2) ERRORS!!! \o/ Almost there I think!
Ok, please help me, the first error is:
{l Code}: {l Select All Code}
error: could not read data from '/Users/mateus/Documents/Projects/supertuxkart-0.7.1b/src/ide/Xcode/SuperTuxKart-Info.plist': The file “SuperTuxKart-Info.plist” couldn’t be opened because there is no such file.


The second is:
{l Code}: {l Select All Code}
pbxcp: stk.icns: No such file or directory


Do you have either file or have any clue why it's complaining about them??

Link to the last screenshot http://www.4shared.com/photo/meeVXJeZ/screenshot.html


Cheers!
donn
 
Posts: 6
Joined: 03 Jun 2011, 16:46

Re: building problems using Xcode on MacOSX

Postby Auria » 07 Jun 2011, 01:50

Hi,

you got the time issue because you added way too many include search paths :) you made it search recursively all directories, but only the root one was needed

about why they were not found, this is very weird; in target options, can you check the target is based on "Config.xcconfig"? (lower right corner, see example at http://blog.massanti.com/wp-content/upl ... .49-AM.png )

perhaps you should first update to Xcode 3.2.6, maybe there have been bugs fixed since 3.2.3
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: building problems using Xcode on MacOSX

Postby donn » 07 Jun 2011, 19:42

Hi Auria,
I had Xcode updated to 3.2.6 shortly after my first post in this thread.
As you pointed before, the problem was indeed on the Target properties (which are different from the Project properties).
I'm kind of new in Xcode dev, however I've developed thing on Windows using Visual Studio and on Linux with Eclipse.
After fixing some issues I finally made the compilation stage, however I had a few link errors (lib Curl and OpenAL I guess, something about target architecture, ppc, i386 and stuff).
Later on I solved those problems and finally made it run! Well, hold on your breath, I had more or less the same error as OP, and that's where I'm stuck.
Blank (actually black) screen when I run, the system is still responsive but I got no messages from STK.
Thank you very much for the support, but I think I might give it a shot to build on other OS.

Cheers!
donn
 
Posts: 6
Joined: 03 Jun 2011, 16:46

Re: building problems using Xcode on MacOSX

Postby Auria » 08 Jun 2011, 00:03

Hmmm, maybe you can get a backtrace from the debugger? This is a somewhat surprising issue, most OSX users can just take the Xcode file, hit build and everything works
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Who is online

Users browsing this forum: Bing [Bot] and 1 guest