Changes between Version 129 and Version 130 of FAQ


Ignore:
Timestamp:
Feb 27, 2014, 12:49:06 AM (11 years ago)
Author:
geekosaur
Comment:

generalization of a macports-users response explaining the new rather common question about llvm 3.5 not working on 10.8- / llvm 3.3- not working on 10.9

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v129 v130  
    250250MacPorts does '''not''' split up its development headers into separate packages like some Linux distributions do. Instead, in MacPorts, "`-devel`" versions tend to be pre-release (i.e. alpha or beta) versions of the main package.
    251251
     252=== Why am I getting an error about the wrong C++ runtime or `libc++` or `libstdc++`? === #libcpp
     253Apple ships `g++` based on the old `libstdc++` runtime in pre-5.x versions of Xcode and on pre-10.9 OS X. Starting with Xcode 5 and OS X 10.9, Apple is using `clang` and its C++11 compliant `libc++`. The C++11 runtime is not compatible with the older C++ runtime.
     254
     255It is entirely possible to build the C++11 runtime on pre-10.9 by itself. The problem is that it is never by itself; it exists in an ecosystem whose contents are defined by Apple. On 10.8 and earlier that ecosystem is not C++11, and while you can build a C++11 ecosystem of your own it is not compatible with anything else. In particular it is not compatible with any C++ libraries provided by Apple as part of the base system or Xcode, and if you ever try to use an Apple-compatible C++ library with it you will get link errors or possibly crashes.
     256
     257After playing whack-a-mole for a while trying to get stuff to coexist, MacPorts has given up and acknowledged that the only thing that works reliably is to go with what is compatible with Apple libraries; that means only older LLVM/`clang` that uses pre-C++11 interfaces (provided by `libstdc++` or an Apple-sourced compatible `libc++`) on 10.8 and earlier and only newer LLVM/`clang` that uses C++11 interfaces (provided by modern `libc++` but not the `libc++` shipped on older OS X) on 10.9 and layer. Any other combination ''might'' work if you are lucky, but is not guaranteed in any way and has led to many port build failures, and MacPorts no longer attempts to support it.
     258
    252259== Portfile Development and Maintenance Questions ==
    253260