Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TRAVIS] fix DEVEL_BUILD #157

Merged
merged 10 commits into from
Dec 9, 2018
Merged

[TRAVIS] fix DEVEL_BUILD #157

merged 10 commits into from
Dec 9, 2018

Conversation

KrisThielemans
Copy link
Member

required for recent Gadgetron

required for recent Gadgetron
@KrisThielemans
Copy link
Member Author

@casperdcl how do we switch the docker devel build to use gcc6?

@KrisThielemans
Copy link
Member Author

something wrong in our Travis file as it ignores the CC=gcc-6 settings. Checking a log I find

$ export EXTRA_BUILD_FLAGS="-DDEVEL_BUILD=ON -DUSE_SYSTEM_Boost=OFF -DUSE_SYSTEM_FFTW3=OFF -DUSE_SYSTEM_HDF5=OFF -DUSE_SYSTEM_SWIG=OFF"
$ export CC=gcc-6
$ export CXX=g++-6
$ export PYMVER=2

$ export TRAVIS_COMPILER=g++
$ export CXX=g++
$ export CXX_FOR_BUILD=g++
$ export CC=gcc
$ export CC_FOR_BUILD=gcc

Anyone? @casperdcl ?

@paskino
Copy link
Contributor

paskino commented Dec 6, 2018

I used to set CMAKE_CXX_COMPILER and CMAKE_C_COMPILER variables issuing CMake on our cluster to get it pick the right compiler.

@paskino
Copy link
Contributor

paskino commented Dec 6, 2018

First, I don't find where this variables are set.

However in the .travis.yml I see

addons:
      apt:
        sources:
         - ubuntu-toolchain-r-test
        packages:
            - g++-6

which seems to imply that we install the g++-6 package from ubuntu-toolchain-r-test. I do not find that package at their website, only gcc-6. Maybe I'm totally wrong.

At any rate the gcc-6 package does not contain a binary g++-6.

@paskino
Copy link
Contributor

paskino commented Dec 6, 2018

On my 16.04 VM

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-cache search g++-6

> clang-6.0 - C, C++ and Objective-C compiler
> clang-6.0-doc - C, C++ and Objective-C compiler - Documentation
> clang-6.0-examples - Clang examples
> libclang-6.0-dev - clang library - Development package
> python-clang-6.0 - Clang Python Bindings

@KrisThielemans
Copy link
Member Author

I have no idea about the toolchain-r, but g++-6 is installed ok. we can even get g++-8 there. you can see it in the log (link above).

The problem is just the setting of the environment variables in Travis. we set them for each configuration (e.g. here, as the compilers are different for each config. That's ok as you can see in the log and my quote in the first post. However, then Travis overrides them with something else, presumably because of how our yml file is. (We needed to set the config to python to get that side to work).

@KrisThielemans
Copy link
Member Author

@paskino, please revert this /82b09356a52acafd75bb6333a141b8f9bfbe4146 commit.

NOT all configs use gcc6. we will want to be able to use different compilers.

Also, using the CMake flags doesn't transport to boost, fftw etc, see #14.

@paskino
Copy link
Contributor

paskino commented Dec 6, 2018

Of course, but how would I check if the changes work?

@KrisThielemans
Copy link
Member Author

how would I check if the changes work?
the issue is not if the code compiles with gcc6 (we're quite confident that it does). The question is how to convince travis to set the right env variables or whatever

Have a look at travis-ci/travis-ci#5293

Kris Thielemans added 6 commits December 8, 2018 20:19
Previously, CC and CXX were set via `env`. However, Travis overrides them afterwards with
its own compiler settings. Now set them via an intermediate variable and `eval` as in
https://docs.travis-ci.com/user/languages/cpp/#c11c11-and-beyond-and-toolchain-versioning
gcc-6 doesn't exist there, and gcc is a recent clang anyway
Now apparently required by Gadgetron (or a change in Ubuntu packaging?)
seems that if you add an "addon" in the matrix, the main one at the start gets
overriden, so install g++-6 all the time anyway.
@KrisThielemans KrisThielemans changed the title [TRAVIS] change DEVEL_BUILD compiler to gcc6 [TRAVIS] fix DEVEL_BUILD Dec 9, 2018
@KrisThielemans
Copy link
Member Author

remaining failures are due to a problem with Gadgetron master gadgetron/gadgetron#715

@KrisThielemans KrisThielemans merged commit b08a10b into master Dec 9, 2018
@KrisThielemans KrisThielemans deleted the travis_gcc6 branch December 9, 2018 00:39
KrisThielemans pushed a commit to SyneRBI/SIRF that referenced this pull request Dec 9, 2018
as in SyneRBI/SIRF-SuperBuild#157
- fix setting of compiler variables
- use gcc-7
- add libopenblas-dev and libatlas-base-dev
@casperdcl
Copy link
Member

just to note that only 2 docker images are built: standard and devel (ubuntu 16.04, gcc5)

see default flags here: https://github.com/CCPPETMR/SIRF-SuperBuild/blob/c3a2c065e3ff0358b8b2c3dbf9961268b2f03cc0/docker/Dockerfile#L78-L82

paskino pushed a commit to paskino/SIRF-SuperBuild that referenced this pull request Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants