mapbox / mason

Cross platform package manager for C/C++ apps
BSD 2-Clause "Simplified" License
254 stars 69 forks source link

Targeting libstdc++-4.8-dev by default on linux #267

Open springmeyer opened 8 years ago

springmeyer commented 8 years ago

Currently we target libstdc++-5-dev by default while libstdc++-4.8-dev is the default on ubuntu precise. We are targeting libstdc++-5-dev because the clang++ 3.8 compiler we default to had a runtime dependency on latest libstdc++ as it was built against libstdc++-5-dev headers. That is no longer the case after https://github.com/mapbox/mason/issues/252.

So I think we should try to target the minimum libstdc++-dev package per C++ package rather than globally upgrading. Note: we can and should still upgrade the libstdc++ runtime library to the latest. There is no reason not to. But what I'm proposing is not by-default upgrading the g++ provided headers. It turns out that these are the determining factor for the minimum GLIBCXX version a given binary needs per investigations at https://github.com/springmeyer/glibcxx-symbol-versioning

Benefits of not upgrading to libstdc++-5-dev by default are:

TODO:

/cc @mapsam @jfirebaugh @kkaefer @tmpsantos

jfirebaugh commented 7 years ago

This makes complete sense to me for pure C packages.

For C++ packages, it's not so clear. #319 suggests that we may want to compile C++ packages using the C++11 libstdc++ ABI universally, to try to avoid the need for separate cxx03abi / cxx11abi package variants. I assume that would require libstdc++-5-dev.