[MacPorts] #58270: netcdf @4.6.3 +dap +mpich +netcdf4 +universal: nc-config differs and cannot be merged

MacPorts noreply at macports.org
Thu Jun 13 21:40:26 UTC 2019


#58270: netcdf @4.6.3 +dap +mpich +netcdf4 +universal: nc-config differs and cannot
be merged
-------------------------+----------------------
  Reporter:  ryandesign  |      Owner:  tenomoto
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  netcdf      |
-------------------------+----------------------

Comment (by ryandesign):

 This problem still happens.

 Configure output from the x86_64 part says:
 {{{
 :info:configure CDF5 Support:           yes
 }}}

 Configure output from the i386 part says:
 {{{
 :info:configure CDF5 Support:           no
 }}}

 I happen to have the cdf @3.6.4_0 port installed, but not with the
 universal variant. (It doesn't have one.) And the default value of
 netcdf's cmake flag `-DENABLE_CDF5` is `AUTO`, so the x86_64 build of
 netcdf is opportunistically detecting cdf and using it, while the i386
 build of netcdf doesn't find cdf but continues on without it.

 In fact, netcdf's cmake files will only let you use cdf on 64-bit. If you
 try to use it on 32-bit, you get the error:

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

 So you have a decision:

 1. If you want netcdf to use cdf, you should add a dependency on cdf and
 use `-DENABLE_CDF5=ON` and increase the revision. Since this will only
 work on 64-bit, you would need to also set `supported_archs x86_64 ppc64`
 to exclude 32-bit architectures. Since there's more than one architecture
 MacPorts would still allow a universal variant, but it would be useless
 since that's not a set of architectures for which anybody is trying to
 build universal (people either build for i386 ppc on older systems or for
 i386 x86_64 on newer systems) so you'll probably want to delete the
 universal variant too, by setting `universal_variant no` and removing the
 inclusion of the muniversal portgroup and everything relaterd to it. And
 every port that depends on netcdf, and every port that depends on those
 ports, and so on, would need to remove its universal variant too.
 2. Or, if you want netcdf not to use cdf, you should use
 `-DENABLE_CDF5=OFF` and increase the revision, and then it can keep its
 universal variant and 32-bit support.

-- 
Ticket URL: <https://trac.macports.org/ticket/58270#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list