swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] Link break troubles with a swarm-objc-based application


From: Thomas Louail
Subject: [Swarm-Support] Link break troubles with a swarm-objc-based application on macosX
Date: Tue, 19 Feb 2008 23:16:25 +0100

Hello swarm-users,

I'm trying to compile and run on my mac an objc-swarm app that i co- developp, and which compiles and runs perfectly on a linux (debian) machine, with gcc 3-3 and swarm 2-1 installed on it. Tiger is running on my mac and i have gcc 4.0.1 installed. I installed the binairies provided on swarm.org (thanks Bill Northcott !), and payed attention to first install all the needed stuff (tcl/tk, hdf, x11 and so on). The installation seems allright, since i can compile and run under X11 the swarmapps provided on the website (conway, mousetrap, etc.)

So, i though i could compile and run my objc-swarm code withtout encountering particular difficulties, but at the link step I got some errors.

I've written a Makefile with respect to the swarm "convention", just declaring all the object files names in a OBJECTS variable, and Iv'e added a gcc tag (-fnested-functions) to the OBJCFLAGS variable cause gcc 4.0 doesn't allow nested functions by default. Anyway, when i launch make, the compilation part runs without error (all the .o files are generated), trouble happens during the link phase. Here is the command line which is executed by make for the linking step (with the verbose option) :

/bin/sh /usr/local/swarm2.2/bin/libtool-swarm --mode=link gcc - B ../../tools -g -O2 -Wno-long-double -L/usr/local/swarm2.2/lib - rpath /usr/local/swarm2.2/lib -dynamic -v -o Simpop2AFS main.o AFSModelSwarm2.o AFSGrille2.o AFSFrontPionnier.o AFSInnovation2.o AFSGouvernance2.o AFSCapitale.o ProbabilityIndexDistribution.o AFSChefLieu.o AFSCentrale4.o AFSCentrale3.o AFSCentrale2.o SP2Ressource.o SP2Service.o SP2Carte.o SP2Grille.o SP2Innovation.o SP2Gouvernance.o dbfopen.o AFSCentrale1.o AFSCycleI.o AFSCycleII.o AFSCycleIII.o AFSCycleIV.o AFSInter.o SP2Object.o SP2Pays.o SP2Bloc.o SP2ModelSwarm.o SP2Control.o SP2Event.o SP2Ville.o SP2Demande.o SP2Fonction.o SP2LienEchange.o SP2PlaceEchange.o SP2Liaison.o sp2base.o Integer.o Double.o Point.o HashSet.o HashMap.o SP2Historique.o SP2Equation.o table_voronoi.o -lswarm - lhdf5 gcc -B ../../tools -g -O2 -Wno-long-double -dynamic -v -o Simpop2AFS main.o AFSModelSwarm2.o AFSGrille2.o AFSFrontPionnier.o AFSInnovation2.o AFSGouvernance2.o AFSCapitale.o ProbabilityIndexDistribution.o AFSChefLieu.o AFSCentrale4.o AFSCentrale3.o AFSCentrale2.o SP2Ressource.o SP2Service.o SP2Carte.o SP2Grille.o SP2Innovation.o SP2Gouvernance.o dbfopen.o AFSCentrale1.o AFSCycleI.o AFSCycleII.o AFSCycleIII.o AFSCycleIV.o AFSInter.o SP2Object.o SP2Pays.o SP2Bloc.o SP2ModelSwarm.o SP2Control.o SP2Event.o SP2Ville.o SP2Demande.o SP2Fonction.o SP2LienEchange.o SP2PlaceEchange.o SP2Liaison.o sp2base.o Integer.o Double.o Point.o HashSet.o HashMap.o SP2Historique.o SP2Equation.o table_voronoi.o -L/usr/local/swarm2.2/lib /usr/local/swarm2.2/lib/ libswarm.dylib -L/usr/local/hdf5_1.6.1/lib -L/usr/local/png_1.2.5/ lib -L/usr/local/tcl8.4.7/lib -L/usr/X11R6/lib -lBLT24 -ltk8.4 - ltcl8.4 -lXpm -lpng -lX11 -ldl /usr/local/hdf5_1.6.1/lib/ libhdf5.dylib -lpthread -lz -lm
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5341.obj~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^ [cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 -- with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --host=powerpc- apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5341)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/collect2 -dynamic - arch ppc -dynamic -macosx_version_min 10.4 - weak_reference_mismatches non-weak -o Simpop2AFS -lcrt1.o -L/usr/ local/swarm2.2/lib -L/usr/local/hdf5_1.6.1/lib -L/usr/local/ png_1.2.5/lib -L/usr/local/tcl8.4.7/lib -L/usr/X11R6/lib -L/usr/lib/ gcc/powerpc-apple-darwin8/4.0.1 -L/usr/lib/gcc/powerpc-apple- darwin8/4.0.1 -L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../.. main.o AFSModelSwarm2.o AFSGrille2.o AFSFrontPionnier.o AFSInnovation2.o AFSGouvernance2.o AFSCapitale.o ProbabilityIndexDistribution.o AFSChefLieu.o AFSCentrale4.o AFSCentrale3.o AFSCentrale2.o SP2Ressource.o SP2Service.o SP2Carte.o SP2Grille.o SP2Innovation.o SP2Gouvernance.o dbfopen.o AFSCentrale1.o AFSCycleI.o AFSCycleII.o AFSCycleIII.o AFSCycleIV.o AFSInter.o SP2Object.o SP2Pays.o SP2Bloc.o SP2ModelSwarm.o SP2Control.o SP2Event.o SP2Ville.o SP2Demande.o SP2Fonction.o SP2LienEchange.o SP2PlaceEchange.o SP2Liaison.o sp2base.o Integer.o Double.o Point.o HashSet.o HashMap.o SP2Historique.o SP2Equation.o table_voronoi.o /usr/local/swarm2.2/lib/libswarm.dylib -lBLT24 - ltk8.4 -ltcl8.4 -lXpm -lpng -lX11 -ldl /usr/local/hdf5_1.6.1/lib/ libhdf5.dylib -lpthread -lz -lm -lgcc_s.10.4 -lgcc -lSystemStubs - lSystem



Then there are some "undefined symbols" problems causing the break of the link phase. Here are the error message :

/usr/bin/ld: Undefined symbols:
_objc_msgSend
.objc_class_name_ListShuffler_c
.objc_class_name_QSort
_objc_msgSendSuper
.objc_class_name_NormalDist
.objc_class_name_Protocol
.objc_class_name_SwarmObject
.objc_class_name_Swarm
.objc_class_name_FArguments_c
_objc_msgSend_stret
.objc_class_name_CreateDrop
.objc_class_name_Collection_any
.objc_class_name_Index_any
collect2: ld returned 1 exit status


I've been searching the web the whole day, including the mailing- list, being sure i would find a topic relating a similar problem, but even if some topics in the mailing list are tacking very similar issues, none of those solutions seems to fit well to my case. The paths to librairies are right, i've tried (wihtout success) to specify different orders for the .o files list, and anyway with this order the code links on the linux machine. So, as you can see, ld indicates he doesn't know symbols like SwarmObject or Swarm symbols, and doesn't know more objc basic _msg_send or _Protocol symbols either...quite strange, since, once again : 1) i could compile the swarmapps downloaded in the archive provided on the website, which prooves my swarm install is configured and ready to go. I fig 2) this swarm-objc-based-code compiles, links (with gcc 3.4) and runs on a linux machine without difficulties, but doesn't on my mac

If a swarm (and mac) user has an idea of what could cause that linking troubles, i'd be really grateful.

Best wishes,
Thomas L.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]