LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what runtime libs do I need to run apps compiled with gcc4 on redhat 3.6 (https://www.linuxquestions.org/questions/linux-newbie-8/what-runtime-libs-do-i-need-to-run-apps-compiled-with-gcc4-on-redhat-3-6-a-770988/)

liweirydahl 11-23-2009 09:22 AM

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!!

knudfl 11-23-2009 11:16 AM

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
.....

lazlow 11-23-2009 02:25 PM

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.

liweirydahl 11-24-2009 02:19 AM

Quote:

Originally Posted by knudfl (Post 3766886)
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!

knudfl 11-24-2009 04:03 AM

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 .. :) ..
.....


All times are GMT -5. The time now is 12:39 PM.