Solved

I have an issue moving a compiled application to another box because of shared library location change

Posted on 2008-09-30
1
515 Views
Last Modified: 2012-05-05
I have a C++ application compiled on Linux Redhat 4.0. This application when moved to a different box, it doesn't run due to shared library path issues.



The old path of the library is

 /vobs/atsedssv2/vendor/oracle.rh4/lib//libociei.so


The new path is

/opt/atse/sandbox/vendor/oracle.rh4/lib/libociei.so

my $LD_LIBRARY_PATH env is

[pinlc114] msUnTest> echo $LD_LIBRARY_PATH
/opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib::/opt/atse/sandbox/vendor/oracle.rh4/lib:/opt/atse/sandbox/vendor/lib/Linux-x86_64/xerces-c_2_6_0:/opt/atse/sandbox/vendor/lib/Linux-x86_64/FFC



Here is the output



[pinlc114] msUnTest> ldd alltests
        libTAO_PortableServer.so.1.3a.16 => /opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib/libTAO_PortableServer.so.1.3a.16 (0x0000002a95557000)
        libTAO_CosEvent.so.1.3a.16 => /opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib/libTAO_CosEvent.so.1.3a.16 (0x0000002a9581f000)
        libTAO_CosNaming.so.1.3a.16 => /opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib/libTAO_CosNaming.so.1.3a.16 (0x0000002a95b18000)
        libTAO.so.1.3a.16 => /opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib/libTAO.so.1.3a.16 (0x0000002a95d1d000)
        libACE.so.5.3a.16 => /opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib/libACE.so.5.3a.16 (0x0000002a96096000)
        libffc.so (0x0000002a9634a000)
        libMeridianPILoadBalancing.so (0x0000002a96aca000)
        libxerces-c.so.26 (0x0000002a96bde000)
        /vobs/atsedssv2/vendor/oracle.rh4/lib//libociei.so => not found
        libocci.so.10.1 => /opt/atse/sandbox/vendor/oracle.rh4/lib/libocci.so.10.1 (0x0000002a97054000)
        libclntsh.so.10.1 => /opt/atse/sandbox/vendor/oracle.rh4/lib/libclntsh.so.10.1 (0x0000002a9727b000)
        /vobs/atsedssv2/vendor/oracle.rh4/lib//libnnz10.so => not found
        libnnz10.so => /opt/atse/sandbox/vendor/oracle.rh4/lib/libnnz10.so (0x0000002a985e7000)
        libociei.so => /opt/atse/sandbox/vendor/oracle.rh4/lib/libociei.so (0x0000002a98a8a000)
        librt.so.1 => /lib64/tls/librt.so.1 (0x00000035a7100000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00000035a6500000)
        libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x00000035a6700000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00000035a6100000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00000035a6f00000)
        libm.so.6 => /lib64/tls/libm.so.6 (0x00000035a6300000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000002a9ce94000)
        libc.so.6 => /lib64/tls/libc.so.6 (0x00000035a5e00000)
        libTAO_Messaging.so.1.3a.16 => /opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib/libTAO_Messaging.so.1.3a.16 (0x0000002a9cfa0000)
        libTAO_Svc_Utils.so.1.3a.16 => /opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib/libTAO_Svc_Utils.so.1.3a.16 (0x0000002a9d11d000)
        libTAO_IORTable.so.1.3a.16 => /opt/atseintl/ACE-GNU/ACE_wrappers_OCI_1.3a_p16/lib/libTAO_IORTable.so.1.3a.16 (0x0000002a9d239000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00000035ac200000)
        libstdc++.so.5 => /usr/lib64/libstdc++.so.5 (0x0000002a9d35b000)
        /lib64/ld-linux-x86-64.so.2 (0x00000035a5c00000)
[pinlc114] msUnTest> alltests
alltests: error while loading shared libraries: /vobs/atsedssv2/vendor/oracle.rh4/lib//libociei.so: cannot open shared object file: No such file or directory
[pinlc114] msUnTest>
0
Comment
Question by:EmadGirgis
1 Comment
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 500 total points
ID: 22612851
I have less experience with linux, but the following article may answer your questions:

http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ADO Memory leak with DELPHI 2007 37 187
Move constructor only called if marked noexcept? 6 104
ASP.net build a IF/Then Walkthrough Guide 1 217
C++ to C# code conversion issue 4 110
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question