[MacPorts] FAQ modified

MacPorts noreply at macports.org
Wed Feb 26 16:49:08 PST 2014


Page "FAQ" was changed by allbery.b at gmail.com
Diff URL: <https://trac.macports.org/wiki/FAQ?action=diff&version=130>
Revision 130
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
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: FAQ
=========================================================================
--- FAQ (version: 129)
+++ FAQ (version: 130)
@@ -249,6 +249,13 @@
 === Why can't I install both the "`-devel`" and non-"`-devel`" versions of a package? === #develpackages
 MacPorts 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.
 
+=== Why am I getting an error about the wrong C++ runtime or `libc++` or `libstdc++`? === #libcpp
+Apple 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.
+
+It 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.
+
+After 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.
+
 == Portfile Development and Maintenance Questions ==
 
 === Is it possible to have a dependency on a specific variant of another port? E.g. "postgresql8 +server"? === #dependonvariant
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/FAQ>
MacPorts <http://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'FAQ' page.
If it was not you, please report to .


More information about the macports-changes mailing list