Page MenuHomePhabricator

Upgrade to Travis environment able to build with C++14 requirement
Open, Needs TriagePublic

Description

D294 seeks to introduce a requirement for a C++14 compiler.

This does not work with current Travis definitions file - some adaptations are going to be needed there.

I've created an experimental branch on my repo at

https://github.com/ftrader-bitcoinabc/bitcoin-abc/commits/test_d294_require_cxx_14

Some trials will be performed there to see if the Travis setup can be bent into shape.

If the project direction is going to be to not use Travis, I would appreciate a heads up so that we can save effort, because almost certainly changes to Travis are going to have knock-on effects on its builds / tests.

Related Objects

Mentioned Here
D294: Use C++14

Event Timeline

According to Wikipedia:
GCC finished support for C++14 in GCC 5, and made C++14 the default C++ standard in GCC 6.

According to https://docs.travis-ci.com/user/languages/cpp/ , it is possible to upgrade the Trusty env to g++5 or g++6 .
My initial experiment would be to try g++6 first.

Well, following Travis' own advice about how to set up the sources and package name for gcc seems to get you this:

$ sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install g++6
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libzip-ocaml-dev:i386 : Depends: ocaml-nox-4.01.0:i386
E: Unable to correct problems, you have held broken packages.

ref. https://travis-ci.org/ftrader-bitcoinabc/bitcoin-abc/builds/249797393

I guess the next step will be to try g++5 ...

It doesn't seem to be getting any better by just asking for g++5 .

P11

Update:

With @sickpig 's assistance, we are as far as the Linux wallet job passing.
https://travis-ci.org/ftrader-bitcoinabc/bitcoin-abc/builds/250686535

The rest still have problems. For the ARM and Win builds, these are toolchain-related -- they pull in their own compiler packages which don't fall under the standard Travis procedures to get a newer-than-4.8 compiler.
So we have to manually take care of these if we want to go the Travis route and keep all of them.

This is a really silly typo: the correct package name is g++-6 (with a dash) rather than g++6 (without dash).