multiple ports with stdlibc++ mismatches (all on 10.13)...
Joshua Root
jmr at macports.org
Thu May 31 22:36:42 UTC 2018
On 2018-6-1 07:24 , iEFdev wrote:
>
> I made a quick test on flac, adding:
>
> # flac is using libstdc++ (this installation is configured to use libc++)
> configure.cxx_stdlib libstdc++
>
> …and the rev-upgrade let it pass.
>
>> Please open tickets or better yet PRs for affected ports.
>>
>> - Josh
>
> Since I'm on an older system, with libcxx set in my config files -
> wouldn't a ticket be a better option in case this is a no-error? Perhaps
> it should be wrapped around a check for what macos version, etc?
>
> When searching I saw this one (non-related):
> https://lists.macports.org/pipermail/macports-dev/2015-April/030230.html
>
> So perhaps something like:
>
> if {[string equal ${configure.cxx_stdlib} "libc++"]} {
> configure.cxx_stdlib libstdc++
> }
>
> Would that be a better approach?
Unfortunately using a different stdlib than the system-wide choice is
not an option for flac, as it provides libFLAC++ which is used by other
things. All C++ programs need to be using the same stdlib as all the C++
libraries they use, so effectively all C++ libraries have to use the
system-wide stdlib (as set in macports.conf in your case, but it's
equally true if the stdlib was auto-selected based on the platform).
Programs that are written in C++ but don't use or export any C++
libraries can get away with using a different stdlib.
If you don't happen to have anything installed that uses libFLAC++, you
of course won't see the problems resulting from a stdlib mismatch there.
- Josh
More information about the macports-dev
mailing list