Loading specified shared libraries
Hello,
I have two toolchains in my filesystem: 1. gcc 4.1.2 that was installed under /usr with Centos installation. 2. gcc 4.3.2 that was built by crosstool-ng-1.4.2 Each toolchain has its own shared libraries. I build a simple application with the second toolchain and want to run it. How can I tell linux to load the shared libraries of the second toolchain only ? I tried to chain LD_LIBRARY_PATH but the output of ldd is the libraries of the first toolchain. Thanks. |
Try this:
Install one gcc in /usr/bin Install the other gcc miles away (/opt, /usr/local, it doesn't really matter). the libs will go in the local trees - /usr/local/lib, /opt/lib, and version specific directories. Then change the path of the compiling usr $ export PATH=/opt/bin:$PATH You can check what libs they find with ldd. For a while I had gcc-2.95 and gcc-3.3.1 this way in /usr/bin & /usr/local |
All times are GMT -5. The time now is 07:07 PM. |