Skip to content

gperf: fix build with clang 16#235120

Merged
trofi merged 1 commit intoNixOS:stagingfrom
reckenrode:gperf-clang-fix
May 31, 2023
Merged

gperf: fix build with clang 16#235120
trofi merged 1 commit intoNixOS:stagingfrom
reckenrode:gperf-clang-fix

Conversation

@reckenrode
Copy link
Copy Markdown
Contributor

Description of changes

Clang 16 defaults to C++17, which does not allow the register storage class specifier. This is fixed upstream, but the change doesn’t apply cleanly to the 3.1 release. Fortunately, the fix is trivial (remove the disallowed keyword).

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Clang 16 defaults to C++17, which does not allow the `register` storage
class specifier. This is fixed upstream, but the change doesn’t apply
cleanly to the 3.1 release. Fortunately, the fix is trivial (remove the
disallowed keyword).
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels May 31, 2023
Copy link
Copy Markdown
Contributor

@trofi trofi left a comment

Choose a reason for hiding this comment

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

LGTM. Another option is to update to 3.2 which should contain the same fix: https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commitdiff;h=a63b830554920476881837eeacd4a6b507632b19

@reckenrode
Copy link
Copy Markdown
Contributor Author

I see the commit, but has there been an official release? There isn’t a v3.2 tag or tarballs.

@trofi
Copy link
Copy Markdown
Contributor

trofi commented May 31, 2023

Ah, good point. I though that https://git.savannah.gnu.org/gitweb/?p=gperf.git;a=commitdiff;h=6d53a2dbe0ad692d0f36fd394b7e1962d9a81730 implied there is a proper release. My apologies.

UPDATE: related upstream bug: https://savannah.gnu.org/bugs/?62139

@trofi trofi merged commit 421a6f3 into NixOS:staging May 31, 2023
@reckenrode reckenrode deleted the gperf-clang-fix branch June 1, 2023 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants