[Flightgear-devel] Re: 0.9.9 compile problem

2005-11-23 Thread Alex Romosan
Curtis L. Olson [EMAIL PROTECTED] writes:

 What compiler are you using.  This looks a bit strange.  Most often, 
 ifyou link against a library, it only pulls in the required routines 
 from that library and ignores everything else.  But in this case it 
 almost looks like your linker is requiring all symbols in the 
 libsgenvironment.a to get resolved, even if they are part of functions 
 that aren't referenced or used.  The sgi compilers have this tendency, 
 but gcc is usually very smart about this.  The quick fix would be to add 
 the additional libs ... -lsgmath -lplibsg -lGL, etc.

 But it would be interesting to know which compiler you are using to see 
 if it makes sense that it should squawk about this or not ...

 Regards,

 Curt.


 Brian Thomason wrote:

 I'm attempting to compile FlightGear 0.9.9 on Linspire 5.0.
 Compiling simgear 0.9.9 went fine, but FlightGear fails with the
 following error:
 /
 g++ -DPKGLIBDIR=\/usr/share/games/FlightGear\ -g -O2 -D_REENTRANT
 -L/usr/X11R6/lib -L/usr/lib -o metar  metar_main.o -lsgenvironment
 -lsgio -lsgbucket -lsgmisc -lsgstructure -lsgdebug -lsgprops
 -lsgserial -lsgxml -lplibnet -lplibul  -lz -ldl -lm  -ljpeg
 /usr/lib/libsgenvironment.so: undefined reference to
 `ssgContext::loadModelviewMatrix(float (*) [4])'
 /usr/lib/libsgenvironment.so: undefined reference to `glRotatef'
 /usr/lib/libsgenvironment.so: undefined reference to
 `sgMakeRotMat4(float (*) [4], float, float const*)'
 /usr/lib/libsgenvironment.so: undefined reference to `sg_random'
 /usr/lib/libsgenvironment.so: undefined reference to `glVertex3f'
 /usr/lib/libsgenvironment.so: undefined reference to
 `calc_gc_lon_lat(Point3D const, double, double)'
 /usr/lib/libsgenvironment.so: undefined reference to
 `SGCloudField::CloudVis'
 /usr/lib/libsgenvironment.so: undefined reference to
 `SGSoundSample::set_source_pos(float*)'
 /usr/lib/libsgenvironment.so: undefined reference to
 `sgMakeCoordMat4(float (*) [4], float, float, float, float, float,
 float)'
 /usr/lib/libsgenvironment.so: undefined reference to
 `SGBbCache::startNewFrame()'
 /usr/lib/libsgenvironment.so: undefined reference to
 `SGCloudField::get_CacheSize()'
 /usr/lib/libsgenvironment.so: undefined reference to `glDisable'
 /usr/lib/libsgenvironment.so: undefined reference to `glDepthMask'
 /usr/lib/libsgenvironment.so: undefined reference to `glBegin'
 /usr/lib/libsgenvironment.so: undefined reference to

he is linking against shared libraries. i see the same thing (having
modified my build environment a long time ago to build shared
libraries) but in my case i just modified the Makefiles and added the
extra libraries needed.

and, yes, there are a lot of interdependencies (including circular
ones) between the simgear libraries that don't show up in the current
makefiles.

--alex--

-- 
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: 0.9.9 compile problem

2005-11-23 Thread Curtis L. Olson

Alex Romosan wrote:


Curtis L. Olson [EMAIL PROTECTED] writes:

 

What compiler are you using.  This looks a bit strange.  Most often, 
ifyou link against a library, it only pulls in the required routines 
from that library and ignores everything else.  But in this case it 
almost looks like your linker is requiring all symbols in the 
libsgenvironment.a to get resolved, even if they are part of functions 
that aren't referenced or used.  The sgi compilers have this tendency, 
but gcc is usually very smart about this.  The quick fix would be to add 
the additional libs ... -lsgmath -lplibsg -lGL, etc.


But it would be interesting to know which compiler you are using to see 
if it makes sense that it should squawk about this or not ...


Regards,

Curt.


Brian Thomason wrote:

   


I'm attempting to compile FlightGear 0.9.9 on Linspire 5.0.
Compiling simgear 0.9.9 went fine, but FlightGear fails with the
following error:
/
g++ -DPKGLIBDIR=\/usr/share/games/FlightGear\ -g -O2 -D_REENTRANT
-L/usr/X11R6/lib -L/usr/lib -o metar  metar_main.o -lsgenvironment
-lsgio -lsgbucket -lsgmisc -lsgstructure -lsgdebug -lsgprops
-lsgserial -lsgxml -lplibnet -lplibul  -lz -ldl -lm  -ljpeg
/usr/lib/libsgenvironment.so: undefined reference to
`ssgContext::loadModelviewMatrix(float (*) [4])'
/usr/lib/libsgenvironment.so: undefined reference to `glRotatef'
/usr/lib/libsgenvironment.so: undefined reference to
`sgMakeRotMat4(float (*) [4], float, float const*)'
/usr/lib/libsgenvironment.so: undefined reference to `sg_random'
/usr/lib/libsgenvironment.so: undefined reference to `glVertex3f'
/usr/lib/libsgenvironment.so: undefined reference to
`calc_gc_lon_lat(Point3D const, double, double)'
/usr/lib/libsgenvironment.so: undefined reference to
`SGCloudField::CloudVis'
/usr/lib/libsgenvironment.so: undefined reference to
`SGSoundSample::set_source_pos(float*)'
/usr/lib/libsgenvironment.so: undefined reference to
`sgMakeCoordMat4(float (*) [4], float, float, float, float, float,
float)'
/usr/lib/libsgenvironment.so: undefined reference to
`SGBbCache::startNewFrame()'
/usr/lib/libsgenvironment.so: undefined reference to
`SGCloudField::get_CacheSize()'
/usr/lib/libsgenvironment.so: undefined reference to `glDisable'
/usr/lib/libsgenvironment.so: undefined reference to `glDepthMask'
/usr/lib/libsgenvironment.so: undefined reference to `glBegin'
/usr/lib/libsgenvironment.so: undefined reference to
 



he is linking against shared libraries. i see the same thing (having
modified my build environment a long time ago to build shared
libraries) but in my case i just modified the Makefiles and added the
extra libraries needed.

and, yes, there are a lot of interdependencies (including circular
ones) between the simgear libraries that don't show up in the current
makefiles.
 



Ahh, ok, I missed seeing the .so's

I realize that some people really love shared libraries, but in the case 
of flightgear/simgear, who are you sharing them with.  It makes the 
binary a bit smaller, but you don't have a zillion apps all linking 
against the same libraries like you do with X or kde or gnome.


If you have a choice, I'd recommend building simgear as static libraries 
and rolling it all into the executable.


Curt.

--
Curtis Olsonhttp://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:2f585eeea02e2c79d7b1d8c4963bae2d


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d