Skip to content

uhd: fix Darwin build (fixes also Gnuradio build)#481933

Merged
doronbehar merged 11 commits into
NixOS:masterfrom
doronbehar:pkg/uhd
Jan 22, 2026
Merged

uhd: fix Darwin build (fixes also Gnuradio build)#481933
doronbehar merged 11 commits into
NixOS:masterfrom
doronbehar:pkg/uhd

Conversation

@doronbehar

Copy link
Copy Markdown
Contributor

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.

@doronbehar doronbehar changed the title uhd: mark as broken on Darwin uhd: mark as broken on Darwin & fix gnuradio Darwin build Jan 20, 2026
@doronbehar doronbehar mentioned this pull request Jan 20, 2026
3 tasks
@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: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Jan 20, 2026
@ofborg ofborg Bot added the 6.topic: darwin Running or building packages on Darwin label Jan 20, 2026
Comment thread pkgs/by-name/uh/uhd/package.nix Outdated
@SuperSandro2000

Copy link
Copy Markdown
Member

otherwise looks alright to me, didn't test it though

@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 Jan 20, 2026
@doronbehar

Copy link
Copy Markdown
Contributor Author

Thanks for the approvals. I just checked, and since gr-uhd-rfnoc feature depends upon the gr-uhd feature according to the configurePhase, there's no need to check if either of them is enabled with hasFeature:

-- Configuring gr-uhd support...
--   Dependency Boost_FOUND = TRUE
--   Dependency UHD_FOUND = TRUE
--   Dependency ENABLE_GNURADIO_RUNTIME = TRUE
--   Dependency ENABLE_GR_FILTER = TRUE
--   Dependency ENABLE_GR_BLOCKS = TRUE
--   Dependency ENABLE_GR_ANALOG = TRUE
--   Enabling gr-uhd support.
--   Override with -DENABLE_GR_UHD=ON/OFF
--
-- Configuring gr-uhd UHD 4.0 RFNoC support...
--   Dependency ENABLE_GR_UHD = TRUE
--   Dependency UHD_FOUR_POINT_OH_RFNOC = TRUE
--   Enabling gr-uhd UHD 4.0 RFNoC support.
--   Override with -DENABLE_UHD_RFNOC=ON/OFF
--   UHD Version: 4.9.0.0-0-unknown

Hence the last force push.

@doronbehar

Copy link
Copy Markdown
Contributor Author

And a nixpkgs-review report is on it's way.

@doronbehar

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 481933
Commit: e29b1261d02e4ed95636d4f57ed6e107e90417d2


x86_64-linux

❌ 1 package failed to build:
  • dump1090-fa
✅ 40 packages built:
  • abracadabra
  • cubicsdr
  • dumphfdl
  • gnss-sdr
  • gnuradio
  • gnuradio.man
  • gnuradioMinimal
  • gnuradioMinimal.man
  • gnuradioPackages.bladeRF
  • gnuradioPackages.fosphor
  • gnuradioPackages.gr-difi
  • gnuradioPackages.lora_sdr
  • gnuradioPackages.lora_sdr.dev
  • gnuradioPackages.osmosdr
  • gnuradioPackages.osmosdr.dev
  • gqrx
  • gqrx-gr-audio
  • gqrx-portaudio
  • inspectrum
  • openwebrx
  • openwebrx.dist
  • pothos
  • python313Packages.soapysdr-with-plugins
  • python314Packages.soapysdr-with-plugins
  • qradiolink
  • rtl_433
  • sdrangel
  • sdrpp
  • sigdigger
  • soapysdr-with-plugins
  • soapyuhd
  • srsran
  • srsran.dev
  • suscan
  • trunk-recorder
  • uhd
  • uhd.dev
  • uhdMinimal
  • uhdMinimal.dev
  • welle-io

aarch64-linux

❌ 1 package failed to build:
  • dump1090-fa
