I’ve recently built a linux platform interface for Cocotron, and was able to build the Foundation framework with no errors.
However, when linking my objective-C project, I get a linker error:
/Developer/Cocotron/1.0/Linux/i386/Frameworks/Foundation.framework//libFoundation.so: undefined reference to `__gnu_objc_personality_v0′
I’ve done a bit of googling, but haven’t found anything all that helpful.
Here’s my ld command line (simplified a bit for readability):
Ld /Users/me/MyProject/build/Linux/Release/ENCLAnalyzer normal i386 cd /Users/me/MyProject /Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/bin/i386-ubuntu-linux-gcc -arch i386 -L/Users/me/MyProject/build/Linux/Release -L../../frameworks/Shared/FFmpeg/Linux/lib -L/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/lib -L/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/intel/mkl/9.0/lib/32 -L/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/intel/ipp/5.1/ia32/sharedlib -L/Users/me/frameworks/Shared/FFmpeg/Linux/lib -F/Users/me/MyProject/build/Linux/Release -F/Users/me/frameworks/Shared -F/Developer/Cocotron/1.0/Linux/i386/Frameworks -F/Users/me/frameworks/OtherProject/Linux -filelist '/Users/me/MyProject/build/Linux/MyProject.build/Release/MyProject Linux.build/Objects-normal/i386/MyProject.LinkFileList' -Wl,-rpath-link,/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/lib -Wl,-rpath-link,../../frameworks/Shared/FFmpeg/Linux/lib -Wl,-rpath-link,/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/intel/ipp/5.1/ia32/sharedlib -Wl,-rpath-link,/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/intel/mkl/9.0/lib/32 -Wl,-rpath-link,/Developer/Cocotron/1.0/Linux/i386/Frameworks/Foundation.framework -framework Foundation -framework MyFramework1 -framework MyFramework2 -framework MyFramework3 -o /Users/me/MyProject/build/Linux/Release/MyProject
I have a feeling that the foundation project needs to link to a library that it isn’t, or that maybe it is linking to the wrong version of some library. But I’m not sure.
Any help would be much appreciated.
Update: There were some compiler updates in the Cocotron repository which fix this issue. The the install script has been updated to pick these up and the new version is here:
http://cocotron.org/Tools/Downloads/InstallCDT-2009-04-17.zip
Before using this, be sure to delete /Developer/Cocotron/1.0/Downloads/gcc-4.3.1.tar.bz2 or it won’t pick up the new source. Make sure to specify Linux i386 when reinstalling.
i.e.
sudo ./install.sh Linux i386Thanks to Christopher Lloyd for the info above, and for emailing me the fix.