Skip to content

sdrangel: fix build#449871

Merged
Sigmanificient merged 11 commits intoNixOS:masterfrom
aciceri:aciceri/fix-sdrangel
Oct 12, 2025
Merged

sdrangel: fix build#449871
Sigmanificient merged 11 commits intoNixOS:masterfrom
aciceri:aciceri/fix-sdrangel

Conversation

@aciceri
Copy link
Member

@aciceri aciceri commented Oct 8, 2025

This makes sdrangelbuild by adding -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to all the dependencies which were now now failing.

See #445447, see below.

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.

@aciceri aciceri changed the title Fix sdrangel build sdrangel: fix build Oct 8, 2025
@aciceri aciceri requested review from Tungsten842 and alkeryn October 8, 2025 11:08
@aciceri
Copy link
Member Author

aciceri commented Oct 8, 2025

I've asked a review only to the sdrangel maintainers and not to all the dependencies' maintainers.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Oct 8, 2025
@aciceri aciceri marked this pull request as ready for review October 8, 2025 11:10
Copy link
Member

@markuskowa markuskowa left a comment

Choose a reason for hiding this comment

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

Looks good from my side.

@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 Oct 8, 2025
Copy link
Member

@alkeryn alkeryn left a comment

Choose a reason for hiding this comment

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

LGTM

@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 Oct 8, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 10, 2025
@cyclic-pentane
Copy link
Member

According to the CMake 4 tracking issue #445447, we should only set -DCMAKE_POLICY_VERSION_MINIMUM=3.5 in some very special cases, and prefer patching the packages in question instead. I already went through a bunch of the deps in question and submitted upstream fixes/backported upstream commits that didn't make it into a release yet, and it should be doable to also do so for the rest of the deps here.

Copy link
Member

@cyclic-pentane cyclic-pentane left a comment

Choose a reason for hiding this comment

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

The packages that I haven't opened PRs for yet and that still need patching are airspyhf, aptdec, cm256cc, dab_lib and mbelib.

@aciceri
Copy link
Member Author

aciceri commented Oct 10, 2025

Oh I missed that part, makes sense. I can do it for the remaining packages if you want. Do you suggest to open separate PRs for each package or do everything here in different commits?

@aciceri aciceri marked this pull request as draft October 10, 2025 08:53
@leona-ya
Copy link
Member

In one PR is okay. Could you rebase on master in a few minutes (in around 3mins) to have all the changes

@aciceri aciceri closed this Oct 10, 2025
@aciceri aciceri force-pushed the aciceri/fix-sdrangel branch from 2e0c1ef to 5790303 Compare October 10, 2025 14:54
@aciceri aciceri reopened this Oct 10, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 10, 2025
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 3+ This PR was reviewed and approved by three or more persons. label Oct 10, 2025
@aciceri aciceri force-pushed the aciceri/fix-sdrangel branch from 91d9783 to 697662f Compare October 10, 2025 18:06
@aciceri
Copy link
Member Author

aciceri commented Oct 10, 2025

I swear I've read 3.5 😨, changed it now, good catch!

And patches are preferred over cmake flags, but I am fine with both.

Yeah I've read that but I think I had valid reasons to directly set the cmake flag from the derivation:

  • aptdec's upstream repository is archived so I couldn't open a PR and use it as a patch
  • using the latest dab_lib version it appears to already build against cmake 4, but bumping it made sdrangel to not build. dab_lib is used only by sdrangel in nixpkgs, so I believe that the optimal thing would be waiting for sdrangel to build against its latest version and then update it in nixpkgs (and remove my cmake flag)
  • mbelib's upstream repository seems to be abandoned (last commit from 6 year ago) and unanswared PRs and issues. So here too I don't think it's worht opening a PR and using it in nixpkgs as patch.

For these 3 packages I may still write patches to put in nixpkgs or use substituteInPlace but honestly I preferred as I did. If someone with more authority and/or experience tells me to do differently, I will do differently.

@aciceri
Copy link
Member Author

aciceri commented Oct 10, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 449871
Commit: 697662f67a20b8b3af69a316a3ae5a751e562972


x86_64-linux

❌ 1 package failed to build:
  • sdrpp
✅ 8 packages built:
  • airspyhf
  • aptdec
  • cm256cc
  • dab_lib
  • dsdcc
  • mbelib
  • satdump
  • sdrangel

Error logs: `x86_64-linux`
sdrpp
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at core/libcorrect/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

-- Configuring incomplete, errors occurred!

@SchweGELBin
Copy link
Member

I agree. In some cases, including this one, a simple cmake flag makes more sense.

@SchweGELBin
Copy link
Member

Versions older than <3.5 are unsupported by cmake 4. Versions between 3.5<=version<3.10 are deprecated and will lose support in a bit. The goal is to bump cmake compat version to at least 3.10+ so we won't have the same issues in half a year again.
If you are authoring patches, prefer bumping straight to 3.10.

So 3.5 wasn't wrong, 3.10 is just more future proof and recommended.

@aciceri aciceri force-pushed the aciceri/fix-sdrangel branch from 697662f to b709b9d Compare October 11, 2025 15:38
@aciceri aciceri force-pushed the aciceri/fix-sdrangel branch from b709b9d to 7d0808a Compare October 11, 2025 15:48
@aciceri
Copy link
Member Author

aciceri commented Oct 11, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 449871
Commit: 7d0808ab3845edb076f673c796798610e4ba2323


x86_64-linux

❌ 1 package failed to build:
  • sdrpp
✅ 8 packages built:
  • airspyhf
  • aptdec
  • cm256cc
  • dab_lib
  • dsdcc
  • mbelib
  • satdump
  • sdrangel

Error logs: `x86_64-linux`
sdrpp
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at core/libcorrect/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

-- Configuring incomplete, errors occurred!

@Sigmanificient
Copy link
Member

Sigmanificient commented Oct 12, 2025

@Sigmanificient Sigmanificient added this pull request to the merge queue Oct 12, 2025
Merged via the queue into NixOS:master with commit 0198d4b Oct 12, 2025
28 of 31 checks passed
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: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants