[petsc-users] Fail to Configure petsc-3.6.1

Jed Brown jed at jedbrown.org
Wed Aug 5 10:29:22 CDT 2015


Rongliang Chen <rongliang.chan at gmail.com> writes:

> Hi Jed,
>
> Thanks for your reply.
>
> I checked the netcdf and hdf5's config.log and could not find any 
> possible solutions. Can you help me check these two files again? The two 
> files are attached. Thanks.

It looks to me like libhdf5.a needs to be linked with -ldl, which partly
defeats the intent of static linking.  PETSc folks, do we blame this on
HDF5 with --disable-shared not being a truly static build?  Should we
pass LDLIBS=-ldl so that NetCDF can link?

This likely all works if you use shared libraries.  (I can't believe
this is still a debate in 2015.)

configure:16585: mpicc -o conftest -g3 -O0 -I/home/rlchen/soft/petsc-3.6.1/64bit-debug/include  conftest.c -lhdf5  -lm -Wl,-rpath,/home/rlchen/soft/petsc-3.6.1/64bit-debug/lib -L/home/rlchen/soft/petsc-3.6.1/64bit-debug/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lz >&5
/home/rlchen/soft/petsc-3.6.1/64bit-debug/lib/libhdf5.a(H5PL.o): In function `H5PL__open':
/home/rlchen/soft/petsc-3.6.1/64bit-debug/externalpackages/hdf5-1.8.12/src/H5PL.c:535: undefined reference to `dlopen'
/home/rlchen/soft/petsc-3.6.1/64bit-debug/externalpackages/hdf5-1.8.12/src/H5PL.c:536: undefined reference to `dlerror'
/home/rlchen/soft/petsc-3.6.1/64bit-debug/externalpackages/hdf5-1.8.12/src/H5PL.c:544: undefined reference to `dlsym'
/home/rlchen/soft/petsc-3.6.1/64bit-debug/lib/libhdf5.a(H5PL.o): In function `H5PL__search_table':
/home/rlchen/soft/petsc-3.6.1/64bit-debug/externalpackages/hdf5-1.8.12/src/H5PL.c:627: undefined reference to `dlsym'
/home/rlchen/soft/petsc-3.6.1/64bit-debug/lib/libhdf5.a(H5PL.o): In function `H5PL__close':
/home/rlchen/soft/petsc-3.6.1/64bit-debug/externalpackages/hdf5-1.8.12/src/H5PL.c:661: undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150805/c200a640/attachment.pgp>


More information about the petsc-users mailing list