On Sat, Feb 6, 2010 at 9:06 AM, Erik Hofman wrote:

> The problem you reported is that the linker can't locate the library.
> If it's location is defined in ld.so.conf (and after running ldconfig)
> it can.


There is a big difference between the compiler finding the library at
compile time and the runtime linker finding a shared library.

Maybe something has changed in Linux/gcc more recently, but at least in the
old days ld.so.conf had nothing to do with the compiler and how it finds
headers and libraries, and on the flip side, just because the compiler finds
a library and successfully builds an executable, doesn't mean the run time
linker knows about all the shared libraries.

So for the compiler to be able to link an executable, all the libraries need
to be in places that the compiler looks by default, or in places that we
specify on the command line with the -L argument.  For the run time linker
to succeed, all the shared libraries you reference in an application need to
be in directories pointed to by ld.so.conf (and then you need to run
ldconfig after making any config changes to ld.so.conf.)

This means you could successfully compile a program, but have missing shared
libraries when you try to run it if ld.so.conf isn't configured correctly.

Also to respond to another suggestion.  I would *really* hesitate to
manually link /lib64 to /lib, I'm not an expert here, but there are times
when you need both 32bit versions of libraries and 64 bit versions of
libraries.  Most 64 bit systems try to maintain backwards compatibility and
support running 32 bit binaries, but that means you may need a 32 bit
version of a library that is separate from the 64 bit version of the
library.  You may not run into this issue unless you try to install a
precompiled binary on your system (i.e. skype or some other "proprietary"
application ... and there are proprietary application for linux.) :-)

Regards,

Curt.
-- 
Curtis Olson: http://baron.flightgear.org/~curt/
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to