Skip to content

doctest: fix build with clang 16#243547

Merged
Artturin merged 1 commit intoNixOS:masterfrom
reckenrode:doctest-clang16
Aug 3, 2023
Merged

doctest: fix build with clang 16#243547
Artturin merged 1 commit intoNixOS:masterfrom
reckenrode:doctest-clang16

Conversation

@reckenrode
Copy link
Copy Markdown
Contributor

Description of changes

Clang 16 adds a buffer hardening mode as a new warning. doctest enables all warnings and promotes them to errors, which causes the build to fail with clang 16. The upstream PR suppresses these warnings on clang 16.

Background: https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734

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.11 Release Notes (or backporting 23.05 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.

@ofborg ofborg bot requested a review from davidtwco July 14, 2023 23:12
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jul 14, 2023
@reckenrode
Copy link
Copy Markdown
Contributor Author

Result of nixpkgs-review pr 243547 run on aarch64-darwin 1

21 packages marked as broken and skipped:
  • pynitrokey
  • pynitrokey.dist
  • python310Packages.paperwork-backend
  • python310Packages.paperwork-backend.dist
  • python310Packages.paperwork-shell
  • python310Packages.paperwork-shell.dist
  • python311Packages.paperwork-backend
  • python311Packages.paperwork-backend.dist
  • python311Packages.paperwork-shell
  • python311Packages.paperwork-shell.dist
  • sublime-music
  • sublime-music.dist
  • wayfire
  • wayfireApplications-unwrapped.wayfire
  • wayfireApplications-unwrapped.wayfirePlugins.wayfire
  • wayfireApplications-unwrapped.wayfirePlugins.wf-shell
  • wayfireApplications-unwrapped.wcm
  • wayfirePlugins.wayfire
  • wayfirePlugins.wf-shell
  • wcm
  • wf-config
4 packages failed to build:
  • python310Packages.xtensor-python
  • python310Packages.xtensor-python.dist
  • python311Packages.xtensor-python
  • python311Packages.xtensor-python.dist
67 packages built:
  • atomic-operator
  • atomic-operator.dist
  • creds
  • creds.dist
  • doctest
  • ledger-autosync
  • ledger-autosync.dist
  • poetry
  • poetry.dist
  • poetryPlugins.poetry-audit-plugin
  • poetryPlugins.poetry-audit-plugin.dist
  • poetryPlugins.poetry-plugin-up
  • poetryPlugins.poetry-plugin-up.dist
  • python310Packages.autofaiss
  • python310Packages.autofaiss.dist
  • python310Packages.cleo
  • python310Packages.cleo.dist
  • python310Packages.fire
  • python310Packages.fire.dist
  • python310Packages.fuzzywuzzy
  • python310Packages.fuzzywuzzy.dist
  • python310Packages.jiwer
  • python310Packages.jiwer.dist
  • python310Packages.levenshtein
  • python310Packages.levenshtein.dist
  • python310Packages.nkdfu
  • python310Packages.nkdfu.dist
  • python310Packages.rapidfuzz
  • python310Packages.rapidfuzz.dist
  • python310Packages.syncedlyrics
  • python310Packages.syncedlyrics.dist
  • python310Packages.thefuzz
  • python310Packages.thefuzz.dist
  • trytond (python310Packages.trytond)
  • trytond.dist (python310Packages.trytond.dist)
  • python310Packages.videocr
  • python310Packages.videocr.dist
  • python311Packages.autofaiss
  • python311Packages.autofaiss.dist
  • python311Packages.cleo
  • python311Packages.cleo.dist
  • python311Packages.fire
  • python311Packages.fire.dist
  • python311Packages.fuzzywuzzy
  • python311Packages.fuzzywuzzy.dist
  • python311Packages.jiwer
  • python311Packages.jiwer.dist
  • python311Packages.levenshtein
  • python311Packages.levenshtein.dist
  • python311Packages.nkdfu
  • python311Packages.nkdfu.dist
  • python311Packages.rapidfuzz
  • python311Packages.rapidfuzz.dist
  • python311Packages.syncedlyrics
  • python311Packages.syncedlyrics.dist
  • python311Packages.thefuzz
  • python311Packages.thefuzz.dist
  • python311Packages.trytond
  • python311Packages.trytond.dist
  • python311Packages.videocr
  • python311Packages.videocr.dist
  • spotdl
  • spotdl.dist
  • taskflow
  • xeus
  • xtensor
  • xtl

@reckenrode
Copy link
Copy Markdown
Contributor Author

Result of nixpkgs-review pr 243547 run on x86_64-darwin 1

21 packages marked as broken and skipped:
  • pynitrokey
  • pynitrokey.dist
  • python310Packages.paperwork-backend
  • python310Packages.paperwork-backend.dist
  • python310Packages.paperwork-shell
  • python310Packages.paperwork-shell.dist
  • python311Packages.paperwork-backend
  • python311Packages.paperwork-backend.dist
  • python311Packages.paperwork-shell
  • python311Packages.paperwork-shell.dist
  • sublime-music
  • sublime-music.dist
  • wayfire
  • wayfireApplications-unwrapped.wayfire
  • wayfireApplications-unwrapped.wayfirePlugins.wayfire
  • wayfireApplications-unwrapped.wayfirePlugins.wf-shell
  • wayfireApplications-unwrapped.wcm
  • wayfirePlugins.wayfire
  • wayfirePlugins.wf-shell
  • wcm
  • wf-config
4 packages failed to build:
  • python310Packages.xtensor-python
  • python310Packages.xtensor-python.dist
  • python311Packages.xtensor-python
  • python311Packages.xtensor-python.dist
67 packages built:
  • atomic-operator
  • atomic-operator.dist
  • creds
  • creds.dist
  • doctest
  • ledger-autosync
  • ledger-autosync.dist
  • poetry
  • poetry.dist
  • poetryPlugins.poetry-audit-plugin
  • poetryPlugins.poetry-audit-plugin.dist
  • poetryPlugins.poetry-plugin-up
  • poetryPlugins.poetry-plugin-up.dist
  • python310Packages.autofaiss
  • python310Packages.autofaiss.dist
  • python310Packages.cleo
  • python310Packages.cleo.dist
  • python310Packages.fire
  • python310Packages.fire.dist
  • python310Packages.fuzzywuzzy
  • python310Packages.fuzzywuzzy.dist
  • python310Packages.jiwer
  • python310Packages.jiwer.dist
  • python310Packages.levenshtein
  • python310Packages.levenshtein.dist
  • python310Packages.nkdfu
  • python310Packages.nkdfu.dist
  • python310Packages.rapidfuzz
  • python310Packages.rapidfuzz.dist
  • python310Packages.syncedlyrics
  • python310Packages.syncedlyrics.dist
  • python310Packages.thefuzz
  • python310Packages.thefuzz.dist
  • trytond (python310Packages.trytond)
  • trytond.dist (python310Packages.trytond.dist)
  • python310Packages.videocr
  • python310Packages.videocr.dist
  • python311Packages.autofaiss
  • python311Packages.autofaiss.dist
  • python311Packages.cleo
  • python311Packages.cleo.dist
  • python311Packages.fire
  • python311Packages.fire.dist
  • python311Packages.fuzzywuzzy
  • python311Packages.fuzzywuzzy.dist
  • python311Packages.jiwer
  • python311Packages.jiwer.dist
  • python311Packages.levenshtein
  • python311Packages.levenshtein.dist
  • python311Packages.nkdfu
  • python311Packages.nkdfu.dist
  • python311Packages.rapidfuzz
  • python311Packages.rapidfuzz.dist
  • python311Packages.syncedlyrics
  • python311Packages.syncedlyrics.dist
  • python311Packages.thefuzz
  • python311Packages.thefuzz.dist
  • python311Packages.trytond
  • python311Packages.trytond.dist
  • python311Packages.videocr
  • python311Packages.videocr.dist
  • spotdl
  • spotdl.dist
  • taskflow
  • xeus
  • xtensor
  • xtl

@reckenrode
Copy link
Copy Markdown
Contributor Author

python3Packages.xtensor-python fails to build on 23.05, so I don’t think the failure is caused by this change.

Copy link
Copy Markdown
Member

@Artturin Artturin Aug 1, 2023

Choose a reason for hiding this comment

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

Suggested change
url = "https://github.com/doctest/doctest/pull/768.patch";
url = "https://github.com/doctest/doctest/commit/9336c9bd86e3fc2e0c36456cad8be3b4e8829a22.patch";

The pull request can change, so it's better to use a rev.
verify that the hash is still the same.

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.

I pushed an update that uses the commit rather than the PR patch.

Clang 16 adds a buffer hardening mode as a new warning. doctest enables
all warnings and promotes them to errors, which causes the build to fail
with clang 16. The upstream PR suppresses these warnings on clang 16.

Background: https://discourse.llvm.org/t/rfc-c-buffer-hardening/65734

patches = [
# Suppress unsafe buffer usage warnings with clang 16, which are treated as errors due to `-Werror`.
# https://github.com//doctest/doctest/pull/768
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

PR link should be included in the comment, added.

@Artturin Artturin merged commit 4853be3 into NixOS:master Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants