Skip to content

Conversation

importantblimp
Copy link
Contributor

@importantblimp importantblimp commented Jun 29, 2025

Fixes #416080

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@importantblimp
Copy link
Contributor Author

I had a look through the commits since the last update and couldn't see anything substantial.

The program runs:
image

Though I don't have hardware to test it. @sikmir or @dgramop I'd appreciate if you could help with that.

@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: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 29, 2025
@nix-owners nix-owners bot requested a review from sikmir June 29, 2025 06:37
@sikmir
Copy link
Member

sikmir commented Jun 29, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 420930
Commit: de79c8b50cacc4931bdfd76ed9c021d613d9a6c4


x86_64-darwin

✅ 1 package built:
  • sdrpp

Both 1.1.0 and 1.2.1 failed to run on macOS with:
[ERROR] Glfw Error 65548: Cocoa: Regular windows do not have icons on macOS

@sikmir
Copy link
Member

sikmir commented Jun 29, 2025

Looks like env.NIX_CFLAGS_COMPILE = "-fpermissive"; and hardeningDisable = lib.optional stdenv.cc.isClang "format"; is not needed any more. Build is OK without it on darwin and linux.

@sikmir
Copy link
Member

sikmir commented Jun 29, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 420930
Commit: de79c8b50cacc4931bdfd76ed9c021d613d9a6c4


x86_64-linux

✅ 1 package built:
  • sdrpp

Works for me with rtl-sdr hardware.

@importantblimp
Copy link
Contributor Author

Both 1.1.0 and 1.2.1 failed to run on macOS with:
[ERROR] Glfw Error 65548: Cocoa: Regular windows do not have icons on macOS

What's the process here? Set broken = stdenv.hostPlatform.isDarwin;?

@dgramop
Copy link
Contributor

dgramop commented Jun 30, 2025

I need to test and debug again on an ARM Mac, which I can do next week. Hopefully "broken" will be very temporary. (I will also test with real hardware if I can get it to work)

@@ -90,7 +91,7 @@ stdenv.mkDerivation rec {
--replace "codec2.h" "codec2/codec2.h"
# Since the __TIME_ and __DATE__ is canonicalized in the build,
# use our qualified version shown in the programs window title.
substituteInPlace core/src/version.h --replace "1.1.0" "$version"
substituteInPlace core/src/version.h --replace "1.1.0" "$version" # Upstream haven't updated their version number from 1.1.0
Copy link
Member

@rafaelrc7 rafaelrc7 Aug 11, 2025

Choose a reason for hiding this comment

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

Sorry if I am mistaken. However, I believe they actually did update the version string. If you open this file (core/src/version.h) either in the selected commit (a94e2d6) or master, this file contains "1.2.1" as the version. So this substituteInPlace is either unnecessary or wrong

Suggested change
substituteInPlace core/src/version.h --replace "1.1.0" "$version" # Upstream haven't updated their version number from 1.1.0
substituteInPlace core/src/version.h --replace-fail "${version_number}" "$version"

or

Suggested change
substituteInPlace core/src/version.h --replace "1.1.0" "$version" # Upstream haven't updated their version number from 1.1.0
substituteInPlace core/src/version.h --replace-fail "1.2.1" "$version"

if you believe hardcoding it is better. Regardless, the usage of --replace-fail will break the derivation if the version is updated and the version number does not match.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting...

When I run nix-build . -A sdrpp with --replace-fail I get:

substituteStream() in derivation sdrpp-1.2.1-unstable-2025-06-25: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'CMakeLists.txt')
substituteStream() in derivation sdrpp-1.2.1-unstable-2025-06-25: WARNING: pattern /usr/share doesn't match anything in file 'CMakeLists.txt'
substituteStream() in derivation sdrpp-1.2.1-unstable-2025-06-25: ERROR: pattern 1.2.1 doesn't match anything in file 'core/src/version.h'
error: builder for '/nix/store/vdiv46a233fdj9xyv50fs4npbjmrr2ag-sdrpp-1.2.1-unstable-2025-06-25.drv' failed with exit code 1;
       last 14 log lines:
       > Using udevCheckHook
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/0hah6rsckfrhpzac1d96mjy7d8f6xlm5-source
       > source root is source
       > Running phase: patchPhase
       > applying patch /nix/store/6h9kwc0py2shgnwilywiislm52mfj9si-runtime-prefix.patch
       > patching file core/src/core.cpp
       > Hunk #1 succeeded at 258 with fuzz 2 (offset 16 lines).
       > Hunk #2 succeeded at 334 with fuzz 2 (offset 44 lines).
       > patching file core/src/gui/main_window.cpp
       > Hunk #1 succeeded at 39 with fuzz 1 (offset -5 lines).
       > substituteStream() in derivation sdrpp-1.2.1-unstable-2025-06-25: WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file 'CMakeLists.txt')
       > substituteStream() in derivation sdrpp-1.2.1-unstable-2025-06-25: WARNING: pattern /usr/share doesn't match anything in file 'CMakeLists.txt'
       > substituteStream() in derivation sdrpp-1.2.1-unstable-2025-06-25: ERROR: pattern 1.2.1 doesn't match anything in file 'core/src/version.h'
       For full logs, run:
         nix log /nix/store/vdiv46a233fdj9xyv50fs4npbjmrr2ag-sdrpp-1.2.1-unstable-2025-06-25.drv

