r5872 fails to build on Mac 10.6.4 [fixed]

r5872 fails to build on Mac 10.6.4 [fixed]

Postby RyanLeiTaiwan » 03 Sep 2010, 05:30

Hi, I checked out the SVN today, upgraded STK's dependencies, then I encountered these linking errors from Xcode:

{l Code}: {l Select All Code}
Ld build/Release/SuperTuxKart.app/Contents/MacOS/SuperTuxKart normal i386
cd /Users/ryanlei/code/supertuxkart/src/ide/Xcode
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/ryanlei/code/supertuxkart/src/ide/Xcode/build/Release -L/opt/local/lib -L/Developer/SDKs/MacOSX10.6.sdk/usr/local/lib -L/Developer/SDKs/MacOSX10.6.sdk/usr/lib -F/Users/ryanlei/code/supertuxkart/src/ide/Xcode/build/Release -filelist /Users/ryanlei/code/supertuxkart/src/ide/Xcode/build/STK_XCode.build/Release/SuperTuxKart.build/Objects-normal/i386/SuperTuxKart.LinkFileList -mmacosx-version-min=10.6 -lirrlicht -lintl -framework AGL -framework IOKit -framework QuickTime -framework Carbon -framework AudioUnit -framework GLUT -framework Cocoa -framework OpenGL -framework Ogg -framework OpenAL -framework Vorbis -framework fribidi -o /Users/ryanlei/code/supertuxkart/src/ide/Xcode/build/Release/SuperTuxKart.app/Contents/MacOS/SuperTuxKart

Undefined symbols:
  "WorldWithRank::getRaceResultOrder(std::vector<int, std::allocator<int> >*)", referenced from:
      vtable for LinearWorldin linear_world.o
      vtable for StandardRacein standard_race.o
      vtable for ThreeStrikesBattlein three_strikes_battle.o
      vtable for ProfileWorldin profile_world.o
  "WorldWithRank::init()", referenced from:
      LinearWorld::init()      in linear_world.o
      ThreeStrikesBattle::init()      in three_strikes_battle.o
  "WorldWithRank::setKartPosition(unsigned int, unsigned int)", referenced from:
      FollowTheLeaderRace::countdownReachedZero()       in follow_the_leader.o
      FollowTheLeaderRace::getRaceResultOrder(std::vector<int, std::allocator<int> >*)in follow_the_leader.o
      LinearWorld::updateRacePosition()       in linear_world.o
      ThreeStrikesBattle::updateKartRanks()       in three_strikes_battle.o
  "vtable for WorldWithRank", referenced from:
      __ZTV13WorldWithRank$non_lazy_ptr in linear_world.o
      __ZTV13WorldWithRank$non_lazy_ptr in three_strikes_battle.o
     (maybe you meant: __ZTV13WorldWithRank$non_lazy_ptr)
  "typeinfo for WorldWithRank", referenced from:
      typeinfo for LinearWorldin linear_world.o
      typeinfo for ThreeStrikesBattlein three_strikes_battle.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


Basically they're "symbols not found" errors regarding the class "WorldWithRank".
Anyone know how to fix these?

My dependencies:
1. pre-built dependencies - for latest STK trunk/more recent alphas/betas - downloaded from the project website.
2. irrLicht 1.7.1
3. gettext from MacPorts (gettext @0.18.1.1_2+universal)

And my Config.xconfig settings:
{l Code}: {l Select All Code}
// Xcode build configuration

HEADER_SEARCH_PATHS = /opt/local/include /usr/local/include /usr/include /usr/local/include/irrlicht/ $(PROJECT_DIR)/../../ $(PROJECT_DIR)/../../bullet/src $(PROJECT_DIR)/../../enet/include /Library/Frameworks/fribidi.framework/Headers

OTHER_CFLAGS = -Wall -DHAVE_OGGVORBIS=1  -DHAS_SOCKLEN_T -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAS_POLL=1 -DHAS_FCNTL=1 -DHAS_INET_PTON=1 -DHAS_INET_NTOP=1 -DHAS_MSGHDR_FLAGS=1 -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_GLUT=1 -DHAVE_IRRLICHT=1 -DPACKAGE="\"supertuxkart\"" -D__MACOSX__=1 -DHAVE_RTT=1 -DENABLE_BIDI=1 -fvisibility=hidden

