Opened 4 years ago
Last modified 4 years 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 Carsten 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)
Change History (6)
Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:1 Changed 4 years ago by Dave-Allured (Dave Allured)
comment:2 Changed 4 years ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
comment:3 Changed 4 years 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 4 years ago by tenomoto (Takeshi Enomoto)
I'm not sure why +cdf5 is appended with +universal and on i386.
comment:5 Changed 4 years 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.
Reported upstream: https://github.com/Unidata/netcdf-c/issues/1967