New Gnome development libraries need C++11 compiler support
Hi All,
Time to revisit our old discussions about C++11 support (with some urgency). It seems that unstable versions of libsigc++ (as of version 2.4.1, I think) require the C++11 standard to be enabled by the compiler [1]. This is already causing build failures [2] so we need to act soon. Indeed, as suv points out in [2], many of the Gnome development libraries have switched over too.
As far as I recall, older versions of OS X do not have a compiler that supports C++11 fully, so we'd risk killing off support for these users if we enforce the C++11 standard in Inkscape.
Some options...
1. Add configuration tests to selectively enable C++11 only on systems with the new libraries... this could be complicated to maintain, though
2. Enforce C++11 builds, but forbid developers from using new features until they have been tested on a wide range of systems... I'm not sure how we'd enforce this once we've made it technically possible to build C++11 code
3. Enforce C++11 builds, and give developers "green light" to use new features. This is likely to cause problems for users of old OSes!
Best wishes,
AV
[1] https://git.gnome.org/browse/libsigc++2/commit/?id=5a6b8f21f83dfe0f64770196e... [2] https://bugs.launchpad.net/inkscape/+bug/1488079
Further thoughts about Option 2...
I suspect that once we make it technically possible to use C++11 features, they will eventually start to "creep" into new code even if we tell people not to use them. I don't think we could even put in any technical restrictions to force people not to use them, because that could potentially break header inclusions.
@suv - Do you know what the oldest version of OS X is that fully supports the C++11 standard?
AV
On 24 August 2015 at 14:36, Alex Valavanis <valavanisalex@...400...> wrote:
Hi All,
Time to revisit our old discussions about C++11 support (with some urgency). It seems that unstable versions of libsigc++ (as of version 2.4.1, I think) require the C++11 standard to be enabled by the compiler [1]. This is already causing build failures [2] so we need to act soon. Indeed, as suv points out in [2], many of the Gnome development libraries have switched over too.
As far as I recall, older versions of OS X do not have a compiler that supports C++11 fully, so we'd risk killing off support for these users if we enforce the C++11 standard in Inkscape.
Some options...
- Add configuration tests to selectively enable C++11 only on systems
with the new libraries... this could be complicated to maintain, though
- Enforce C++11 builds, but forbid developers from using new features
until they have been tested on a wide range of systems... I'm not sure how we'd enforce this once we've made it technically possible to build C++11 code
- Enforce C++11 builds, and give developers "green light" to use new
features. This is likely to cause problems for users of old OSes!
Best wishes,
AV
[1] https://git.gnome.org/browse/libsigc++2/commit/?id=5a6b8f21f83dfe0f64770196e... [2] https://bugs.launchpad.net/inkscape/+bug/1488079
On 2015-08-24 15:48 (+0200), Alex Valavanis wrote:
@suv - Do you know what the oldest version of OS X is that fully supports the C++11 standard?
AFAIK it is feasible with OS X 10.8 Mountain Lion (if switching C++ runtime to libc++); full native support came with OS X 10.9 Mavericks (libc++ is default):
The default C++ runtime on OS X 10.9 and later is libc++ which supports C++11 but on OS X 10.8 and earlier the default C++ runtime is a version of libstdc++ based on GCC 4.2.1 which does not support C++11.
On 2015-08-24 16:04 (+0200), su_v wrote:
On 2015-08-24 15:48 (+0200), Alex Valavanis wrote:
@suv - Do you know what the oldest version of OS X is that fully supports the C++11 standard?
AFAIK it is feasible with OS X 10.8 Mountain Lion (if switching C++ runtime to libc++); full native support came with OS X 10.9 Mavericks (libc++ is default):
The default C++ runtime on OS X 10.9 and later is libc++ which supports C++11 but on OS X 10.8 and earlier the default C++ runtime is a version of libstdc++ based on GCC 4.2.1 which does not support C++11.
Just to add - that last quote is from here: https://trac.macports.org/wiki/LibcxxOnOlderSystems which details how C++11 support could be enabled on older systems - there's no guarantee though that it works (any package might fail to compile for various reasons - recent example is ncurses 6.0 which fails to build on Lion if MacPorts was configured to use 'libc++' as default C++ runtime). Overall, the effort seems rather huge ((temporary) disk space requirements for llvm+clang, build times for multiple llvm ports and frequent updates) and is likely to break apart easily - without having full upstream support in MacPorts. It is also unknown whether (self-contained and relocatable) application bundles based on such a custom tool chain work without compatibility issues on other (newer) OS X versions.
participants (2)
-
Alex Valavanis
-
su_v