Opened 7 years ago

Closed 7 years ago

#54433 closed defect (fixed)

gdal @2.2.1 +expat+gcc6+hdf4+hdf5+netcdf+openmpi fails to install on SnowLeopard

Reported by: gnw3 Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: snowleopard Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: gdal

Description

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.

Change History (4)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: vince@… removed
Keywords: snowleopard added
Owner: set to Veence
Status: newassigned

comment:2 Changed 7 years ago by Veence (Vincent)

Sorry, I'm late on this. Going to do what's necessary in the following days. Thanks for your patience

comment:3 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:4 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

In 1b9e02f535311169fd671b0ef6b9ce2b0b4ec6b3/macports-ports:

gdal: update version 2.2.1->2.2.3

Fixes #54647
Fixes #55083
Fixes #54433

Note: See TracTickets for help on using tickets.