Skip to content

reenable ubuntu's toolchain ppa for c++20 support - #1971

Merged
tchaikov merged 3 commits into
ceph:mainfrom
cbodley:wip-cxx20
Aug 1, 2022
Merged

tchaikov merged 3 commits into
ceph:mainfrom
cbodley:wip-cxx20

Conversation

@cbodley

@cbodley cbodley commented Feb 28, 2022 •

Copy link
Copy Markdown
Contributor

we've used this repo in the past to get access to newer compiler versions. reenable it for ubuntu focal for access to gcc 11

note that these changes don't preserve the original behavior against old distros like trusty/xenial. if there is still interest in building against those releases, i can work through these differences:

trusty: PPA 7 -> 11
xenial: PPA 8 -> 11
bionic: does not use PPA (unchanged)

@cbodley cbodley mentioned this pull request Feb 28, 2022
1 task done
@cbodley

cbodley commented Feb 28, 2022

Copy link
Copy Markdown
Contributor Author

Comment thread scripts/build_utils.sh
bionic)
use_ppa=false;;
focal)
use_ppa=true;;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good to know; if that shows up, it will be immediately obvious from teuthology testing

Comment thread scripts/build_utils.sh Outdated
$SUDO yum-config-manager --enable centos-sclo-rh-testing
$SUDO dnf install -y centos-release-scl-rh
$SUDO dnf config-manager --disable centos-sclo-rh
$SUDO dnf config-manager --enable centos-sclo-rh-testing

@tchaikov tchaikov Mar 1, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

probably we don't need SCL for accessing GTS-11. see https://centos.pkgs.org/8-stream/centos-appstream-x86_64/gcc-toolset-11-gcc-c++-11.1.1-6.el8.x86_64.rpm.html

what we need is but to enable the "AppStream" repo. and

dnf install gcc-toolset-11-gcc-c++

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, thanks. i was being conservative by requiring gcc 10.2, but i can update ceph/ceph#45133 with BuildRequires: gcc-toolset-11-gcc-c++

does that mean ubuntu should use_ppa 11 to match?

i'm not familiar with AppStream, and grep didn't find anything under ceph or ceph-build; is that repo expected to be enabled by default, or do i need something extra here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

from earlier shaman builds of centos, i did see that it installed gcc-toolset-10-gcc-c++ correctly, but cmake still chose the old gcc The CXX compiler identification is GNU 8.5.0

so it does look like we need something here in ceph-build to change the default compiler

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah, i see that ceph.spec.in has . /opt/rh/gcc-toolset-9/enable for this, i'll make that unconditional and raise it to 11

@cbodley cbodley changed the title reenable ubuntu's toolchain ppa and centos' devtoolset for c++20 support reenable ubuntu's toolchain ppa for c++20 support Mar 1, 2022

@tchaikov tchaikov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm. need to keep an eye on the build status after merging this change though.

@tchaikov

tchaikov commented Mar 2, 2022

Copy link
Copy Markdown
Contributor

i also see some logic around the gcc toolset in https://github.com/ceph/ceph-build/blob/master/ceph-perf-pull-requests/config/definitions/ceph-perf-pull-requests.yml#L176-L182. shall i raise gcc_toolset_ver to 10 there?

would be great if you could. probably should point clang to gcc11 since we have gcc-11 here.

BTW, now that we have llvm-toolset-12 in the official repo, probably it's a good opportunity for us to ditch my personal copr repo and start using clang-12 from AppStream! but don't worry! as it's not in the scope of this change, i will take care of this. clang is being used by the ceph-pull-requests jenkins job for a better compile test for the tree.

i will implement this change this week end.

@cbodley

cbodley commented Mar 2, 2022

Copy link
Copy Markdown
Contributor Author

note that octopus doesn't build cleanly with gcc11, as discussed in backport pr ceph/ceph#45206 (comment). i'm not sure whether this affects pacific yet

we might need to hold off on this until we either resolve those build issues, or use an earlier version for octopus

@cbodley

cbodley commented Mar 3, 2022

Copy link
Copy Markdown
Contributor Author

i'm not sure whether this affects pacific yet

yes, pacific PRs are also failing in spdk on nodes that enabled gcc11 - ex. ceph/ceph#45245

@cbodley
cbodley force-pushed the wip-cxx20 branch 2 times, most recently from 295cab4 to 89b569d Compare April 6, 2022 23:10
@cbodley

cbodley commented Apr 6, 2022

Copy link
Copy Markdown
Contributor Author

yes, pacific PRs are also failing in spdk on nodes that enabled gcc11 - ex. ceph/ceph#45245

i updated use_ppa() so that it hopefully only applies to 'reef' and later, so we shouldn't see these failures against octopus/pacific/quincy

@djgalloway
djgalloway changed the base branch from master to main May 25, 2022 14:53
@tchaikov

Copy link
Copy Markdown
Contributor

@cbodley can we drop the "do-not-merge" label? i think it's ready to go.

Comment thread scripts/build_utils.sh Outdated
use_ppa=false;;
12.*)
# luminous
17.*) # q

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
17.*) # q
17.2*) # q

as reef is not tagged yet. the commits in main are all named something like v17.2.0-267-g8bae27e49f9,

$ git describe --tag
v17.2.0-267-g8bae27e49f9

and now that quincy is released, we are not likely to build for 17.1.x anymore. so 17.2* is a safe choice.

@tchaikov

tchaikov commented Jul 30, 2022 •

Copy link
Copy Markdown
Contributor

@cbodley

cbodley commented Aug 1, 2022

Copy link
Copy Markdown
Contributor Author

addressed review comment and removed the dnm

@tchaikov
tchaikov merged commit 0049e3f into ceph:main Aug 1, 2022
@cbodley

cbodley commented Aug 8, 2022

Copy link
Copy Markdown
Contributor Author

the use of WITH_STATIC_LIBSTDCXX in ubuntu builds is causing radosgw to crash on startup: https://tracker.ceph.com/issues/57050

@cbodley

cbodley commented Aug 8, 2022

Copy link
Copy Markdown
Contributor Author

looks like we can resolve it with ceph/ceph#47504

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.

2 participants