OTHER_LDFLAGS = -lirrlicht -lintl
LIBRARY_SEARCH_PATHS = /opt/local/lib /usr/local/lib /usr/lib
Last edited by RyanLeiTaiwan on 03 Sep 2010, 20:41, edited 1 time in total.
Ryan Lei - Taiwan
I'm a computer science MS from CMLab (Communication and Multimedia), National Taiwan University.
User avatar
RyanLeiTaiwan
 
Posts: 16
Joined: 02 Feb 2010, 19:05
Location: Taiwan

Re: r5872 fails to build on Mac 10.6.4

Postby hiker » 03 Sep 2010, 05:34

Hi,

thanks, that's a known issue, Auria haven't had time to update the xcode project file since my commit yesterday.

You can probably quickly fix this yourself - just add the two files .../src/modes/world_with_rank.?pp to the xcode project file, and it should work.

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

Re: r5872 fails to build on Mac 10.6.4

Postby RyanLeiTaiwan » 03 Sep 2010, 06:01

Thanks for the QUICK reply. I added these two existing files, but there's still 1 error:
{l Code}: {l Select All Code}
GenerateDSYMFile build/Release/SuperTuxKart.app.dSYM build/Release/SuperTuxKart.app/Contents/MacOS/SuperTuxKart
cd /Users/ryanlei/code/supertuxkart/src/ide/Xcode
/Developer/usr/bin/dsymutil /Users/ryanlei/code/supertuxkart/src/ide/Xcode/build/Release/SuperTuxKart.app/Contents/MacOS/SuperTuxKart -o /Users/ryanlei/code/supertuxkart/src/ide/Xcode/build/Release/SuperTuxKart.app.dSYM

error: Invalid DWARF in /Users/ryanlei/code/supertuxkart/src/ide/Xcode/build/STK_XCode.build/Release/SuperTuxKart.build/Objects-normal/i386/music_information.o: DIE 0x00000eb9 has multiple  AT_byte_size attributes.
Ryan Lei - Taiwan
I'm a computer science MS from CMLab (Communication and Multimedia), National Taiwan University.
User avatar
RyanLeiTaiwan
 
Posts: 16
Joined: 02 Feb 2010, 19:05
Location: Taiwan

Re: r5872 fails to build on Mac 10.6.4

Postby Auria » 03 Sep 2010, 13:47

Hi,

I updated the Xcode project in SVN. I don't get the error about AT_byte_size however, please try a clean build
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

It ends up to be a bug with Xcode 3.2.3 ... OTL

Postby RyanLeiTaiwan » 03 Sep 2010, 20:40

Auria {l Wrote}:Hi,

I updated the Xcode project in SVN. I don't get the error about AT_byte_size however, please try a clean build


I still had this "has multiple AT_byte_size attributes" problem after updating with SVN. After googling quite some time, I found out it's a bug with Xcode 3.2.3 and has been discussed several times.

It basically points to the debug symbol linker (dsymutil) of GCC shipped with Xcode. And in Xcode 3.2.3, it comes with a buggy version of dsymutil. Let me list some references:

[1] points out the problem with GCC shipped with Xcode 3.2.3.
[2] suggests extracting the old dsymutil in Xcode 3.2.1 to replace the current one.
[3] even provides the old dsymutil I need!

Conclusion:
If you use Xcode 3.2.3 and encounter "has multiple AT_byte_size attributes", first try to use gcc 4.2 if no backward compatibility problems. If that fails again, follow [3] and replace the dsymutil with an earlier version.

It finally works for me. Thanks, anyway! :)
Ryan Lei - Taiwan
I'm a computer science MS from CMLab (Communication and Multimedia), National Taiwan University.
User avatar
RyanLeiTaiwan
 
Posts: 16
Joined: 02 Feb 2010, 19:05
Location: Taiwan

Who is online

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