Opened 16 months ago

Last modified 15 months ago

#62472 assigned defect

netcdf @4.7.4 +universal: Unable to support CDF5 feature because size_t is less than 8 bytes

Reported by: ryandesign (Ryan Schmidt) Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.6.99
Keywords: Cc: Dave-Allured (Dave Allured)
Port: netcdf

Description

Trying to install netcdf @4.7.4 with the +universal variant (on macOS High Sierra) fails:

CMake Error at CMakeLists.txt:1360 (MESSAGE):
  Unable to support CDF5 feature because size_t is less than 8 bytes

Attachments (1)

main.log (44.5 KB) - added by ryandesign (Ryan Schmidt) 16 months ago.

Download all attachments as: .zip

Change History (6)

Changed 16 months ago by ryandesign (Ryan Schmidt)

Attachment: main.log added

comment:1 Changed 15 months ago by Dave-Allured (Dave Allured)

comment:2 Changed 15 months ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:3 Changed 15 months ago by Dave-Allured (Dave Allured)

The upstream developers say: "4.7.4 does support 32-bit OS, but it does not support the CDF5 format in 32 bit environments. The configure and CMakeLists.txt check for 32-bit architecture and turn off CDF5 support by default; if the option is passed to try to force it on, we see error messages as above."

My personal advice for Macports is to disable CDF5 when building for 32 bit. For universal, it would be best to enable CDF5 for 64 bit platforms, and disable for 32 bit. If that is not possible, then just disable CDF5 completely when building universal.

comment:4 Changed 15 months ago by tenomoto (Takeshi Enomoto)

I'm not sure why +cdf5 is appended with +universal and on i386.

comment:5 Changed 15 months ago by Dave-Allured (Dave Allured)

On further investigation, it appears that this Netcdf version 4.7.4 automatically detects the platform, and by default, configures itself correctly for CDF5 support.

I think that the +cdf5 variant in the portfile is a holdover from earlier versions that required an explicit option. If I understand the upstream answer correctly, then explicitly specifying the CDF5 enabling option is now deprecated and will cause the current problem on 32-bit platforms.

I think the correct fix here is to remove all traces of the +cdf5 variant from the portfile. Allow the configure script to make its own decision. Also remove all attempts to explicitly enable or disable CDF5. I don't have time to try this myself right now. I will get to it eventually, if someone else does not take care of it.

Note: See TracTickets for help on using tickets.