Open MPI logo

Hardware Locality Users' Mailing List Archives

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

Subject: [hwloc-users] hwloc and rpath
From: Jirka Hladky (jhladky_at_[hidden])
Date: 2010-06-18 16:09:56


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
['/usr/lib64']
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.
=====================================================

Check
https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
or for example
http://wiki.debian.org/RpathIssue

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)
%configure
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.

Thanks
Jirka