The content of /nix/store/0hah6rsckfrhpzac1d96mjy7d8f6xlm5-source/core/src/version.h is

#pragma once

#define VERSION_STR "1.1.0"                                                                                                                                                                                                                                                                            

Which is different to https://github.com/AlexandreRouma/SDRPlusPlus/blob/a94e2d6712a6e5c80d6f6f27052e38be8a2ae0a9/core/src/version.h as you say.

I have rebased my branch onto master, but my notes indicate this was a problem when I first did the build (hence the comment).

Can you reproduce this on your machine?
And do you have any thoughts on what might be happening here?

Choose a reason for hiding this comment

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

Hi, nix relies on hash to determine if the source code needs to be downloaded, if the source code is already present in nix store, then the derivation commit is changed but not the hash, it keeps the old version of the source code.

Copy link
Member

Choose a reason for hiding this comment

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

I believe the issue is what Noderyos mentioned above. You need to not only update the commit rev, but also the also the hash. If you keep the hash, nix will consider it as the same you got already downloaded.

I guess this is one of the "silent errors" "--replace-fail" deals with.

Copy link
Member

@rafaelrc7 rafaelrc7 Sep 3, 2025

Choose a reason for hiding this comment

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

While you update the git rev, you forgot to update the hash, that still is

hash = "sha256-R4xWeqdHEAaje37VQaGlg+L2iYIOH4tXMHvZkZq4SDU=";

Furthermore, since we're already here, I'd consider update to the current commit of master, update the git date and set the proper hash of the last commit.

@rafaelrc7
Copy link
Member

rafaelrc7 commented Aug 11, 2025

@sikmir I found two issues in the upstream repo talking about crashes on MacOS: AlexandreRouma/SDRPlusPlus#1558 AlexandreRouma/SDRPlusPlus#1600 . Both were closed with the dev claiming the issues came from dependencies and not sdrpp itself. I don't know if it is still an issue (I don't have a mac).

Both show the same Cocoa: Regular windows do not have icons on macOS error in the logs, but I also don't know if this is even the relevant error.

@importantblimp importantblimp force-pushed the 416080 branch 2 times, most recently from d6efdf5 to 15e0dc3 Compare August 15, 2025 06:44
@importantblimp
Copy link
Contributor Author

@dgramop have you gotten a chance to test on an ARM Mac?

@sikmir
Copy link
Member

sikmir commented Aug 15, 2025

@sikmir I found two issues in the upstream repo talking about crashes on MacOS: AlexandreRouma/SDRPlusPlus#1558 AlexandreRouma/SDRPlusPlus#1600 . Both were closed with the dev claiming the issues came from dependencies and not sdrpp itself. I don't know if it is still an issue (I don't have a mac).

Both show the same Cocoa: Regular windows do not have icons on macOS error in the logs, but I also don't know if this is even the relevant error.

I have no idea how to fix it, so I'm fine with marking as broken on darwin.

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-darwin: 1 This PR causes 1 package 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Request: sdrpp 1.1.0-unstable → 1.2.1
5 participants