[MacPorts] #54433: gdal @2.2.1 +expat+gcc6+hdf4+hdf5+netcdf+openmpi fails to install on SnowLeopard
MacPorts
noreply at macports.org
Thu Jul 6 13:57:23 UTC 2017
#54433: gdal @2.2.1 +expat+gcc6+hdf4+hdf5+netcdf+openmpi fails to install on
SnowLeopard
--------------------+-------------------
Reporter: gnw3 | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Keywords: | Port: gdal
--------------------+-------------------
gdal @2.2.1 +expat+gcc6+hdf4+hdf5+netcdf+openmpi fails to install on
SnowLeopard. There are two issues. The first is the use of patches to
support compilers that lack recent feaures. These appear to have been
applied upstream for gdal 2.2.1, so will cause failures for any
SnowLeopard build. The second may only affect those using recent GCC
compliers and who require netcdf support.
{{{
DEBUG: MACOSX_DEPLOYMENT_TARGET='10.6'
Executing: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_github
.com_macports_macports-ports_gis_gdal/gdal/work/gdal-2.2.1" &&
/usr/bin/patch -p0 < '/opt/local/var/macports/sources/github.com/macports
/macports-ports/gis/gdal/files/patch-configure-isnan.diff'
DEBUG: system: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_github
.com_macports_macports-ports_gis_gdal/gdal/work/gdal-2.2.1" &&
/usr/bin/patch -p0 < '/opt/local/var/macports/sources/github.com/macports
/macports-ports/gis/gdal/files/patch-configure-isnan.diff'
patching file configure
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file configure.rej
Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_github
.com_macports_macports-ports_gis_gdal/gdal/work/gdal-2.2.1" &&
/usr/bin/patch -p0 < '/opt/local/var/macports/sources/github.com/macports
/macports-ports/gis/gdal/files/patch-configure-isnan.diff'
Exit code: 1
Error: Failed to patch gdal: command execution failed
}}}
This is one of three patches for systems that lack C++11 support. A
comment says the patches were backported from master, so I guess they are
already in gdal-2.2.1. After removing the patches, configure succeeds, but
the build fails with:
{{{
netcdfdataset.cpp: In static member function 'static double
netCDFDataset::rint(
double)':
netcdfdataset.cpp:4588:12: error: 'round' is not a member of 'std'
return std::round(dfX);
^~~
}}}
This problem may be specific to builds using newer GCC versions, and was
also in gdal-2.2.0. In netcdfdataset.cpp the above line is from the
following block:
{{
#ifdef HAVE_CXX11
double netCDFDataset::rint( double dfX )
{
return std::round(dfX);
}
#else
}}}
After editing this file to change {{{HAVE_CXX11}}} to
{{{NOT_HAVE_CXX11}}}. gdal-2.2.1 installed successfully here.
--
Ticket URL: <https://trac.macports.org/ticket/54433>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list