[Crosstool] Importance of message about "link against installed libraries"?

Dan Kegel dank@kegel.com
Mon Jul 19 13:57:00 GMT 2004

Martin Egholm Nielsen wrote:
> In the final phase of compiling a crosscompiler with Crosstool 
> (0.28rc28), it rapidly flashes something like the following across the 
> screen:
> ==== 8< ====
> Libraries have been installed in:
> /opt/crosstool/powerpc-405-linux-gnu/gcc-3.4.1-glibc-2.2.5/powerpc-405-linux-gnu/lib/nof 
> If you ever happen to want to link against installed libraries
> in a given directory, LIBDIR, you must either use libtool, and
> specify the full pathname of the library, or use the `-LLIBDIR'
> flag during linking and do at least one of the following:
>    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
>      during execution
>    - add LIBDIR to the `LD_RUN_PATH' environment variable
>      during linking
>    - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
>    - have your system administrator add LIBDIR to `/etc/ld.so.conf'
> ==== 8< ====
> How much should one care about this message?

That warning is from glibc's Makefile.
The suggestions are appropriate if you're trying to run the apps
with the libraries where they were installed.
For instance, when I build a gcc-3.4 toolchain with crosstool, and
want to run the resulting apps on my development system, I add
LIBDIR to LD_LIBRARY_PATH before running (well, actually I copy
just two .so's to an empty directory and add that to LD_LIBRARY_PATH,
since all I need are the new .so's not already on my system.)

In most cases, though, the libraries will be copied to /usr/lib and /lib
when you make a system image (or are already there, if you're just
building apps for an already-existing system).
- Dan

My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change

Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

More information about the crossgcc mailing list