Opened 6 years ago

Last modified 3 years ago

#57590 assigned defect

py-fiona @1.7.13: fatal error: 'type_traits' file not found

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: lion mountainlion Cc: cooljeanius (Eric Gallager)
Port: py-fiona

Description

py-fiona fails to build on 10.7 and 10.8:

/opt/local/bin/clang-mp-5.0 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c fiona/_transform.cpp -o build/temp.macosx-10.7-x86_64-2.7/fiona/_transform.o -std=c++11
In file included from fiona/_transform.cpp:609:
/opt/local/include/cpl_conv.h:372:10: fatal error: 'type_traits' file not found
#include <type_traits> // for std::is_base_of
         ^~~~~~~~~~~~~
1 error generated.
error: command '/opt/local/bin/clang-mp-5.0' failed with exit status 1

Since the port requires C++11, it needs to include the cxx11 1.1 portgroup. But that's not enough, because you'll notice it is compiling C++ code using the C compiler, and MacPorts doesn't supply C++ flags to a C compiler. This appears to be because unfortunately distutils doesn't really support C++ software at all. There is a 13-year-old upstream bug report about that, with a patch, but I guess the python developers don't care.

So somehow the CXXFLAGS will need to be given to the C compiler to make this work.

Change History (1)

comment:1 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.