✅ 39 packages built:
  • abracadabra
  • cubicsdr
  • dumphfdl
  • gnss-sdr
  • gnuradio
  • gnuradio.man
  • gnuradioMinimal
  • gnuradioMinimal.man
  • gnuradioPackages.bladeRF
  • gnuradioPackages.fosphor
  • gnuradioPackages.gr-difi
  • gnuradioPackages.lora_sdr
  • gnuradioPackages.lora_sdr.dev
  • gnuradioPackages.osmosdr
  • gnuradioPackages.osmosdr.dev
  • gqrx
  • gqrx-gr-audio
  • gqrx-portaudio
  • inspectrum
  • openwebrx
  • openwebrx.dist
  • pothos
  • python313Packages.soapysdr-with-plugins
  • python314Packages.soapysdr-with-plugins
  • qradiolink
  • rtl_433
  • sdrangel
  • sdrpp
  • sigdigger
  • soapysdr-with-plugins
  • soapyuhd
  • srsran
  • srsran.dev
  • suscan
  • trunk-recorder
  • uhd
  • uhd.dev
  • uhdMinimal
  • uhdMinimal.dev

x86_64-darwin

❌ 6 packages failed to build:
  • gnuradio
  • gnuradio.man
  • gnuradioPackages.lora_sdr
  • gnuradioPackages.lora_sdr.dev
  • gnuradioPackages.osmosdr
  • gnuradioPackages.osmosdr.dev
✅ 4 packages built:
  • gnuradioMinimal
  • gnuradioMinimal.man
  • gqrx (gqrx-portaudio)
  • gqrx-gr-audio

aarch64-darwin

❌ 4 packages failed to build:
  • gnuradioPackages.osmosdr
  • gnuradioPackages.osmosdr.dev
  • gqrx (gqrx-portaudio)
  • gqrx-gr-audio
✅ 6 packages built:
  • gnuradio
  • gnuradio.man
  • gnuradioMinimal
  • gnuradioMinimal.man
  • gnuradioPackages.lora_sdr
  • gnuradioPackages.lora_sdr.dev

Error logs: `x86_64-linux`
dump1090-fa
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: SHELL=/nix/store/lw117lsr8d585xs63kx5k233impyrq7q-bash-5.3p3/bin/bash DUMP1090_VERSION=10.2 showconfig dump1090 view1090 faup1090
Building with:
  Version string:   10.2
  Architecture:     x86_64
  DSP mix:          x86
  RTLSDR support:   yes
  BladeRF support:  yes
  HackRF support:   yes
  LimeSDR support:  yes
  SoapySDR support: yes
gcc  -I. -D_POSIX_C_SOURCE=200112L -DMODES_DUMP1090_VERSION=\"10.2\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DENABLE_SOAPYSDR -DSTARCH_MIX_X86 -O3 -g -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -Wformat-signedness -W -I/nix/store/mhfn813bcl6zmdhfixqc532nh29pwm5f-rtl-sdr-blog-1.3.5-dev/include/ -I/nix/store/1qh3nd2iz9b42zjwsjxs482kdk2x7ccd-libbladeRF-2025.10/include/ -I/nix/store/rggzr6nc5jida5x16009cj6v8nqmjhrg-hackrf-2024.02.1/include -I/nix/store/rggzr6nc5jida5x16009cj6v8nqmjhrg-hackrf-2024.02.1/include/libhackrf -I/nix/store/ssxz4zrby6lxrcd15043jqdm0waiz8pk-libusb-1.0.29-dev/include/libusb-1.0 -I/nix/store/26ijwag856mby2pnclzwf62v2sx0715k-limesuite-23.11.0/include -I/nix/store/knjasbab448vagfvcdglvjgipm86ns03-soapysdr-0.8.1-unstable-2025-10-05-03/include -c dump1090.c -o dump1090.o
gcc  -I. -D_POSIX_C_SOURCE=200112L -DMODES_DUMP1090_VERSION=\"10.2\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DENABLE_SOAPYSDR -DSTARCH_MIX_X86 -O3 -g -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -Wformat-signedness -W -I/nix/store/mhfn813bcl6zmdhfixqc532nh29pwm5f-rtl-sdr-blog-1.3.5-dev/include/ -I/nix/store/1qh3nd2iz9b42zjwsjxs482kdk2x7ccd-libbladeRF-2025.10/include/ -I/nix/store/rggzr6nc5jida5x16009cj6v8nqmjhrg-hackrf-2024.02.1/include -I/nix/store/rggzr6nc5jida5x16009cj6v8nqmjhrg-hackrf-2024.02.1/include/libhackrf -I/nix/store/ssxz4zrby6lxrcd15043jqdm0waiz8pk-libusb-1.0.29-dev/include/libusb-1.0 -I/nix/store/26ijwag856mby2pnclzwf62v2sx0715k-limesuite-23.11.0/include -I/nix/store/knjasbab448vagfvcdglvjgipm86ns03-soapysdr-0.8.1-unstable-2025-10-05-03/include -c anet.c -o anet.o
gcc  -I. -D_POSIX_C_SOURCE=200112L -DMODES_DUMP1090_VERSION=\"10.2\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DENABLE_SOAPYSDR -DSTARCH_MIX_X86 -O3 -g -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -Wformat-signedness -W -I/nix/store/mhfn813bcl6zmdhfixqc532nh29pwm5f-rtl-sdr-blog-1.3.5-dev/include/ -I/nix/store/1qh3nd2iz9b42zjwsjxs482kdk2x7ccd-libbladeRF-2025.10/include/ -I/nix/store/rggzr6nc5jida5x16009cj6v8nqmjhrg-hackrf-2024.02.1/include -I/nix/store/rggzr6nc5jida5x16009cj6v8nqmjhrg-hackrf-2024.02.1/include/libhackrf -I/nix/store/ssxz4zrby6lxrcd15043jqdm0waiz8pk-libusb-1.0.29-dev/include/libusb-1.0 -I/nix/store/26ijwag856mby2pnclzwf62v2sx0715k-limesuite-23.11.0/include -I/nix/store/knjasbab448vagfvcdglvjgipm86ns03-soapysdr-0.8.1-unstable-2025-10-05-03/include -c interactive.c -o interactive.o
interactive.c: In function 'interactiveShowData':
interactive.c:143:23: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (5 chars into 4 available) [8;;https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Warning-Options.html#index-Wno-unterminated-string-initialization�-Werror=unterminated-string-initialization8;;�]
  143 |     char spinner[4] = "|/-\\";
      |                       ^~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:223: interactive.o] Error 1

