Bug #4186
closedTravis-CI Linux builds broken due to Python version mismatch
100%
Description
Looks like some python or waf issue.
https://travis-ci.org/named-data/ndn-cxx/builds/253363506
https://travis-ci.org/named-data/NFD/builds/252961042
Travis have recently upgraded the Ubuntu Trusty stack that we use, see https://docs.travis-ci.com/user/build-environment-updates/2017-07-12
In particular, "switch language: generic
from connie
stack to sugilite
stack" applies to our builds, and may be the cause of the failure.
Updated by Davide Pesavento over 7 years ago
- Subject changed from Travis-CI broken (again) to Travis-CI Linux builds broken (again)
Updated by Junxiao Shi over 7 years ago
- Related to Bug #2406: Incorrect dependency calculation for version.hpp added
Updated by Davide Pesavento over 7 years ago
- Related to deleted (Bug #2406: Incorrect dependency calculation for version.hpp)
Updated by Davide Pesavento over 7 years ago
- Status changed from New to In Progress
The cause is a python version mismatch between root and the regular user.
$ echo $PATH
/home/travis/bin:/home/travis/.local/bin:/home/travis/.rvm/gems/ruby-2.4.1/bin:/home/travis/.rvm/gems/ruby-2.4.1@global/bin:/home/travis/.rvm/rubies/ruby-2.4.1/bin:/home/travis/.pyenv/shims:/home/travis/.phpenv/shims:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.7.4.linux.amd64/bin:/home/travis/.local/bin:/home/travis/.nvm/versions/node/v7.4.0/bin:/opt/pyenv/bin:/opt/python/2.7.13/bin:/opt/python/3.6.1/bin:/opt/python/3.3.6/bin:/opt/python/3.4.6/bin:/opt/python/3.5.3/bin:/opt/python/pypy2-5.6.0/bin:/usr/local/phantomjs/bin:/usr/local/phantomjs:/home/travis/perl5/perlbrew/bin:/usr/local/neo4j-3.2.1/bin:/home/travis/.kiex/elixirs/elixir-1.0.4/bin:/home/travis/.kiex/bin:/usr/local/clang-3.5.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/travis/.phpenv/bin:/opt/ghc/bin:/home/travis/.rvm/bin
$ python --version
Python 2.7.13
$ sudo bash -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
$ sudo python --version
Python 2.7.6
Updated by Junxiao Shi over 7 years ago
- Related to Bug #2406: Incorrect dependency calculation for version.hpp added
Updated by Junxiao Shi over 7 years ago
Please do not revert changes without first asking and waiting for a 5-day period.
What's the connection with #2406?
The error message in ndn-cxx build is exactly the same.
Updated by Davide Pesavento over 7 years ago
Junxiao Shi wrote:
The error message in ndn-cxx build is exactly the same.
So what? it's a standard python error message. The scenario and the cause are completely different.
Updated by Davide Pesavento over 7 years ago
- Related to deleted (Bug #2406: Incorrect dependency calculation for version.hpp)
Updated by Davide Pesavento over 7 years ago
One possible solution (verified on Travis) is to manually restore PATH before executing python. That is, instead of sudo ./waf
we use:
sudo env "PATH=$PATH" ./waf
This requires changing the jenkins scripts. Would it be acceptable? Other ideas?
Updated by Davide Pesavento over 7 years ago
Davide Pesavento wrote:
One possible solution (verified on Travis) is to manually restore PATH before executing python. That is, instead of
sudo ./waf
we use:sudo env "PATH=$PATH" ./waf
This requires changing the jenkins scripts. Would it be acceptable? Other ideas?
@Alex, are you ok with this?
Updated by Junxiao Shi over 7 years ago
This is caused by travis-ci issue 5326 and affects ndn-cxx-breaks as well.
ndn-cxx-breaks has adopted a workardound that uses system default Python for both non-sudo and sudo, which only involves changes in .travis.yml
.
I recommend using the same workaround for ndn-cxx, NFD, ndn-tools, NLSR, and repo-ng.
Updated by Junxiao Shi over 7 years ago
One possible solution (verified on Travis) is to manually restore PATH before executing python.
I disagree with this solution because note-14 solution is less intrusive.
Updated by Davide Pesavento over 7 years ago
Junxiao Shi wrote:
This is caused by travis-ci issue 5326
It's an unusual configuration, but I'd argue that it's not a travis bug. You can't assume that sudo PATH and non-sudo PATH are the same.
I disagree with this solution because note-14 solution is less intrusive.
"note-14 solution" is not a solution.
Updated by Junxiao Shi over 7 years ago
- Subject changed from Travis-CI Linux builds broken (again) to Travis-CI Linux builds broken due to Python version mismatch
20170809 approves note-10 solution.
I have no objection.
This shall be applied to all affected projects including but not limited to ndn-cxx, NFD, ndn-tools, and NLSR.
Updated by Davide Pesavento about 7 years ago
- Status changed from In Progress to Closed
- % Done changed from 60 to 100
Patches for ndn-cxx, NFD, ndn-tools, NLSR have been merged.