boost libstdc++ issue (was libvisio error)

su_v suv at sunrise.ch
Sun Sep 6 03:40:09 PDT 2015


On 2015-09-05 17:40 (+0200), David Evans wrote:
> On 9/5/15 8:36 AM, David Evans wrote:
>> On 9/5/15 7:41 AM, echothevoid wrote:
>>> Hello!
>>>
>>> I  got an error after running regular sudo port upgrade outdatedcommand.
>>> The log tells me that:
>>> :info:build /opt/local/include/boost/thread/detail/move.hpp:31:10: fatal error: 'type_traits' file not found
>>> I have found a similar issue on: http://stackoverflow.com/questions/14104298/clang-boostspirit-and-c11 but do not know
>>> how to fix it in the macport's way.
>>> I am using 10.7.5 Lion, with Xcode version 4.6.3.
>>> The outcome of: 
>>> port installed | grep gcc
>>>   gcc49 @4.9.3_0 (active)
>>>   gcc_select @0.1_8 (active)
>>>   libgcc @5.2.0_0 (active)
>>>
>>> Can you suggest a newbie like me what to do next? 
>>>
>>> Many thanks,
>>> void
>>>
>>>
>>
>> As indicated in your stackoverflow.com reference, this is not a problem with libvisio per se but a problem with boost
>> when using libstdc++ (default c++ lib on Mac OS X earlier than 10.9).  This builds correctly on 10.9+ where libc++ is
>> the default.
>>
>> Now that trac is back up, suggest you file a ticket against boost including the information included in this message and
>> attach your log file there as well.  Don't forget to CC the boost maintainer.  He will probably want to file a bug
>> report upstream with the boost developers.
>>
>> port info --maintainer boost
>>
>> CCing the boost maintainer now for his info.
> 
> Changing the subject.  Problem is when building with libstdc++.

Didn't find a related ticket in trac yet, so I'm posting this here:
Workaround applied successfully on OS X 10.7.5 (Xcode 4.6.3) to libvisio
and libcdr in local port repo [1]:

if {${configure.cxx_stdlib} eq "libstdc++"} {
    configure.cppflags-append "-DBOOST_NO_CXX11_RVALUE_REFERENCES"
}

I do not know whether this is a "correct" solution - local tests however
confirmed so far that the results are as expected. Applied, successfully
compiled, installed and tested with libvisio (git master) as well as
libcdr (git master) on Lion: the command line tools of the libraries
produce expected results, and import in Inkscape using the shared
libaries also works (apart from a known regression in inkscape trunk
with CDR import not related to the recent boost upgrade).


Regards, V


[1] local portfiles (libvisio-devel, libcdr-devel):
http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-osx-build-env/view/head:/ports/graphics/libvisio-devel/Portfile#L75
http://bazaar.launchpad.net/~suv-lp/+junk/inkscape-osx-build-env/view/head:/ports/graphics/libcdr-devel/Portfile#L71


More information about the macports-users mailing list