Error logs: `aarch64-linux`
dump1090-fa
Running phase: buildPhase
build flags: SHELL=/nix/store/q1lr86rzsxxbbqdz8m6bcv94saaz8wlv-bash-5.3p3/bin/bash DUMP1090_VERSION=10.2 showconfig dump1090 view1090 faup1090
Building with:
  Version string:   10.2
  Architecture:     aarch64
  DSP mix:          aarch64
  RTLSDR support:   yes
  BladeRF support:  yes
  HackRF support:   yes
  LimeSDR support:  yes
  SoapySDR support: yes
gcc  -I. -D_POSIX_C_SOURCE=200112L -DMODES_DUMP1090_VERSION=\"10.2\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DENABLE_SOAPYSDR -DSTARCH_MIX_AARCH64 -O3 -g -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -Wformat-signedness -W -I/nix/store/nfj4x5wjmb31pr98hfrm1hp94r1q91yl-rtl-sdr-blog-1.3.5-dev/include/ -I/nix/store/r9h70crjz6g380fm68n18fihajvd535n-libbladeRF-2025.10/include/ -I/nix/store/c2xmf5mbqwa0mkr2w512592m673fn80z-hackrf-2024.02.1/include -I/nix/store/c2xmf5mbqwa0mkr2w512592m673fn80z-hackrf-2024.02.1/include/libhackrf -I/nix/store/md86n8l5isknzhy4kbi100zvyq99xl9i-libusb-1.0.29-dev/include/libusb-1.0 -I/nix/store/2kg98kv74l8d310pv31l27nmhj34lakg-limesuite-23.11.0/include -I/nix/store/sqp5grkpadbwzb2ay2778di0hxild6pz-soapysdr-0.8.1-unstable-2025-10-05-03/include -c dump1090.c -o dump1090.o
gcc  -I. -D_POSIX_C_SOURCE=200112L -DMODES_DUMP1090_VERSION=\"10.2\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DENABLE_SOAPYSDR -DSTARCH_MIX_AARCH64 -O3 -g -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -Wformat-signedness -W -I/nix/store/nfj4x5wjmb31pr98hfrm1hp94r1q91yl-rtl-sdr-blog-1.3.5-dev/include/ -I/nix/store/r9h70crjz6g380fm68n18fihajvd535n-libbladeRF-2025.10/include/ -I/nix/store/c2xmf5mbqwa0mkr2w512592m673fn80z-hackrf-2024.02.1/include -I/nix/store/c2xmf5mbqwa0mkr2w512592m673fn80z-hackrf-2024.02.1/include/libhackrf -I/nix/store/md86n8l5isknzhy4kbi100zvyq99xl9i-libusb-1.0.29-dev/include/libusb-1.0 -I/nix/store/2kg98kv74l8d310pv31l27nmhj34lakg-limesuite-23.11.0/include -I/nix/store/sqp5grkpadbwzb2ay2778di0hxild6pz-soapysdr-0.8.1-unstable-2025-10-05-03/include -c anet.c -o anet.o
gcc  -I. -D_POSIX_C_SOURCE=200112L -DMODES_DUMP1090_VERSION=\"10.2\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -D_DEFAULT_SOURCE -DENABLE_CPUFEATURES -Icpu_features/include -DENABLE_RTLSDR -DENABLE_BLADERF -DENABLE_HACKRF -DENABLE_LIMESDR -DENABLE_SOAPYSDR -DSTARCH_MIX_AARCH64 -O3 -g -std=c11 -fno-common -Wall -Wmissing-declarations -Werror -Wformat-signedness -W -I/nix/store/nfj4x5wjmb31pr98hfrm1hp94r1q91yl-rtl-sdr-blog-1.3.5-dev/include/ -I/nix/store/r9h70crjz6g380fm68n18fihajvd535n-libbladeRF-2025.10/include/ -I/nix/store/c2xmf5mbqwa0mkr2w512592m673fn80z-hackrf-2024.02.1/include -I/nix/store/c2xmf5mbqwa0mkr2w512592m673fn80z-hackrf-2024.02.1/include/libhackrf -I/nix/store/md86n8l5isknzhy4kbi100zvyq99xl9i-libusb-1.0.29-dev/include/libusb-1.0 -I/nix/store/2kg98kv74l8d310pv31l27nmhj34lakg-limesuite-23.11.0/include -I/nix/store/sqp5grkpadbwzb2ay2778di0hxild6pz-soapysdr-0.8.1-unstable-2025-10-05-03/include -c interactive.c -o interactive.o
interactive.c: In function 'interactiveShowData':
interactive.c:143:23: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (5 chars into 4 available) [-Werror=unterminated-string-initialization]
  143 |     char spinner[4] = "|/-\\";
      |                       ^~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:223: interactive.o] Error 1

