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

cmake.c++20.test fails in the Docker container in both bazel versions 3.2.0 and 3.3.0. #148

Closed
erichsueh3 opened this issue Jul 1, 2020 · 11 comments
Assignees
Labels

Comments

@erichsueh3
Copy link
Contributor

Is your feature request related to a problem?
Running the CI tests through GitHub actions results in all tests passing successfully. However, running the CI tests manually in the Docker container through terminal results in multiple CMake errors throughout all CMakeLists.txt in the repository caused by the cmake.c++20.test. The error produced reads "CXX_STANDARD is set to invalid value '20'". This error happens in both bazel version 3.2.0 and bazel version 3.3.0.

Describe the solution you'd like
The readme should inform readers on how to run the CI tests on GitHub Actions, instead of informing readers on how to run the CI tests manually through the Docker container.

Describe alternatives you've considered
Alternatively, a note can be put into the readme that describes the issue with running the cmake.c++20.test manually, and how it passes when run through GitHub Actions.

@pyohannes
Copy link
Contributor

This requires updating our CI Dockerfile with a compiler supporting C++20. the ubuntu:20.04 image provides gcc version supporting C++20, however there's no gcc-4.8 package for this Ubuntu version.

What I would recommend:

  • Adding a separate Dockerfile based on ubuntu:20.04.
  • Provide an option in run_ci.sh to switch between those images.

Alternatively, we might set up a Dockerfile based on ubuntu:20.04 that compiles and installs gcc-4.8 from source, but I think that's not worth the effort.

@pyohannes pyohannes added the good first issue Good for newcomers label Jul 1, 2020
@maxgolov
Copy link
Contributor

maxgolov commented Jul 2, 2020

You can use matrix build to build on older Ubuntu and 20.40. Example how I'm doing it in my fork to verify some ongoing C++20 work: https://github.com/maxgolov/opentelemetry-cpp/blob/master/.github/workflows/build-ubuntu.yml

@dabangarang
Copy link

Would I be able to be assigned to implement this alongside my supervisor @alolita ?

@dabangarang
Copy link

dabangarang commented Jul 13, 2020

Hi, just running into a few roadblocks regarding this issue:

  • In my forked repo, even though I change the Dockerfile to use 20.04, the testing fails with the same errors. Do I have to change other aspects of the Dockerfile or other bash script files for this process to run smoothly? (ie. where would I change the gcc version package, or is that already a part of the new Docker image? Or would I also have to create an install_gcc(supported version).sh and add that to the ci build pipeline?)
  • If I were to take the first approach and create a second Dockerfile, where would this 20.04 dockerfile be located? Only 1 dockerfile can exist in a single folder, if I'm not mistaken. and if so, what would be the input that specifies using 18.04 as opposed to 20.04? Would it just be for this test and nothing else?)
    -If I take the second (Max's) approach, where does that yaml file get called aside from pushes and pulls? If I am hoping to run the test on my computer whenever, where would I add the option for ubuntu 20.04, and all the other necessary components needed for the c++20 testing to work, in the ci folder?
    @pyohannes @maxgolov
    My apologies in advance for the confusion.

@pyohannes
Copy link
Contributor

Make sure to install g++-10, which provides latest support for C++20 and supports the -std=c++20 flag.

@TomRoSystems
Copy link
Member

Is this issue still relevant after merging #504 ?

@lalitb
Copy link
Member

lalitb commented Jan 25, 2021

Is this issue still relevant after merging #504 ?

Seems so - #211 was supposed to provide fix ( Dockerfile with having C++20 compiler ).

@github-actions
Copy link

github-actions bot commented Dec 4, 2021

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

@github-actions github-actions bot added the Stale label Dec 4, 2021
@lalitb lalitb removed the Stale label Dec 4, 2021
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

@github-actions github-actions bot added the Stale label Feb 3, 2022
@lalitb lalitb added do-not-stale and removed Stale labels Feb 3, 2022
@github-actions
Copy link

github-actions bot commented Apr 4, 2022

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

@github-actions github-actions bot added Stale and removed Stale labels Apr 4, 2022
@marcalff
Copy link
Member

This issue is almost 3 years old now, and a lot of things have changed in the code and CI since then.

Closing.

Please reopen if the issue is still valid, and provide logs of the failure seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants