Changing default cxx_stdlib to libc++

Joshua Root jmr at macports.org
Fri Mar 9 14:18:48 UTC 2018


On 2018-3-9 11:27 , Ryan Schmidt wrote:
> 
> When would we run this script to delete libstdc++ archives? Presumably, after all legacy users have MacPorts 2.5 and have switched to libc++. When is that? Certainly no sooner than two weeks after release since that's how long it takes MacPorts to prompt a user to selfupdate. Do all users follow that prompt right away? The prompt goes away if you sync rather than selfupdate, right? Due to the length of time between MacPorts releases, users may be in the habit of running sync rather than selfupdate, since sync is faster. It may be some time before all users actually upgrade to 2.5.

Sure. We could release a version that records and checks the stdlib and
save the actual changeover for a later version. Don't want to wait too
long though.

I imagine we'd run the script once right before we release the base
version that changes the cxx_stdlib default value, then do the release,
turn off the legacy builders, turn on the new ones, and run the script
again just to get any ports that got built in between.

> How will users upgrade from libstdc++ to libc++?

The default value of cxx_stdlib will simply change with a base release.
We'll want to announce the changeover well in advance of that release,
and have prominent notices shown (to tell users who followed
LibcxxOnOlderSystems that they can return to 'buildfromsource ifneeded'
among other things).

> What subset of the instructions on the LibcxxOnOlderSystems page would they have to follow?

None of them, hopefully.

We may have to create some bootstrap versions of toolchain ports in
order to achieve this, so that they can be automatically installed as
dependencies with no manual intervention. I'm hoping someone more
familiar with building a C++11 toolchain on these old OS versions will
chime in.

> What if they don't do that and stay on libstdc++?
They would have to specifically set cxx_stdlib in macports.conf in order
to do that. If they do, it will work fine. They may want to set
'buildfromsource always' to prevent useless downloading of C++ ports.

> This strategy means we won't have any libc++ archives available for legacy users when they switch over. It will take us time to build them. If we changed the archive name and/or directory they're in, we could build libc++ archives in advance and have them ready for users when they switch.

Well, to be fair, users who followed LibcxxOnOlderSystems get no
binaries right now (and users on libstdc++ get no C++11 ports, binary or
otherwise). We could turn on the non-legacy builders early but not
deploy the archives, or deploy them somewhere else and then move them?

- Josh


More information about the macports-dev mailing list