@doronbehar

Copy link
Copy Markdown
Contributor Author

Darwin failures are due to thrift failing some tests. Since thrift is not affected by this PR and the exact same failures happen on branch master, the logs weren't available. I fixed thrift by disabling a 2 more tests. Shortly there will be another updated nixpkgs-review report.

github-actions[bot]

This comment was marked as outdated.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. labels Jan 20, 2026
@doronbehar

Copy link
Copy Markdown
Contributor Author

Since thrift is already broken on Darwin, I think it won't matter much if this PR will be merged straight to master.

doronbehar and others added 7 commits January 20, 2026 23:44
Co-Authored-By: fmeef <gnu3ra@riseup.net>
Shouldn't break anything, and helps referring to gnuradio.passthru.uhd
when it might be marked as broken on that the current platform.
Is justified in anycase, and should help gnuradio evaluate on Darwin
when uhd is broken.
@doronbehar doronbehar changed the title uhd: mark as broken on Darwin & fix gnuradio Darwin build uhd: fix Darwin build (fixes also Gnuradio build) Jan 20, 2026
@doronbehar

Copy link
Copy Markdown
Contributor Author

I just managed to fix uhd on Darwin thanks to @fmeef's PR, so the PR is now updated to include uhd normally. gr-uhd related changes are still applied in case we'll need them in the future.

@doronbehar

Copy link
Copy Markdown
Contributor Author

I also just realized that I will not be able to generate a nixpkgs-review report with this amount of Darwin rebuilds, so you'd have to believe me that gnuradio.pkgs.osmosdr builds with this patch and with uhd.

@doronbehar doronbehar requested a review from bjornfor January 20, 2026 22:25
@doronbehar doronbehar added this pull request to the merge queue Jan 22, 2026
Merged via the queue into NixOS:master with commit b4e4d19 Jan 22, 2026
29 of 31 checks passed
@doronbehar doronbehar deleted the pkg/uhd branch January 22, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants