ROHC build and install on 64bit systems

Asked by Raman Gupta on 2012-10-28

I have downloaded, built and installed ROHC library version 1.4.1 on 64bit CentOS 5.7 distribution. While trying to start the tunnel application I got the error:-

/usr/sbin/rohctunnel: error while loading shared libraries: librohc_comp.so.0: cannot open shared object file: No such file or directory

As a workaround I did:-
$ export LD_LIBRARY_PATH=/usr/lib

Now the tunnel application started fine, so I guess rohctunnel app searches for linking in /usr/lib64 libraries only. Thus it seems on 64-bit platform ROHC libraries are not
installed in /usr/lib64. Is there any specific build/install option for x86_64 platforms.

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
Didier Barvaux Edit question
Solved by:
Didier Barvaux
Solved:
2012-11-20
Last query:
2012-11-20
Last reply:
2012-11-19

> Thus it seems on 64-bit platform ROHC libraries are not installed in /usr/lib64.

Yes. I tested on my x86_64 Gentoo system, they are installed in /usr/lib/. However /usr/lib/ is a symlink to /usr/lib64/.

What is the output of the following commands on your CentOS system:
 $ ls -ld /usr/lib
 $ ls -ld /usr/lib64
 $ cat /etc/ld.so.conf

Regards,
Didier

Raman Gupta (ramangupta16) said : #2

On my CentOS /usr/lib does not symlink to /usr/lib64. A few libraries in /usr/lib64 though are symlink to /lib64 libraries, but that is not the case here either. Output:-

$ ls -ld /usr/lib
drwxr-xr-x 72 root root 28672 Oct 27 08:37 /usr/lib

$ ls -ld /usr/lib64
drwxr-xr-x 96 root root 40960 Oct 13 04:07 /usr/lib64

$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf

$ ls /etc/ld.so.conf.d/
qt-x86_64.conf xulrunner-32.conf xulrunner-64.conf

--Raman

Do you have an example of CentOS package that install libraries in /usr/lib64/ ? Given a .so file installed in /usr/lib64/, you can use the "rpm -qf <so file>" command to retrieve the name of a package.

Regards,
Didier

Raman Gupta (ramangupta16) said : #4

I found that initially at the time of Configuring library the option '--libdir=/usr/lib64' installs the required libraries correctly in /usr/lib64 on CentOS 64bit. So I used something like './configure --prefix=/usr --libdir=/usr/lib64' and successfully ran tunnel app without the need for earlier mentioned LD_LIBRARY_PATH workaround.

So I think on other 64bit systems that don't implicitly installs libraries in /usr/lib64 OR don't have symlinks to 32bit versions, users can try this option.

Answer to your question is 'beecrypt' installs in /usr/lib64. Upon reading the contents of rpm(second cmd below) shows the install path.

$ rpm -qf libbeecrypt.so
beecrypt-devel-4.1.2-10.1.1

$ rpm -q -filesbypkg -p beecrypt-4.2.1-5.fc18.x86_64.rpm
beecrypt /usr/lib64/libbeecrypt.so.7
beecrypt /usr/lib64/libbeecrypt.so.7.0.0

Hi Raman,

> I found that initially at the time of Configuring library the option
> '--libdir=/usr/lib64' installs the required libraries correctly in
> /usr/lib64 on CentOS 64bit. So I used something like './configure
> --prefix=/usr --libdir=/usr/lib64' and successfully ran tunnel app
> without the need for earlier mentioned LD_LIBRARY_PATH workaround.

Thank you! I added a note about that option in the installation manual:
http://rohc-lib.org/wiki/doku.php?id=library-install-sources#native_build_on_unix-like_systems

   Add option --libdir=/usr/lib64 if your system installs libraries in
   /usr/lib64/ instead of /usr/lib/ (CentOS 5.x for example).

Regards,
Didier

Raman Gupta (ramangupta16) said : #6

The explanation for the option should be worded to include the string '64 bit' as a hint to its typical usage on 64bit platforms like for example:-

Add option --libdir=/usr/lib64 if your system is 64bit and it installs libraries in /usr/lib64/ instead of /usr/lib/ (64bit CentOS 5.x for example).

Raman Gupta (ramangupta16) said : #7

Thanks Didier Barvaux, that solved my question.

> The explanation for the option should be worded to include the
> string '64 bit' as a hint to its typical usage on 64bit platforms
> like for example:-
>
> Add option --libdir=/usr/lib64 if your system is 64bit and it installs
> libraries in /usr/lib64/ instead of /usr/lib/ (64bit CentOS 5.x for example).

Changed. Thanks. Note that can perform changes yourself: the wiki accepts
changes without authentication.

Regards,
Didier