boost libstdc++ issue (was libvisio error)

Jeffrey Walton noloader at
Mon Sep 7 01:23:43 PDT 2015

> According to your results for the clang++ case the configuration used
> was
>> //  Use this file to define a site and compiler specific
>> //  configuration policy, this version was auto-generated by
>> //  configure on Sun Sep  6 22:42:41 CEST 2015
>> //  With the following options:
>> //    CXX      = clang++
>> //    CXXFLAGS = -I./../.. -I./../../libs/config/test -g -O2 -DBOOST_NO_CONFIG
>> //    LDFLAGS  =
>> //    LIBS     = -lm -lpthread
>> //
> This seems ambiguous as to which library is being used libc++ or libstdc++.
> I wonder if you could run the clang++ test again first with -stdlib=libstdc++ appended to configure's own CXXFLAGS
> as MacPorts does in the libvisio case and secondly with -stdlib=libc++ to see if that makes any difference.
As far as I know after talking with the LLVM and GCC folks, the way to
reliably test for '-stdlib=libc++' or '-stdlib=libstdc++' is to
#include a C++ header, and then check for  __GLIBCXX__ (GNU and
'-stdlib=libstdc++'). I don't recall what to check for on an LLVM
system, but you should be able to find it throw one of Marshal Clow's
blog posts.

On a LLVM system, #include <ciso646>. On a GNU system, #include <c++config.h>.

Also see


More information about the macports-users mailing list