[MacPorts] #57615: p5-wx uses libc++ when it shouldn't, resulting in fatal error: 'tr1/type_traits' file not found

MacPorts noreply at macports.org
Fri Nov 16 12:08:10 UTC 2018


#57615: p5-wx uses libc++ when it shouldn't, resulting in fatal error:
'tr1/type_traits' file not found
-------------------------+----------------------
  Reporter:  ryandesign  |      Owner:  mojca
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  p5-wx       |
-------------------------+----------------------

Comment (by ryandesign):

 Replying to [comment:1 mojca]:
 > I need to check. Is this flag hardcoded in p5-wx sources?

 Yes.

 > Are you using the default installation or the one with `libc++` default?

 Whatever is default. The failure happened on the buildbot.

 > I just need to add that while I agree with you, the port absolutely
 needs to be compiled with the same `cxx_stdlib` as wxWidgets and this
 often gets pretty tricky, there are still issues with some Python ports
 and upstream told me to specify the compiler with `CXX=/path/to/clang
 -stdlib=libc++` if I want the python modules to be compiled correctly on
 `libc++` setups on older machines. (The port should not hardcode the
 stdlib flag in any case though.)

 I don't know which one needs to be used here. I just know that the output
 above seems to show that wxWidgets understands that it is running on a
 libstdc++ system, based on the use of tr1, and the error occurs because
 p5-wx is circumventing that and forcing libc++, which does not understand
 tr1.

 I've learned that python modules don't support C++. They compile C++ code
 using the C compiler, which is wrong and is why our cxx11 1.1 portgroup's
 work has no effect on most python modules. (There is a 13-year-old
 distutils bug about that.) Given that, it's surprising how many python
 modules use C++. I'm not sure if there's a good way to fix this in the
 python portgroup, since it's up to each port to know whether it is using
 the C compiler to compile C code (which should not get the -stdlib flag)
 or C++ code (which should). The situation basically sucks. Upstream python
 should resolve their distutils bug and we should backport it to all
 versions of python.

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


More information about the macports-tickets mailing list