Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: [hwloc-devel] hwloc and rpath
From: Jirka Hladky (jhladky_at_[hidden])
Date: 2010-06-18 16:59:24

Hello everybody!

I'm in process to pack hwloc into rpm for Fedora. I have attached the latest
hwloc.spec file for reference.

However, there are strict rules to get a package into Fedora. One of the rules
is that rpmlint has to pass. It's failing at the moment:

 hwloc.x86_64: E: binary-or-shlib-defines-rpath /usr/bin/hwloc-distrib
The binary or shared library defines `RPATH'. Usually this is a bad thing
because it hardcodes the path to search libraries and so makes it difficult to
move libraries around. Most likely you will find a Makefile with a line like:
gcc test.o -o test -Wl,--rpath. Also, sometimes configure scripts provide a
--disable-rpath flag to avoid this.

or for example

Basically, I need to get rid of it. One approach is to change it in the source
code directly. Could you guys do it?

I could possibly deal with it when creating a package

- either by patching libtool after ./configure step. (Which works nicely)
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

- or by using chrpath to strip the RPATH header from the generated binary.

As I said, patching libtool after ./configure step works just fine (see attached
spec file hwloc.spec-patching_libtool). However, I don't like this solution. I
believe that fixing this in upstream would be the best solution.

Please let me know your opinion.