Re: Running an uninstalled executable
El Tue, 12 May 2015 11:38:42 +0200 Alberto Luaces alua...@udc.es escribió: Hello, in an autoconf+automake+libtool C++ project containing only one program, I want to run the executable before installing it. Reading the manual I thought that it could be done with libtool --mode=execute program_binary but it fails, since there are undefined references to shared libraries not installed in standard directories. Can libtool solve this problem for me? In order to use libraries not installed, but present in another directory (non standard), you have to use LD_LIBRARY_PATH http://stackoverflow.com/questions/695530/why-do-i-have-to-define-ld-library-path-with-an-export-every-time-i-run-my-appli Something like: LD_LIBRARY_PATH=/path/to/your/custom/library libtool --mode=execute program_binary I think this is not related to libtool, but how bash and shared libraries works though ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: Running an uninstalled executable
David stormb...@gmail.com writes: El Tue, 12 May 2015 11:38:42 +0200 Alberto Luaces alua...@udc.es escribió: Hello, in an autoconf+automake+libtool C++ project containing only one program, I want to run the executable before installing it. Reading the manual I thought that it could be done with libtool --mode=execute program_binary but it fails, since there are undefined references to shared libraries not installed in standard directories. Can libtool solve this problem for me? In order to use libraries not installed, but present in another directory (non standard), you have to use LD_LIBRARY_PATH http://stackoverflow.com/questions/695530/why-do-i-have-to-define-ld-library-path-with-an-export-every-time-i-run-my-appli Something like: LD_LIBRARY_PATH=/path/to/your/custom/library libtool --mode=execute program_binary I think this is not related to libtool, but how bash and shared libraries works though Thanks, David. I was hoping that libtool set LD_LIBRARY_PATH for me. -- Alberto ___ https://lists.gnu.org/mailman/listinfo/libtool
Running an uninstalled executable
Hello, in an autoconf+automake+libtool C++ project containing only one program, I want to run the executable before installing it. Reading the manual I thought that it could be done with libtool --mode=execute program_binary but it fails, since there are undefined references to shared libraries not installed in standard directories. Can libtool solve this problem for me? -- Alberto ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: Running an uninstalled executable
On Tue, 12 May 2015, Alberto Luaces wrote: Hello, in an autoconf+automake+libtool C++ project containing only one program, I want to run the executable before installing it. Reading the manual I thought that it could be done with libtool --mode=execute program_binary but it fails, since there are undefined references to shared libraries not installed in standard directories. Can libtool solve this problem for me? Libtool is supposed to solve this problem automatically for libraries in the build-tree built using libtool, or involved libraries which have a correct associated .la file. It is not uncommon for the .la files that libtool installs to be deleted, or for libraries to be put into a location other than the paths the .la file says they reside. If the installed libraries violate the libtool expectations, then there are only the choices of building the software with a hard-coded run-path (-RLIBDIR or -Wl,-rpath,/libdir'), or using environment variables like LD_LIBRARY_PATH. As a developer, I find using the run-path to be most reliable/convenient, but this may not be suitable when creating packaged binaries for installation. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/ ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: Running an uninstalled executable
On 2015-05-12 12:00 +0200, Alberto Luaces wrote: David stormb...@gmail.com writes: El Tue, 12 May 2015 11:38:42 +0200 Alberto Luaces alua...@udc.es escribió: [...] libtool --mode=execute program_binary but it fails, since there are undefined references to shared libraries not installed in standard directories. Can libtool solve this problem for me? Yes, libtool can solve this problem! In order to use libraries not installed, but present in another directory (non standard), you have to use LD_LIBRARY_PATH http://stackoverflow.com/questions/695530/why-do-i-have-to-define-ld-library-path-with-an-export-every-time-i-run-my-appli Something like: LD_LIBRARY_PATH=/path/to/your/custom/library libtool --mode=execute program_binary [...] Thanks, David. I was hoping that libtool set LD_LIBRARY_PATH for me. If the libraries you are linking against are libtool libraries (.la), and they are correctly installed, then libtool should be automatically setting the runtime path appropriately. That way, the libraries will be picked up automatically from the nonstandard location. Otherwise, you might consider linking your programs with the -R/path/to/your/libraries option. There should be no need to set LD_LIBRARY_PATH, although it can work in a pinch. Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) ___ https://lists.gnu.org/mailman/listinfo/libtool