Skip to content

retroshare: fix build with gcc 14 and newer cmake#507625

Merged
Sigmanificient merged 2 commits intoNixOS:masterfrom
daschinmoy21:retroshare-build-fix
Apr 7, 2026
Merged

retroshare: fix build with gcc 14 and newer cmake#507625
Sigmanificient merged 2 commits intoNixOS:masterfrom
daschinmoy21:retroshare-build-fix

Conversation

@daschinmoy21
Copy link
Copy Markdown
Contributor

Fixes #507584

Cause

Starting with GCC 14, the C compiler implicitly defaults to -std=c23, making bool a reserved language keyword. The openpgpsdk submodule in retroshare historically used bool as a variable name, which triggered build failures during packet-print.c and packet-parse.c compilation.

Furthermore, once past the GCC 14 issues, the build failed configuring the udp-discovery-cpp submodule because its CMakeLists.txt strictly requested CMake 2.8. Modern CMake in Nixpkgs dropped compatibility for < 3.5, resulting in configuration failures.

Changes

  • Rename bool variables in openpgpsdk to bool_val to resolve
    GCC 14 / C23 keyword compilation errors (Fixes Build failure: retroshare #507584)
  • Bump minimum required CMake version in udp-discovery-cpp from
    2.8 to 3.5 to fix configuration errors with newer CMake versions

Things done

  • Built on platform:

    • x86_64-linux
  • Tested, as applicable:
    ran nix-build -A retroshare which builds successfully on NixOS 26.05.

  • Tested basic functionality of binary in ./result/bin/

Maintainer ping for review/testing: @Stekke

@nixpkgs-ci nixpkgs-ci bot added the 12.first-time contribution This PR is the author's first one; please be gentle! label Apr 7, 2026
@nixpkgs-ci nixpkgs-ci bot requested a review from Stekke April 7, 2026 14:33
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Apr 7, 2026
Copy link
Copy Markdown
Member

@Sigmanificient Sigmanificient left a comment

Choose a reason for hiding this comment

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

Please attempt to bump it to 3.10 instead of the minimal supported version. See #445447

Copy link
Copy Markdown
Contributor

@Stekke Stekke left a comment

Choose a reason for hiding this comment

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

Tested, and working here, thanks!

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Apr 7, 2026
Co-authored-by: Yohann Boniface <edhyjox@gmail.com>
@daschinmoy21 daschinmoy21 force-pushed the retroshare-build-fix branch from 17af3bd to b886689 Compare April 7, 2026 19:16
@Sigmanificient Sigmanificient added this pull request to the merge queue Apr 7, 2026
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Apr 7, 2026
Merged via the queue into NixOS:master with commit a0e8ff1 Apr 7, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: retroshare

3 participants