I have an app I am building on Linux (Ubuntu). The steps involved are ./configure with certain options, make, and then execute the app.

By default the app links/uses a shared library present in the folder /usr/local/lib/libstarpu.so.0, but I have downloaded the latest source for this Starpu and installed it in my home $HOME/lib/.

I tried using this new library as an input to the configure command as below and even removed the /usr/local/lib from my LD_LIBRARY_PATH, but still when I check with ldd, it seems to show the executable is built with the old version of the library in /usr/local/lib.

./configure LDFLAGS="-l:$HOME/lib/libstarpu.so.0"

How do I make my build system to use the newer version of this shared library in a different folder than the system default of /usr/local/lib?

Do I need to modify anything in my build related makefiles, configure files?

link|improve this question

29% accept rate
1  
Well I think you can do something like LD_LIBRARY_PATH=$HOME/lib/libstarpu.so.0 ./configure or maybe LD_PRELOAD (is is bit different i cant remember right now) – Ency Dec 5 '11 at 14:58
You may need to use ./configure LDFLAGS="-L:$HOME/lib" instead. Use -L instead of -l. – Khaled Dec 5 '11 at 15:18
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.