rpath removing

Hello,

I build on Linux the HDF libs with the configure flag --disable-sharedlib-rpath
configure & building process works well, but the libhdf5_cpp and libhdf5_hl library
have got also the rpath, only the libhdf5 does not have the rpath. How can I remove
the rpath on the cpp and hl library?

Thanks

Phil

Hi Phil,

The --disable-sharedlib-rpath option actually does not remove library paths
from lib files. It removes HDF5 library paths from executable files that
are dynamically linked. If you run ldd on a file such as h5dump in the bin
directory on a machine that does not have hdf5 installed in a system library
location and does not have LD_LIBRARY_PATH set in the environment to where
HDF5 is installed, you should see something like this:

[hdftest@jam bin]$ ldd h5dump
        linux-gate.so.1 => (0x0060a000)
        libhdf5.so.7 => not found
        libz.so.1 => /lib/libz.so.1 (0x002cb000)
        librt.so.1 => /lib/librt.so.1 (0x00454000)
        libm.so.6 => /lib/libm.so.6 (0x00284000)
        libc.so.6 => /lib/libc.so.6 (0x00120000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x002af000)
        /lib/ld-linux.so.2 (0x00101000)

The "not found" for libhdf5.so.7 indicates that the rpath was removed.

ldd libhdf5.so.7 will show paths to system libraries but not to HDF5
libraries, because libhdf5 does not link to any HDF5 libraries. For
libhdf5_cpp and libhdf5_hl, ldd generally shows paths to the installed
libhdf5.

I don't think whether or not --disable-sharedlib-rpath should remove the
rpath from the lib files has been considered. If that is something you
need, we would be interested in knowing your specific requirements to
explore possible changes to the --disable-sharedlib-rpath option.

Larry

···

-----Original Message-----
From: Hdf-forum [mailto:hdf-forum-bounces@hdfgroup.org] On Behalf Of Philipp
Kraus
Sent: Tuesday, December 04, 2012 11:24 AM
To: hdf-forum@hdfgroup.org
Subject: [Hdf-forum] rpath removing

Hello,

I build on Linux the HDF libs with the configure flag
--disable-sharedlib-rpath configure & building process works well, but the
libhdf5_cpp and libhdf5_hl library have got also the rpath, only the libhdf5
does not have the rpath. How can I remove the rpath on the cpp and hl
library?

Thanks

Phil

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hello Larry,

ldd libhdf5.so.7 will show paths to system libraries but not to HDF5
libraries, because libhdf5 does not link to any HDF5 libraries. For
libhdf5_cpp and libhdf5_hl, ldd generally shows paths to the installed
libhdf5.

I know the problem with the rpath, so in my case the hl and cpp subfiles are
build with an absolut path on my system eg /home/myuser/hdf....

So I need for a special case that the rpath is relative, because I read the hdf5.so
manually and on this the hl and cpp so file are relative to the hdf5.so. So the rpath
should be set to "./". How can I change the rpath on building hdf? Can I set only the
LDFLAGS and the configure script overwrites the default rpath option?

I would like to use this:

/mydir
  hdf5.so
  hdf5_cpp.so
  hdf5_hl.so

and I load the hdf5.so manually

Thanks

Phil

···

Am 06.12.2012 um 00:58 schrieb Larry Knox:

Hi Larry,

I don't think whether or not --disable-sharedlib-rpath should remove the
rpath from the lib files has been considered. If that is something you
need, we would be interested in knowing your specific requirements to
explore possible changes to the --disable-sharedlib-rpath option.

I know the problem, but how can I change the rpath during the build process?
Should I modifiy only the LDFLAGS? I have got the problem:

/myhdfdir
  libhdf5.so
  libhdf5_hl.so
  libhdf5_cpp.so

I load the libhdf5.so manually, so on this I need a relative rpath, so that
the libhdf5 can found in the same path the hl & cpp lib.

Phil

···

On 2012-12-06 00:58:13 +0100, Larry Knox said: