Opened 6 years ago
Closed 5 years ago
#58270 closed defect (fixed)
netcdf @4.7.0 +dap +mpich +netcdf4 +universal: nc-config differs and cannot be merged
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | tenomoto (Takeshi Enomoto) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | Dave-Allured (Dave Allured) | |
Port: | netcdf |
Description
netcdf doesn't build with the universal variant:
---> Computing dependencies for netcdf ---> Fetching archive for netcdf ---> Attempting to fetch netcdf-4.6.3_0+dap+mpich+netcdf4+universal.darwin_17.i386-x86_64.tbz2 from https://packages.macports.org/netcdf ---> Attempting to fetch netcdf-4.6.3_0+dap+mpich+netcdf4+universal.darwin_17.i386-x86_64.tbz2 from http://packages.internal.macports.net/:tbz2 http://packages-private.internal.macports.net/netcdf ---> Attempting to fetch netcdf-4.6.3_0+dap+mpich+netcdf4+universal.darwin_17.i386-x86_64.tbz2 from http://packages.internal.macports.net/netcdf ---> Fetching distfiles for netcdf ---> Attempting to fetch netcdf-c-4.6.3.tar.gz from https://distfiles.macports.org/netcdf ---> Verifying checksums for netcdf ---> Extracting netcdf ---> Applying patches to netcdf ---> Configuring netcdf ---> Building netcdf ---> Staging netcdf into destroot Error: Failed to destroot netcdf: nc-config differs in /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-ryandesign-fork_science_netcdf/netcdf/work/destroot-i386//opt/local/bin and /opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-ryandesign-fork_science_netcdf/netcdf/work/destroot-x86_64//opt/local/bin and cannot be merged Error: See /opt/local/var/macports/logs/_Users_rschmidt_macports_macports-ports-ryandesign-fork_science_netcdf/netcdf/main.log for details.
The difference between the two nc-config files is:
$ diff -u build-i386/tmp/nc-config build-x86_64/tmp/nc-config --- build-i386/tmp/nc-config 2019-03-29 13:43:48.000000000 -0500 +++ build-x86_64/tmp/nc-config 2019-03-29 13:43:00.000000000 -0500 @@ -78,7 +78,7 @@ has_szlib="yes" fi -has_cdf5="OFF" +has_cdf5="AUTO" if [ -z "$has_cdf5" -o "$has_cdf5" = "OFF" -o "$has_cdf5" = "FALSE" ]; then has_cdf5="no" else
Attachments (1)
Change History (7)
Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | main.log.bz2 added |
---|
comment:1 Changed 6 years ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
comment:2 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
- Or you could compromise: If cdf support is useful but you don't want to lose the universal variant or 32-bit support, you could enable cdf support only for 64-bit non-universal builds and disable it for other builds.
comment:4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
I was wrong about some of the specifics. The cdf port appears not to be involved after all: I deactivated the cdf port but I was still unable to build netcdf universal. Even using trace mode did not change the error. But using -DENABLE_CDF5=OFF
did work.
comment:5 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | netcdf @4.6.3 +dap +mpich +netcdf4 +universal: nc-config differs and cannot be merged → netcdf @4.7.0 +dap +mpich +netcdf4 +universal: nc-config differs and cannot be merged |
---|
Problem remains with 4.7.0.
comment:6 Changed 5 years ago by tenomoto (Takeshi Enomoto)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
This problem still happens.
Configure output from the x86_64 part says:
Configure output from the i386 part says:
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
isAUTO
, 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:
So you have a decision:
-DENABLE_CDF5=ON
and increase the revision. Since this will only work on 64-bit, you would need to also setsupported_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 settinguniversal_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.-DENABLE_CDF5=OFF
and increase the revision, and then it can keep its universal variant and 32-bit support.