[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #DPO-719222]: netcdf configure error



Hi Mi Zhou,

> I'm trying to build netcdf-4.2.1.1. I got errors doing configure
> "configure: error: Can't find or link to the hdf5 library. Use
> --disable-netcdf-4, or see config.log for errors."
> 
> Could you help? Attached is the config log.
> 
> And here is what's in /hpcf/libs/hdf5/install/1.8.9/lib
> 
> -rw-r--r-- 1 mzhou hpcfadmins 5866960 Sep 26 09:02 libhdf5.a
> -rw-r--r-- 1 mzhou hpcfadmins  205578 Sep 26 09:02 libhdf5_hl.a
> -rwxr-xr-x 1 mzhou hpcfadmins    1013 Sep 26 09:02 libhdf5_hl.la
> lrwxrwxrwx 1 mzhou hpcfadmins      19 Sep 26 09:02 libhdf5_hl.so ->
> libhdf5_hl.so.7.0.3
> lrwxrwxrwx 1 mzhou hpcfadmins      19 Sep 26 09:02 libhdf5_hl.so.7 ->
> libhdf5_hl.so.7.0.3
> -rwxr-xr-x 1 mzhou hpcfadmins  136347 Sep 26 09:02 libhdf5_hl.so.7.0.3
> -rwxr-xr-x 1 mzhou hpcfadmins     947 Sep 26 09:02 libhdf5.la
> -rw-r--r-- 1 mzhou hpcfadmins    2930 Sep 26 09:02 libhdf5.settings
> lrwxrwxrwx 1 mzhou hpcfadmins      16 Sep 26 09:02 libhdf5.so ->
> libhdf5.so.7.0.3
> lrwxrwxrwx 1 mzhou hpcfadmins      16 Sep 26 09:02 libhdf5.so.7 ->
> libhdf5.so.7.0.3
> -rwxr-xr-x 1 mzhou hpcfadmins 3185995 Sep 26 09:02 libhdf5.so.7.0.3

The config.log error was:

  configure:16132: gcc -o conftest -g -O2 
-I/hpcf/libs/hdf5/install/1.8.9/include -I/hpcf/libs/hdf5/install/1.8.9/lib 
conftest.c -lhdf5  -lm -lcurl  >&5
  /usr/bin/ld: cannot find -lhdf5

The compiler line should have been:



  gcc -o conftest -g -O2 -I/hpcf/libs/hdf5/install/1.8.9/include 
-L/hpcf/libs/hdf5/install/1.8.9/lib conftest.c -lhdf5  -lm -lcurl  >&5

which makes me wonder if you set

  LDFLAGS=-I/hpcf/libs/hdf5/install/1.8.9/lib

instead of

  LDFLAGS=-L/hpcf/libs/hdf5/install/1.8.9/lib

If so, try using "-L" instead of "-I" and see if that makes the configure 
work.

--Russ



Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: DPO-719222
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.