Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#49430 closed defect (invalid)

py27-netcdf4 command execution failed

Reported by: ForTozs Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: jswhit (Jeff Whitaker), petrrr
Port: py-netcdf4

Description (last modified by petrrr)

I am unable to get py27-netcdf4 to build on my system. I get

Error: org.macports.build for port py27-netcdf4 returned: command execution failed

In the log I get a line about:

:info:build clang: error: no such file or directory: 'netCDF4/_netCDF4.c'

Does anyone know what this issue is related to?

Attachments (1)

main.log (62.2 KB) - added by ForTozs 9 years ago.
main.log

Download all attachments as: .zip

Change History (11)

comment:1 Changed 9 years ago by ForTozs

Cc: JDTilley@… added

Cc Me!

comment:2 Changed 9 years ago by petrrr

Cc: JDTilley@… removed
Description: modified (diff)
Keywords: netcdf python p27-netcdf4 py-netcdf4 removed
Owner: changed from macports-tickets@… to sean@…
Port: py-netcdf4 added; p27-netcdf4 removed

Please follow the ticket guidelines! You do not need to CC yourself, CC the maintainers, no arbitrary keywords.

The main.log file would be very useful.

comment:3 Changed 9 years ago by petrrr

Cc: petr@… added

Cc Me!

Changed 9 years ago by ForTozs

Attachment: main.log added

main.log

comment:4 Changed 9 years ago by ForTozs

main.log attached. To be completely transparent I have hdf5, netcdf4-c, netcdf-fortran installed in /usr/local. But I built these last night, so the problem was before this. I did try sudo port -t install py27-netcdf, but the result was the same.

comment:5 Changed 9 years ago by seanfarley (Sean Farley)

Can you list the variants you have for each port: hdf5, netcdf4-c, and netcdf-fortran (and anything else that might be relevant)?

comment:6 Changed 9 years ago by ForTozs

$ port installed *netcdf* *hdf*
The following ports are currently installed:
  hdf4 @4.2.11_0 (active)
  hdf5 @1.8.15-patch1_0+cxx (active)
  netcdf @4.3.3.1_2+dap+netcdf4 (active)

It may also be relevant that I first experienced this issue when migrating my ports to the new macports release.

comment:7 Changed 8 years ago by ForTozs

Something interesting I noticed in my macports nc-config:

$ nc-config --all

This netCDF 4.3.3.1 has been built with the following features: 

  --cc        -> /usr/bin/clang
  --cflags    ->  -I/opt/local/include -I/opt/local/include -DNDEBUG
  --libs      -> -L/opt/local/lib -lnetcdf

  --has-c++   -> no
  --cxx       -> 
  --has-c++4  -> no
  --cxx4      -> 

  --fc        -> gfortran
  --fflags    -> -I/usr/local/include
  --flibs     -> -L/usr/local/lib -lnetcdff -L/usr/local/lib -lnetcdf -lhdf5 -lhdf5_hl -lhdf5_fortran -lhdf5hl_fortran -L/opt/local/lib -lsz -lz -lcurl -lnetcdf -L/usr/local/lib -lnetcdf -lhdf5 -lhdf5_hl -lhdf5_fortran -lhdf5hl_fortran -L/opt/local/lib -lsz -lz -lcurl
  --has-f90   -> no

  --has-dap   -> yes
  --has-nc2   -> yes
  --has-nc4   -> yes
  --has-hdf5  -> yes
  --has-hdf4  -> no
  --has-pnetcdf-> no

  --prefix    -> /opt/local
  --includedir-> /opt/local/include
  --version   -> netCDF 4.3.3.1

So even the macports version is finding the netcdf-fortran I manually compiled in /usr/local. So I tried to change this by installing the macports netcdf-fortran and I get the following message:

Error: org.macports.activate for port netcdf-fortran returned: Image error: /opt/local/include/netcdf.inc 
already exists and does not belong to a registered port.  Unable to activate port netcdf-fortran. Use 
'port -f activate netcdf-fortran' to force the activation.

Is there anything to make from this?

comment:8 Changed 8 years ago by seanfarley (Sean Farley)

Resolution: invalid
Status: newclosed

You have things installed in /usr/local? Do not pass go. Do not collect $200.

comment:9 Changed 8 years ago by ForTozs

So I can't have netcdf in usr/local and opt/local coexist peacefully? Is there any workaround? Once again, I installed things in /usr this weekend since macports netcdf-fortran wasn't playing nicely with things. This issue was occurring before this. Either way, if I can't do it, I can't do it.

comment:10 Changed 8 years ago by seanfarley (Sean Farley)

Of course you cannot mix /usr/local and /opt/local. Without some kind of black magic (such as trace mode), there's no way for MacPorts to prevent compilers from seeing /usr/local. This is problematic because all the compilers I know of search /usr/local blindly. So, no, /usr/local cannot be used. Ever.

Note: See TracTickets for help on using tickets.