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