Opened 8 years ago

Closed 8 years ago

#39529 closed defect (fixed)

netcdf: cannot locate HDF5

Reported by: richard.katz@… Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: netcdf

Description

Hello, I've got a configure error with netcdf that I don't know how to fix.

with

sudo port install netcdf

I have the error

:info:configure checking hdf5.h usability... no
:info:configure checking hdf5.h presence... no
:info:configure checking for hdf5.h... no
:info:configure configure: error: NetCDF-4 requires HDF5, but hdf5.h cannot be found.
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_scienceports_science_netcdf/netcdf/work/netcdf-4.2.1.1" && ./configure --prefix=/opt/local --disable-doxygen --enable-netcdf-4
:info:configure Exit code: 1

and yet

sudo port installed hdf5-18 

returns

The following ports are currently installed:
  hdf5-18 @1.8.10_0+clang
  hdf5-18 @1.8.10_0+clang+openmpi (active)

and

ls /opt/local/include/hdf5*

gives

/opt/local/include/hdf5.h	/opt/local/include/hdf5.mod	/opt/local/include/hdf5_hl.h 

Thanks, Richard

Attachments (2)

config.log (155.8 KB) - added by richard.katz@… 8 years ago.
Configure log
main.log (58.4 KB) - added by richard.katz@… 8 years ago.
Main log

Download all attachments as: .zip

Change History (11)

comment:1 Changed 8 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to takeshi@…
Summary: netcdf configure errornetcdf: cannot locate HDF5

In the future, please Cc relevant port maintainers.

comment:2 Changed 8 years ago by tenomoto (Takeshi Enomoto)

Sorry for slow response. I cannot reproduce the problem. I have little to say from what you wrote. I need to look at main.log and config.log. Can you upload ${prefix}/var/macports/logs/*/netcdf/main.log and ${prefix}/var/macports/build/*/netcdf/work/netcdf-4.2.1.1/config.log, where ${prefix} is usually /opt/local and * changes depending on where you have the port tree.

Changed 8 years ago by richard.katz@…

Attachment: config.log added

Configure log

Changed 8 years ago by richard.katz@…

Attachment: main.log added

Main log

comment:3 in reply to:  2 Changed 8 years ago by richard.katz@…

Thank you for your reply. I have attached the logs. Best wishes.

comment:4 Changed 8 years ago by tenomoto (Takeshi Enomoto)

Looking at configure.log, configure failed because of missing mpi.h.

comment:5 Changed 8 years ago by richard.katz@…

Interesting. Checking installed mpi ports:

$ port installed openmpi

Warning: port definitions are more than two weeks old, consider using selfupdate
The following ports are currently installed:
  openmpi @1.6.3_0+clang
  openmpi @1.6.3_0+gcc47 (active)

and looking for mpi.h manually:

$ ls /opt/local/include/openmpi/

mpi-ext.h			mpif-common.h			mpif.h
mpi.h				mpif-config.h			openmpi/
mpi_portable_platform.h		mpif-mpi-io.h			vampirtrace/

$ ls /opt/local/include/mpi*

ls: /opt/local/include/mpi*: No such file or directory

so I wonder if these ports expect to find mpi.h in /opt/local/include/ but not in /opt/local/include/openmpi

comment:6 Changed 8 years ago by tenomoto (Takeshi Enomoto)

I was able to reproduce the problem. You probably have hdf5-18 +openmpi -cxx. I was able to configure netcdf successfully with +openmpi. I will modify Portfile to force +openmpi when hdf5-18 is installed with +openmpi.

comment:7 Changed 8 years ago by tenomoto (Takeshi Enomoto)

Committed the changes in r108224.

comment:8 Changed 8 years ago by richard.katz@…

Thanks. I installed with +openmpi and it worked smoothly.

comment:9 Changed 8 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.