On Monday, June 21, 2010 04:51:09 pm Samuel Thibault wrote: > Jeff Squyres, le Mon 21 Jun 2010 10:48:13 -0400, a écrit : > > I still see -rpath being inserted in the final link step for libhwloc.so > > (SVN build using AC 2.65, AM 1.11.1, LT 2.2.6b): > > > > /bin/sh ../libtool --tag=CC --mode=link gcc -std=gnu99 > > -fvisibility=hidden -I/usr/include/libxml2 -std=gnu99 > > -fvisibility=hidden -I/users/jsquyres/svn/hwloc/include -Wall > > -Wunused-parameter -Wundef -Wno-long-long -Wsign-compare > > -Wmissing-prototypes -Wstrict-prototypes -Wcomment -pedantic > > -no-undefined -version-number 0:0:0 -lxml2 -lz -lm -o libhwloc.la > > -rpath /home/jsquyres/bogus/lib topology.lo traversal.lo > > topology-synthetic.lo bind.lo cpuset.lo misc.lo topology-xml.lo > > topology-linux.lo topology-x86.lo -libverbs > > > > But unless I'm mistaken, libtool then strips it out: > > > > libtool: link: gcc -shared .libs/topology.o .libs/traversal.o > > .libs/topology-synthetic.o .libs/bind.o .libs/cpuset.o .libs/misc.o > > .libs/topology-xml.o .libs/topology-linux.o .libs/topology-x86.o > > -lxml2 -lz -lm -libverbs -Wl,-soname -Wl,libhwloc.so.0 -o > > .libs/libhwloc.so.0.0.0 > > I was also seeing that behavior with LIBS, so I don't think turning to > LDADD fixed that part. > > Samuel > _______________________________________________ > hwloc-devel mailing list > hwloc-de...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
Hi Samuel, thanks a lot for looking into it! I have done some research on Fedora12 and Fedora13, both 64-bit. I don't have "/usr/lib64" directory listed in /etc/ld.so.conf. However, "/usr/lib64" is considered to be the default lib location on 64-bit system. ldconfig is looking into /usr/lib64 by default. However, libtool does not look into /usr/lib64 by default. I have found 2 ways how to fix it: 1) Add /usr/lib64 into /etc/ld.so.conf. It works like a charm. The problem is that I cannot use this change in the build environment (on a cluster of build servers for compilation on different architectures) Samuel, do you have "/usr/lib64" directory listed in /etc/ld.so.conf listed on your 64-bit Debian? If so, I will consider to open Bugzilla to add "/usr/lib64" directory into /etc/ld.so.conf on Fedora as well. 2) Second approach is to add 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 into the %configure stage in rpm specs. I don't like this approach but it seems to be the only way how to get rid of rpath on an automatic build system. James, any feedback on it? I'm not sure if I should blame libtool or just open BZ to add "/usr/lib64" into /etc/ld.so.conf. Thanks Jirka