LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded
User Name
Password
Linux - Embedded This forum is for the discussion of Linux and embedded devices.

Notices

Reply
 
LinkBack Search this Thread
Old 10-30-2009, 06:23 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 90

Rep: Reputation: 15
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.
 
Old 11-09-2009, 04:40 AM   #2
business_kid
Senior Member
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware 13.37 & Cyanogenmod 6.0
Posts: 3,833

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libhid.so.0: cannot open shared object file: No misungs Linux - Software 4 06-10-2009 01:05 PM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 04:19 PM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file PaulyWally Debian 2 10-18-2008 06:59 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 06:10 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM


All times are GMT -5. The time now is 11:29 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration