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

[netCDF #CVA-598913]: netcdf-4.1.3 configure with hdf5



Hi Stacy,

> I've attached two files :
> 
> (1) config.log
> 
> (2) config.out
> 
> 
> The config.out file is stdout,stderr from the
> configure command.
> 
> I'm using pgcc and pgf90(version 11.3-0) and
> trying to build netcdf-4.1.3 on an Intel workstation
> in ACD.
> 
> The zlib and hdf5 configure, make was successful.
> I can send you the config.log files from both
> if you need them.

No, but I'd like to see the results of running

  ls -lt /home/stacy/netcdf4/hdf5-1.8.8/lib/*hdf*

Also, you're using pgcc to build netCDF-4.  Is that the same compiler
you used to build hdf5?  Is it possible that you used options that
would build one library as 32-bit and the other as 64-bit?

I notice all the test builds we did on Linux with PGI compilers for
64-bit libraries used --disable-shared as a configure option, e.g.
these environment variable settings:

  CPPFLAGS='-DNDEBUG -DpgiFortran -I/share/ed/local/spock/include' 
  CC=pgcc 
  CFLAGS='-O2 -Msignextend -V' 
  CXX=pgCC 
  CXXFLAGS=-g 
  FC=pgf95 
  FCFLAGS=-g 
  F77=pgf95 
  FFLAGS='-O2 -w -V' 
  LDFLAGS='-L/share/ed/local/spock/lib -L/usr/local/pgi/linux86-64/11.1/lib' 
  LIBS=-lcurl

and this configure invocation:

  ./configure --prefix=/machine/netcdf/nc_test_12481/in1 --disable-shared 
--enable-netcdf-4 make check install

succeeded, as shown here:

  
http://www.unidata.ucar.edu/software/netcdf/builds/4_1_3/out_netcdf-4_1_3_spock_2011063018_20_1.txt

> I also tried to build netcdf-4.2 but it failed with
> same problem locating libhdf5.a.

The config.log file you attached shows that pgcc is not being invoked with a 
"-L"
option that identifies the library path:

> configure:26911: pgcc -o conftest -g   conftest.c -lhdf5  -lm -lcurl  >&5
> /usr/bin/ld: cannot find -lhdf5

so it appears that it's not using the directory you specified in the 
--with-hdf5 option.
Instead of --with-hdf5, you should be able to use the environment variable

  LDFLAGS='-L/home/stacy/netcdf4/hdf5-1.8.8/lib 
-L/home/stacy/netcdf4/zlib-1.2.6/lib' 

and that would be necessary for netCDF-4.2, because it doesn't support the 
"--with-hdf5" 
configure option.  NetCDF-4.2 would also require that you use

  CPPFLAGS='-DpgiFortran -L/home/stacy/netcdf4/hdf5-1.8.8/include 
-L/home/stacy/netcdf4/zlib-1.2.6/include'

--Russ

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



Ticket Details
===================
Ticket ID: CVA-598913
Department: Support netCDF
Priority: Normal
Status: Closed