LD_RUN_PATH not adding paths when building with shared libs

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

 



[please cc, as I don't seem to be getting mail from the lists - and my 
subscribe confirm messages are not getting to me]

This is still trying to work out problems on IRIX where a needed library 
is not in the default search path (libgcc_s.so.1).

Tried using LD_RUN_PATH to point to libgcc but that wasn't working
without using LD_LIBRARY_PATH at run time.

So, it seems like the LD_RUN_PATH path is not used when building our
project unless we use --disable-shared:

This project uses libtool and automake.  It builds a library that is 
installed using libtools and also a binary linked against that library.

I'm not clear if this is expected beharior or not.  I'd think 
LD_RUN_PATH should be available regardless if building shared or not:

First, if not using --disable-shared my LD_RUN_PATH is not set in the 
binary:


moseley@bumby:~/swish-e$ ./configure --prefix=$HOME/test_again >/dev/null
moseley@bumby:~/swish-e$ LD_RUN_PATH=/home/moseley/swish-e/filters make install >/dev/null
moseley@bumby:~/swish-e$ strings /home/moseley/test_again/bin/swish-e | grep moseley
/home/moseley/test_again/lib
/home/moseley/test_again/lib/swish-e

(By the way, I'm sure I used to know a better way to show the search 
path for a binary than using strings!)


Now try with --disable-shared:

moseley@bumby:~/swish-e$ ./configure --disable-shared --prefix=$HOME/test_again >/dev/null
moseley@bumby:~/swish-e$ LD_RUN_PATH=/home/moseley/swish-e/filters make install >/dev/null
moseley@bumby:~/swish-e$ strings /home/moseley/test_again/bin/swish-e | grep moseley
/home/moseley/swish-e/filters
/home/moseley/test_again/lib/swish-e

Now LD_RUN_PATH is getting in the binary.  Is this expected?

If it is expected how should users that have other library requirements 
(like libgcc on IRIX) add in a path at build time?



-- 
Bill Moseley
moseley@xxxxxxxx




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux