LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-23-2009, 10:22 AM   #1
liweirydahl
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
what runtime libs do I need to run apps compiled with gcc4 on redhat 3.6


Without upgrading my "Red Hat Enterprise Linux AS release 3 (Taroon Update 6)", what runtime libraries do I need to add to this redhat3.6 box to run an application compiled with gcc4.1.2 (on another redhat3.6 box) ?
Thanks in advance!!
 
Old 11-23-2009, 12:16 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,746

Rep: Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319
Welcome to LQ.

Applications need different runtime libraries.
Please specify application.

You can also run ldd with the application binary,
to see what it depends on :

ldd <path-to-binary>/"binary"
.. like ..
ldd /usr/bin/gedit
.....

Last edited by knudfl; 11-23-2009 at 12:19 PM.
 
Old 11-23-2009, 03:25 PM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Be extremely careful doing this. IF you replace a package required to run your package it MAY break other things on the system(in some instance the OS itself). You are always best off compiling things with the version that the system is built around.
 
Old 11-24-2009, 03:19 AM   #4
liweirydahl
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

Applications need different runtime libraries.
Please specify application.

You can also run ldd with the application binary,
to see what it depends on :

ldd <path-to-binary>/"binary"
.. like ..
ldd /usr/bin/gedit
.....
Here is the results of ldd:

/lib/Release> ldd libMyJni.so
libgsl.so.0 => /usr/lib/libgsl.so.0 (0x00111000)
libgslcblas.so.0 => /usr/lib/libgslcblas.so.0 (0x00575000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x003c5000)
libm.so.6 => /lib/tls/libm.so.6 (0x00287000)
libc.so.6 => /lib/tls/libc.so.6 (0x005a7000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x008a7000)

Is it possible to put extra libs in a separate directory for this gcc4 compiled app to run on RedHat3.6 without changing the system libs the RedHat3.6 is dependant on ?

Many thanks!
 
Old 11-24-2009, 05:03 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,746

Rep: Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319
Yes, you can make a copy of the special libraries,
which are not present on the target EL 3.6 .
If you are the only user of the "Jni application"
keep the files in e.g. /home/'user'/JniApp/lib/ .
More users having access : /usr/local/JniApp/lib/.
.. Not /usr/local/lib/ !

The libraries : 1) libMyJni.so
2) libstdc++.so.6.0.8 ( probably )
3) libgsl.so.0.10.0 ( or whatever the 'real name' is )
4) libgslcblas.so.0.0.0
.. Put them in JniApp/lib/ and make the links ('so names') :
ln -s libstdc++.so.6.0.8 libstdc++.so.6
ln -s libgsl.so.0.10.0 libgsl.so.0
ln -s libgslcblas.so.0.0.0 libgslcblas.so.0

.. And in a terminal or a start script, the export line
must be the first command, to run the "Jni application" :
export LD_LIBRARY_PATH=/home/'user'/JniApp/lib
or export LD_LIBRARY_PATH=/usr/local/JniApp/lib
.....
..... Good luck .. ..
.....

Last edited by knudfl; 11-24-2009 at 07:43 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How much runtime loss using binary over locally compiled package? kaz2100 Debian 4 07-31-2007 12:38 PM
c++ runtime libs are missing (or not accessible) littlewenwen Linux - Newbie 18 06-04-2007 05:14 PM
Error with shared libs when launching apps Joe Soap Debian 0 02-19-2005 09:15 AM
Getting Java Runtime To Run tsuehpsyde Fedora 2 05-03-2004 01:54 AM
BSD compiled apps in linux benguin Linux - General 1 11-08-2003 11:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:58 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration