I’m trying to compile hdf5-1.8.20 on CentOS 7.4 using the PGI v19.10-0 (non-LLVM) compilers. Here’s my configure script:
[code]# cat my.configure
make distclean >& /dev/null
setenv FC pgfortran
setenv CC pgcc
setenv FFLAGS “-tp=istanbul”
setenv FCFLAGS “-tp=istanbul”
setenv CFLAGS “-tp=istanbul”
./configure
–prefix=pwd
–enable-fortran
–with-zlib=/usr/local/zlib-1.2.11
>&! my.configure.out
make >&! make.out
make install >&! make.install.out[/code]
And here’s the tail of my.configure.out:
[code]Compiling Options:
Compilation Mode: production
C Compiler: /usr/local/pgi/linux86-64/2019/bin/pgcc ( pgcc 19.10-0 64-bit target on x86-64 Linux -tp istanbul-64 )
CFLAGS: -tp=istanbul
H5_CFLAGS: -c99 -Minform=inform -fast -s
AM_CFLAGS:
CPPFLAGS:
H5_CPPFLAGS: -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112L -DNDEBUG -UH5_DEBUG_API
AM_CPPFLAGS: -I/usr/local/zlib-1.2.11/include
Shared C Library: yes
Static C Library: yes
Statically Linked Executables: no
LDFLAGS:
H5_LDFLAGS:
AM_LDFLAGS: -L/usr/local/zlib-1.2.11/lib
Extra libraries: -lz -ldl -lm
Archiver: ar
Ranlib: ranlib
Debugged Packages:
API Tracing: no[/code]
Looks right so far. But when I compile and check using ldd, I see it’s using the CentOS version of libz:
# ldd bin/h5copy
linux-vdso.so.1 => (0x00007ffc7f391000)
libhdf5.so.10 => /usr/local/src/hdf5-1.8.20.pgi/lib/libhdf5.so.10 (0x00007f31f8bb9000)
[b]libz.so.1 => /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libz.so.1 (0x00007f31f89a1000)[/b]
libdl.so.2 => /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libdl.so.2 (0x00007f31f8799000)
libm.so.6 => /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libm.so.6 (0x00007f31f8491000)
libpgmp.so => /usr/local/pgi/linux86-64-nollvm/19.10/lib/libpgmp.so (0x00007f31f8209000)
libnuma.so.1 => /usr/local/pgi/linux86-64-nollvm/19.10/lib/libnuma.so.1 (0x00007f31f7ff9000)
libpthread.so.0 => /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.so.0 (0x00007f31f7dd9000)
libpgmath.so => /usr/local/pgi/linux86-64-nollvm/19.10/lib/libpgmath.so (0x00007f31f79c1000)
libpgc.so => /usr/local/pgi/linux86-64-nollvm/19.10/lib/libpgc.so (0x00007f31f7769000)
libc.so.6 => /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.so.6 (0x00007f31f7399000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libgcc_s.so.1 (0x00007f31f7181000)
/lib64/ld-linux-x86-64.so.2 (0x00005622afc7d000)
What am I doing wrong?
Here’s how I compiled zlib-1.2.11:
[code]# cat my.configure
#!/bin/csh -f
make distclean >& /dev/null
setenv FC pgfortran
setenv CC pgcc
setenv FFLAGS “-tp=istanbul”
setenv CFLAGS “-tp=istanbul”
./configure
–prefix=pwd
–libdir=pwd
/lib
>&! my.configure.out
make >&! make.out
make install >&! make.install.out[/code]
It looks like it worked:
[code]# ls /usr/local/src/zlib-1.2.11/lib
total 388K
-rw-r–r--. 1 bbrashers 233K Jan 9 15:27 libz.a
lrwxrwxrwx. 1 bbrashers 14 Jan 9 15:27 libz.so -> libz.so.1.2.11*
lrwxrwxrwx. 1 bbrashers 14 Jan 9 15:27 libz.so.1 -> libz.so.1.2.11*
-rwxr-xr-x. 1 bbrashers 152K Jan 9 15:27 libz.so.1.2.11*
drwxrwxr-x. 2 bbrashers 28 Jan 9 16:27 pkgconfig/
ls /usr/local/src/zlib-1.2.11/include/
total 112K
-rw-r–r--. 1 bbrashers 16K Jan 9 15:27 zconf.h
-rw-r–r--. 1 bbrashers 94K Jan 9 15:27 zlib.h[/code]
Any help would be greatly appreciated.
Bart