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

install-deps: fix centos 8's use of gcc-toolset-11 #47548

Merged
merged 4 commits into from Aug 11, 2022

Conversation

cbodley
Copy link
Contributor

@cbodley cbodley commented Aug 10, 2022

removed steps to install the centos-release-scl packages. this was accidentally resurrected in 65b1a13

updated the gcc version detection and error message to reflect the gcc-toolset-11 packages installed from ceph.spec.in:

Your GCC is too old. Please run following command to add DTS to your environment:

scl enable gcc-toolset-11 bash

Or add following line to the end of ~/.bashrc to add it permanently:

source scl_source enable gcc-toolset-11

Fixes: https://tracker.ceph.com/issues/57073

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

Copy link
Contributor

@ljflores ljflores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install-deps.sh completes for me now!

I am seeing another issue now though, after installing dependencies and rerunning ./do_cmake.sh:

-- Performing Test HAVE_LIBATOMIC - Failed
CMake Error at cmake/modules/CheckCxxAtomic.cmake:66 (message):
  Host compiler /opt/rh/gcc-toolset-11/root/usr/bin/g++ requires libatomic,
  but it is not found
Call Stack (most recent call first):
  CMakeLists.txt:146 (include)


-- Configuring incomplete, errors occurred!
See also "/home/lflores/ceph/build/CMakeFiles/CMakeOutput.log".
See also "/home/lflores/ceph/build/CMakeFiles/CMakeError.log".
+ exit 1

Previously, I ran into this error message and fixed it by manually installing libatomic (I currently have libatomic-8.5.0-15.el8.x86_64 installed), but we may need a higher version now to get cmake to work.

Edit: Fixed it by installing gcc-toolset-11-libatomic-devel.

install-deps.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@ljflores ljflores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that I have gotten this to compile! The main thing that needs to be added is gcc-toolset-11-libatomic-devel. And I had a suggestion to make the warning message clearer for developers.

Signed-off-by: Casey Bodley <cbodley@redhat.com>
match the toolset versions installed from ceph.spec.in

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley
Copy link
Contributor Author

cbodley commented Aug 10, 2022

The main thing that needs to be added is gcc-toolset-11-libatomic-devel.

odd, i do see that package named by ceph.spec.in, but its conditional on aarch64: https://github.com/ceph/ceph/blob/0c3f63f9/ceph.spec.in#L212-L214

on x86_64 i'm able to run cmake to completion without that packaged installed

edit: oops, after scl enable i do see that cmake failure

otherwise after enabling gcc-toolset-11, cmake fails with:

- Performing Test HAVE_LIBATOMIC - Failed
CMake Error at cmake/modules/CheckCxxAtomic.cmake:66 (message):
  Host compiler /opt/rh/gcc-toolset-11/root/usr/bin/g++ requires libatomic,
  but it is not found

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@tchaikov tchaikov merged commit ee8ccbf into ceph:main Aug 11, 2022
@tchaikov
Copy link
Contributor

@ljflores @markhpc hi Laura and Mark, i am merging this changeset without your blessings, as it should decrease the chaos level caused by the C++20 and <=> changes.

@ljflores
Copy link
Contributor

@tchaikov I didn't test it after Casey pushed new changes, but it worked for me initially. @markhpc let us know if you see anything off.

@cbodley cbodley deleted the wip-57073 branch August 11, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants