Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDF 5 tests linking to the system HDF 5 installation #2250

Closed
adamjstewart opened this issue Nov 5, 2016 · 2 comments
Closed

HDF 5 tests linking to the system HDF 5 installation #2250

adamjstewart opened this issue Nov 5, 2016 · 2 comments
Labels
tests General test capability(ies)

Comments

@adamjstewart
Copy link
Member

adamjstewart commented Nov 5, 2016

I just tried installing a pre-release version of HDF 5, but --run-tests failed for me with the following message:

Produced output does not match expected output.
Expected output:
--------------------------------------------------------------------------------
HDF5 version 1.8.18 1.8.18
--------------------------------------------------------------------------------
Produced output:
--------------------------------------------------------------------------------
HDF5 version 1.8.5 1.8.5

Upon further investigation, I found that the executable is not RPATHed, and is linking to my system installation:

$ ldd -r check
	linux-vdso.so.1 =>  (0x00007ffe1b97a000)
	libhdf5.so.6 => /usr/lib64/libhdf5.so.6 (0x00002ae35a9e9000)
	libz.so.1 => /blues/gpfs/home/software/spack-0.9.1/opt/spack/linux-centos6-x86_64/nag-6.1/zlib-1.2.8-6fzvpidg3txst33copiumbget2zovbw2/lib/libz.so.1 (0x00002ae35afd1000)
	libc.so.6 => /lib64/libc.so.6 (0x00002ae35b1ff000)
	libm.so.6 => /lib64/libm.so.6 (0x00002ae35b594000)
	/lib64/ld-linux-x86-64.so.2 (0x00002ae35a7c7000)

This is causing the incorrect version to be picked up.

$ grep Version /usr/lib64/libhdf5.settings 
		   HDF5 Version: 1.8.5-patch1

@eschnett

@eschnett
Copy link
Contributor

The test outputs the version number twice. The first is taken at compile time from the header file, the second at run time from the library. Your error might be that you're also picking up the wrong header files -- this seems to go deeper than just an rpath problem.

@adamjstewart
Copy link
Member Author

I'm digging a little deeper into this and I think I know what the problem is now. When I run on a system without HDF 5 installed, I'm seeing:

'/home/ajstewart/spack/lib/spack/env/cc' '-c' '-I/home/ajstewart/spack/opt/spack/linux-fedora24-x86_64/gcc-6.2.1/hdf5-1.10.0-patch1-ivfp3fna6jinvmi3kxopz5o36y5jss3p/include' 'check.c'
check.c:2:18: fatal error: hdf5.h: No such file or directory
 #include <hdf5.h>
                  ^
compilation terminated.

That entire directory isn't present yet because HDF 5 hasn't been installed yet. #1186 broke this one. The tests were previously run post-installation and now they are run pre-installation. I'll submit a PR to fix this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests General test capability(ies)
Projects
None yet
Development

No branches or pull requests

2 participants