Skip to content

botan2: fix build with gcc15 - #446100

Merged
7c6f434c merged 1 commit into
NixOS:stagingfrom
ghpzin:pr-botan2-gcc15
Sep 25, 2025
Merged

7c6f434c merged 1 commit into
NixOS:stagingfrom
ghpzin:pr-botan2-gcc15

Conversation

@ghpzin

@ghpzin ghpzin commented Sep 25, 2025 •

Copy link
Copy Markdown
Contributor
  • add patch from fedora that adds #include <cstdint.h> to cli.h

Fixes build failure with gcc15:

In file included from src/cli/argon2.cpp:7:
src/cli/cli.h:125:71: error: 'uint8_t' does not name a type
  125 |       static std::string format_blob(const std::string& format, const uint8_t bits[], size_t len);
      |                                                                       ^~~~~~~
src/cli/cli.h:18:1: note: 'uint8_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
   17 | #include "cli_exceptions.h"
  +++ |+#include <cstdint>
   18 |

Tested build with:

nix-build --expr 'with import ./. {}; botan2.override { stdenv = gcc15Stdenv; }'

Part of fixes for gcc15 update:
#440456

Temporary solution in case:
#445861
is not solved before gcc15 update.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Sep 25, 2025
@ghpzin
ghpzin changed the base branch from master to staging September 25, 2025 17:27
@nixpkgs-ci nixpkgs-ci Bot closed this Sep 25, 2025
@nixpkgs-ci nixpkgs-ci Bot reopened this Sep 25, 2025
- add patch from fedora that adds `#include <cstdint.h>` to cli.h

Fixes build failure with gcc15:
```
In file included from src/cli/argon2.cpp:7:
src/cli/cli.h:125:71: error: 'uint8_t' does not name a type
  125 |       static std::string format_blob(const std::string& format, const uint8_t bits[], size_t len);
      |                                                                       ^~~~~~~
src/cli/cli.h:18:1: note: 'uint8_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
   17 | #include "cli_exceptions.h"
  +++ |+#include <cstdint>
   18 |
```
@ghpzin
ghpzin marked this pull request as ready for review September 25, 2025 17:35
@7c6f434c
7c6f434c merged commit 1c8ca9f into NixOS:staging Sep 25, 2025
@ghpzin
ghpzin deleted the pr-botan2-gcc15 branch September 25, 2025 17:59
@nikstur

nikstur commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

Is this reported at the botan upstream?

@ghpzin

ghpzin commented Sep 25, 2025 •

Copy link
Copy Markdown
Contributor Author

Is this reported at the botan upstream?

Sorry, found original fix in release-2 branch upstream (somehow could not find it before):
https://www.github.com/randombit/botan/pull/4584
randombit/botan@f765f0b

Either way it should be a "temporary solution" until botan2 is dropped as EOL in:
#445861

@71rd 71rd mentioned this pull request Sep 25, 2025
5 tasks done
@71rd 71rd mentioned this pull request Oct 22, 2025
2 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants