Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 419677 - sci-libs/hdf5-1.8.9 links against host libz and libhdf5
Summary: sci-libs/hdf5-1.8.9 links against host libz and libhdf5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Kacper Kowalik (Xarthisius) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 02:32 UTC by William Throwe
Modified: 2012-06-07 15:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (sci-libs:hdf5-1.8.9:20120605-013346.log.gz,316.90 KB, text/plain)
2012-06-05 02:32 UTC, William Throwe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Throwe 2012-06-05 02:32:43 UTC
Created attachment 314247 [details]
build log

gentoo $ for l in usr/lib/libhdf5*.so ; do echo "${l}" ; ldd "${l}" | grep ' /usr' ; done
usr/lib/libhdf5.so
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002b3a59122000)
usr/lib/libhdf5_cpp.so
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002b4ac6f8c000)
usr/lib/libhdf5_fortran.so
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002b28417c0000)
usr/lib/libhdf5_hl.so
        libhdf5.so.7 => /usr/lib64/libhdf5.so.7 (0x00002b71328c4000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002b7132d63000)
usr/lib/libhdf5_hl_cpp.so
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002adec9f68000)
usr/lib/libhdf5hl_fortran.so
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002ac7fc2d9000)

Additionally, none of the h5* executables link against prefix libraries.

The libraries other than libhdf5_hl.so correctly link against the prefix libhdf5.so .  

$ emerge --info hdf5
Portage 2.2.01.20430-prefix (prefix/linux/amd64, gcc-4.6.3, unavailable, 2.6.18-238.12.1.el5 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.18-238.12.1.el5-x86_64-Intel-R-_Core-TM-2_CPU_6700_@_2.66GHz-with-redhat-5.5-Boron
Timestamp of tree: Mon, 04 Jun 2012 01:54:04 +0000
app-shells/bash:          4.2_p29::gentoo_prefix
dev-lang/python:          2.7.3-r2::gentoo_prefix
dev-util/pkgconfig:       0.26::gentoo_prefix
sys-devel/autoconf:       2.69::gentoo_prefix
sys-devel/automake:       1.11.5::gentoo_prefix
sys-devel/binutils:       2.22-r1::gentoo_prefix
sys-devel/gcc:            4.6.3::gentoo_prefix
sys-devel/gcc-config:     1.5-r2::gentoo_prefix
sys-devel/libtool:        2.4.2::gentoo_prefix
sys-devel/make:           3.82::gentoo_prefix
sys-kernel/linux-headers: 3.4::gentoo_prefix (virtual/os-headers)
Repositories: gentoo_prefix
Installed sets: 
ACCEPT_KEYWORDS="~amd64-linux"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/portage /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/home/astrosun/wthrowe/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--ask"
FEATURES="assume-digests binpkg-logs clean-logs collision-protect compress-build-logs distlocks ebuild-locks fixlafiles force-prefix news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="POSIX"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"
MAKEOPTS="-j3"
PKGDIR="/home/supernova/wthrowe/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/home/supernova/wthrowe/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/supernova/wthrowe/gentoo/var/tmp"
PORTDIR="/home/supernova/wthrowe/gentoo/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx modules mudflap ncurses nls nptl openmp pcre pppd prefix readline session sse sse2 ssl tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sci-libs/hdf5-1.8.9 was built with the following:
USE="cxx fortran (prefix) zlib -debug -examples -fortran2003 -mpi -static-libs -szip -threads"
Comment 1 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-06-06 12:51:03 UTC
Are you in prefix environment? ldd will show you different things wrt to your LD_LIBRARY_PATH settings. 
Try e.g. LD_LIBRARY_PATH="${EPREFIX}/usr/lib" ldd ${EPREFIX}/usr/lib/libhdf5.so
Comment 2 William Throwe 2012-06-06 15:16:17 UTC
(In reply to comment #1)
> Are you in prefix environment? ldd will show you different things wrt to
> your LD_LIBRARY_PATH settings. 
> Try e.g. LD_LIBRARY_PATH="${EPREFIX}/usr/lib" ldd
> ${EPREFIX}/usr/lib/libhdf5.so

This was all done in the prefix environment, but the prefix environmnet doesn't set LD_LIBRARY_PATH.  Explicitly specifying LD_LIBRARY_PATH="${EPREFIX}/usr/lib:${EPREFIX}/lib" gets ldd to show the correct libraries, but everything in the prefix except hdf5 works without LD_LIBRARY_PATH.

It looks like all the hdf5 executables and libraries are missing ${EPREFIX}{,/usr}/lib from their RPATH/RUNPATH headers.
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-06-06 19:40:41 UTC
+*hdf5-1.8.9-r1 (06 Jun 2012)
+
+  06 Jun 2012; Kacper Kowalik <xarthisius@gentoo.org> +hdf5-1.8.9-r1.ebuild,
+  -hdf5-1.8.9.ebuild:
+  Don't disable rpath for shared libraries wrt #419677 by William Throwe
+  <wtt6@cornell.edu>
+
Comment 4 William Throwe 2012-06-07 05:25:59 UTC
Unfortunately, not fixed.  It no longer tries to use the host libhdf5, but still uses the host libz.  (I don't seem to be able to reopen the bug.)

Some of the RPATHs now have ${EPREFIX}/usr/lib, but still not ${EPREFIX}/lib, which is where libz is.  (libhdf5.so itself still has neither.)
Comment 5 William Throwe 2012-06-07 05:51:17 UTC
I was about to open another bug for this, but on inspection I think it is the same issue we're seeing here.

The package no longer builds with USE=fortran because it tries to use the host libgcc_s.so to run H5test_kind after (apparently) originally linking it against the prefix version.  (Related to bug 419895 somehow?)

make[2]: Entering directory `/home/supernova/wthrowe/gentoo/var/tmp/portage/sci-libs/hdf5-1.8.9-r1/work/hdf5-1.8.9/fortran/src'
x86_64-pc-linux-gnu-gfortran -I../../src -I../../fortran/src  -c -o H5test_kind_SIZEOF.o  `test -f './H5test_kind_SIZEOF.f90' || echo './'`./H5test_kind_SIZEOF.f90
/home/supernova/wthrowe/gentoo/bin/bash ../../libtool  --tag=FC   --mode=link x86_64-pc-linux-gnu-gfortran -I../../src -I../../fortran/src  -static-libgfortran -Wl,-O1 -Wl,--hash-style=gnu -o H5test_kind H5test_kind_SIZEOF.o  -lz -lrt -lm 
libtool: link: x86_64-pc-linux-gnu-gfortran -I../../src -I../../fortran/src -static-libgfortran -Wl,-O1 -Wl,--hash-style=gnu -o H5test_kind H5test_kind_SIZEOF.o  -lz -lrt -lm
./H5test_kind > H5fortran_detect.f90
./H5test_kind: /lib64/libgcc_s.so.1: version `GCC_4.3.0' not found (required by ./H5test_kind)
make[2]: *** [H5fortran_detect.f90] Error 1

Let me know if you'd prefer I open another bug.
Comment 6 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-06-07 10:59:09 UTC
+  07 Jun 2012; Kacper Kowalik <xarthisius@gentoo.org> hdf5-1.8.9-r1.ebuild:
+  Add explicit rpath for prefix wrt #419677 by William Throwe <wtt6@cornell.edu>


Try now, I've tested it with gcc-4.5 having gcc-4.6 installed, I couldn't reproduce the error from c#5
Comment 7 William Throwe 2012-06-07 15:15:58 UTC
Seems to fix both remaining problems (libz and the build failure).  Thanks!