[MacPorts] #57621: py-gdal build failure on libstdc++ systems

MacPorts noreply at macports.org
Tue Jun 16 18:14:36 UTC 2020


#57621: py-gdal build failure on libstdc++ systems
-------------------------+--------------------
  Reporter:  ryandesign  |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  py-gdal     |
-------------------------+--------------------

Comment (by ryandesign):

 Now that we are defaulting to libc++ on 10.6-10.8 py-gdal still can't
 build there for the same reason, since it's still compiling with clang
 (not clang++ like it should) and MacPorts CXXFLAGS (including `-stdlib`)
 aren't getting passed to the build.
 [https://build.macports.org/builders/ports-10.8_x86_64-builder/builds/16441/steps
 /install-dependencies/logs/stdio Here's a log of what that looks like]:

 {{{
 In file included from extensions/gdal_array_wrap.cpp:3144:
 In file included from /opt/local/include/gdal.h:49:
 /opt/local/include/cpl_minixml.h:205:37: error: unknown template name
 'unique_ptr'
 class CPLXMLTreeCloser: public std::unique_ptr<CPLXMLNode,
 CPLXMLTreeCloserDeleter>
                                     ^
 /opt/local/include/cpl_minixml.h:210:20: error: expected '(' or '{'
     std::unique_ptr<CPLXMLNode, CPLXMLTreeCloserDeleter>(data) {}
                    ^
 /opt/local/include/cpl_minixml.h:210:20: error: expected '{' or ','
 /usr/bin/clang -bundle -undefined dynamic_lookup -L/opt/local/lib
 -Wl,-headerpad_max_install_names -arch x86_64 -arch x86_64 -isysroot/
 build/temp.macosx-10.8-x86_64-3.8/extensions/gdalconst_wrap.o
 -L../../.libs -L../../ -L/opt/local/lib -lgdal -o
 build/lib.macosx-10.8-x86_64-3.8/osgeo/_gdalconst.cpython-38-darwin.so
 ld: warning: directory not found for option '-L../../.libs'
 In file included from extensions/gdal_array_wrap.cpp:3519:
 /opt/local/include/cpl_conv.h:366:10: fatal error: 'type_traits' file not
 found
 #include <type_traits> // for std::is_base_of
          ^
 extensions/ogr_wrap.cpp:4900:17: warning: will never be executed
 [-Wunreachable-code]
                 CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field
 subtype value");
                 ^~~~~~~~
 extensions/gdal_wrap.cpp:4658:14: warning: will never be executed
 [-Wunreachable-code]
   } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
              ^~~~~~~~~~~~~~
 extensions/gdal_wrap.cpp:5635:12: warning: will never be executed
 [-Wunreachable-code]
     return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long
 long >(value));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 extensions/gdal_wrap.cpp:7610:16: error: no member named 'emplace_back' in
 'std::vector<ErrorStruct, std::allocator<ErrorStruct> >'
     paoErrors->emplace_back(eErr, no, msg);
     ~~~~~~~~~  ^
 extensions/gdal_wrap.cpp:8997:17: warning: 'PyObject_AsReadBuffer' is
 deprecated [-Wdeprecated-declarations]
       int res = PyObject_AsReadBuffer(obj0, &safeBuf, &safeLen);
                 ^
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/abstract.h:337:17:
 note: 'PyObject_AsReadBuffer' declared here
 PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj,
                 ^
 extensions/gdal_wrap.cpp:10317:17: warning: 'PyObject_AsReadBuffer' is
 deprecated [-Wdeprecated-declarations]
       int res = PyObject_AsReadBuffer(obj0, &safeBuf, &safeLen);
                 ^
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/abstract.h:337:17:
 note: 'PyObject_AsReadBuffer' declared here
 PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj,
                 ^
 extensions/gdal_wrap.cpp:12761:17: warning: 'PyObject_AsReadBuffer' is
 deprecated [-Wdeprecated-declarations]
       int res = PyObject_AsReadBuffer(obj0, &safeBuf, &safeLen);
                 ^
 /opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/abstract.h:337:17:
 note: 'PyObject_AsReadBuffer' declared here
 PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj,
                 ^
 3 warnings and 4 errors generated.
 }}}

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


More information about the macports-tickets mailing list