Dual g++ ABI in libraries --- how to handle it?

Lawrence Velázquez larryv at macports.org
Mon Oct 3 19:55:28 PDT 2016


> On Oct 3, 2016, at 10:42 PM, Brandon Allbery <allbery.b at gmail.com>
> wrote:
> 
>> On Mon, Oct 3, 2016 at 10:35 PM, Alexander Gaenko <galexv at umich.edu>
>> wrote:
>> 
>> This situation could be remedied by using Boost variant compiled
>> with the "new" ABI --- however, there seems to be no such variant in
>> the Boost port.
> 
> What OS X / macOS version? Boost should build with whatever the
> default C++ ABI is, which will be pre-C++11 on 10.8 and older; see
> https://trac.macports.org/wiki/LibcxxOnOlderSystems for how to change
> this (it is much, much more involved than just rebuilding boost ---
> changing C++ ABI is not trivial at all, and it is all or nothing ---
> otherwise nothing can trust any other libraries to be compatible).

Furthermore, Boost (and all other MacPorts C++ software) uses the system
C++ runtime, while anything compiled with g++ from the gcc* ports uses
the C++ runtime from the libgcc port. For this reason, we strongly
discourage (one could say "ban") the use of gcc* for C++ ports.

vq


More information about the macports-dev mailing list