On Tue, 18 Feb 2003 16:05:26 -0600
David Drum <[EMAIL PROTECTED]> wrote:

> [FlightGear-Devel readers: this is another installment in my quest
> to get FlightGear compiled under Mac OS X.  I now have a good lead on
> the final link failure, I think.  If you have any knowledge of linker
> naming conventions, symbol tables, and the like, I would appreciate
> your comments.  Thanks.  P.S. Everything is being built from CVS.]
> 
> Previous make's were failing, unable to find gen_leaf or
> ssgVtxTable::ssgVtxTable.
> 
> Sometime recently the call to gen_leaf was removed from the CVS code.
> Instead, three other symbols are now not being found.  Here's the final
> make command along with output:
> 
> david@Cynosure ~/FlightGear/src/main
> $ make
> g++ -DPKGLIBDIR=\"/Users/david/lib/FlightGear\" -g -O2 -D_REENTRANT 
> -L/Users/david/lib -L/usr/X11R6/lib -o fgfs  main.o fg_commands.o fg_init.o
> fg_io.o fg_props.o fgfs.o globals.o logger.o options.o splash.o util.o
> viewer.o viewmgr.o location.o ../../src/Aircraft/libAircraft.a
> ../../src/ATC/libATC.a ../../src/Autopilot/libAutopilot.a
> ../../src/Cockpit/libCockpit.a ../../src/Cockpit/built_in/libBuilt_in.a
> ../../src/Controls/libControls.a ../../src/FDM/libFlight.a
> ../../src/FDM/Balloon/libBalloon.a
> ../../src/FDM/ExternalNet/libExternalNet.a ../../src/FDM/JSBSim/libJSBSim.a
> ../../src/FDM/YASim/libYASim.a ../../src/FDM/JSBSim/filtersjb/libfiltersjb.a
> ../../src/FDM/LaRCsim/libLaRCsim.a ../../src/FDM/UIUCModel/libUIUCModel.a
> ../../src/GUI/libGUI.a ../../src/Input/libInput.a
> ../../src/Instrumentation/libInstrumentation.a ../../src/Model/libModel.a
> ../../src/Navaids/libNavaids.a ../../src/Scenery/libScenery.a
> ../../src/Scripting/libScripting.a ../../src/Sound/libSound.a
> ../../src/Airports/libAirports.a ../../src/Network/libNetwork.a
> ../../src/NetworkOLK/libNetworkOLK.a ../../src/Objects/libObjects.a
> ../../src/Systems/libSystems.a ../../src/Time/libTime.a
> ../../src/Environment/libEnvironment.a -lsgroute -lsgsky -lsgephem
> -lsgtiming -lsgio -lsgscreen -lsgmath -lsgbucket -lsgdebug -lsgmagvar
> -lsgmisc -lsgxml -lsgserial -lsgthreads -lplibpu -lplibfnt -lplibjs
> -lplibnet -lplibssg -lplibsg -lplibul -lplibpsl -lmk4 -lz -lpthread -lm 
> -framework GLUT -framework OpenGL -framework Carbon -lobjc -lplibsl -lplibsm
> -framework IOKit -framework CoreFoundation -lm ld: warning table of contents
> of library: ../../src/FDM/JSBSim/libJSBSim.a not sorted slower link editing
> will result (use the ranlib(1) -s option) ld: Undefined symbols:
> trTileSize(_TRctx*, long, long, long)
> trImageSize(_TRctx*, long, long)
> trTileBuffer(_TRctx*, unsigned long, unsigned long, void*)
> ssgVtxTable::ssgVtxTable[in-charge](unsigned, ssgVertexArray*,
> ssgNormalArray*, ssgTexCoordArray*, ssgColourArray*) make: *** [fgfs] Error
> 1
> 
> I have been using nm to poke around and believe I know what is going on,
> even if I don't know how to fix it:
> 
> david@Cynosure ~
> $ nm -o lib/libsgscreen.a FlightGear/src/GUI/gui_funcs.o | egrep
> 'trTileSize|trImageSize|trTileBuffer'
>         lib/libsgscreen.a:tr.o:00001564 S _Z10trTileSizeP6_TRctxiii.eh
>         lib/libsgscreen.a:tr.o:0000158c S _Z11trImageSizeP6_TRctxii.eh
>         lib/libsgscreen.a:tr.o:000001d4 T __Z10trTileSizeP6_TRctxiii
> FlightGear/src/GUI/gui_funcs.o:         U __Z10trTileSizeP6_TRctxlll
>         lib/libsgscreen.a:tr.o:000003c8 T __Z11trImageSizeP6_TRctxii
> FlightGear/src/GUI/gui_funcs.o:         U __Z11trImageSizeP6_TRctxll
>         lib/libsgscreen.a:tr.o:0000036c T __Z12trTileBufferP6_TRctxjjPv
> FlightGear/src/GUI/gui_funcs.o:         U __Z12trTileBufferP6_TRctxmmPv
> 
> If you look closely at the "T" lines and the "U" lines, you will see that
> the symbol names do not match!  No wonder the final link fails.  I guess
> I need some way to get the compiler to generate the same symbol names.
> 

>From simgear/screen/tr.h:

extern void trTileSize(TRcontext *tr, GLint width, GLint height, GLint
border);

It looks like GLint is defined as an int when compiling SimGear but is long
when compiling FlightGear.

Bernie



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to