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

C++20 Support - Ubuntu 20 binary packages? #3724

Closed
timwoj opened this issue May 7, 2024 · 5 comments
Closed

C++20 Support - Ubuntu 20 binary packages? #3724

timwoj opened this issue May 7, 2024 · 5 comments
Labels
Implementation: Core Implementation requires modification of the Zeek core Priority: Low Type: Maintenance

Comments

@timwoj
Copy link
Contributor

timwoj commented May 7, 2024

I started working on this on a branch and I ran into a snag that requires some discussion. Since we dropped out CentOS7 and Debian 10, we're in a place where we could potentially upgrade to C++20. It's actually a minimal amount of changes required on the Zeek side just to get everything to build. I haven't tried really using any C++20 features yet, such as replacing our Span class with std::span. I've already updated the majority of the submodules, also with minimal changes. There's a build failure in Broker still that I haven't spent any time investigating, other than to note that it doesn't build.

The discussion point is that the version of compilers used by CentOS Stream 8 and Ubuntu 20 are still too low for a reasonable amount of C++20 support. CentOS isn't a real problem since that version is going EOL very soon (May 2024), and will be removed from our support matrix. Ubuntu 20 is a problem, because updating to a new compiler breaks OBS since we historically haven't been able to update the compiler used there. This breaks our ability to provide binary packages for Ubuntu 20. How huge of a deal is this? We've previously broken OBS builds for older versions of Ubuntu (16 and 18), as noted in our OS support matrix.

@timwoj timwoj added Priority: Low Type: Maintenance Implementation: Core Implementation requires modification of the Zeek core labels May 7, 2024
@timwoj timwoj changed the title C++20 Support C++20 Support - Ubuntu 20 binary packages? May 7, 2024
@timwoj
Copy link
Contributor Author

timwoj commented May 7, 2024

Tagging @0xxon because I imagine she has opinions on this.

@rsmmr
Copy link
Member

rsmmr commented May 8, 2024

High level comment: Not sure I'd recommend moving to C++20 right now honestly. I'm actually glad that we finally seem to have all compilers under enough control to not have to worry about C++17 features anymore (*). Moving on to C++20 now feels like opening another can of worms with the potential to once again spend many cycles on compiler triaging and work-arounds across platforms and compiler versions; including every time somebody starts using a new C++20 feature for the first time.

(*) Actually, not true: my recent attempt at using https://en.cppreference.com/w/cpp/memory/polymorphic_allocator didn't pass CI for lack of support in some compiler versions.

@timwoj
Copy link
Contributor Author

timwoj commented May 8, 2024

According to https://en.cppreference.com/w/cpp/compiler_support/17#C.2B.2B17_library_features:

Screenshot 2024-05-08 at 1 23 49 PM

On our current OS Support Matrix, CentOS Stream 8 still has GCC 8.3, FreeBSD has Clang 13, and two of our supported macOS versions are too old to have AppleClang 15.

@0xxon
Copy link
Member

0xxon commented May 15, 2024

I think I am with Robin. Unless there is a pressing need, I would just say that we should wait a bit more.

On a technical side - the reason that we broke Ubuntu support in the past was on the technical side (OBS couldn't compile it due to somewhat unspecified problems that we were unable to figure out). I am a bit hesitant to just do this because we feel like it. :)

@timwoj
Copy link
Contributor Author

timwoj commented May 16, 2024

Thanks for the thoughts everyone. I'm going to shelve this for now, and we can possibly discuss it in the future.

@timwoj timwoj closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation: Core Implementation requires modification of the Zeek core Priority: Low Type: Maintenance
Projects
None yet
Development

No branches or pull requests

3 participants