gnuradio3_8Minimal: fix build on Linux by using gcc 12 libraries

Not using simply stdenv = gcc12Stdenv due to errors like this:

/nix/store/...-binutils-2.40/bin/ld: /nix/store/...-boost-1.81.0/lib/libboost_program_options.so.1.81.0: undefined reference to `std::ios_base_library_init()@GLIBCXX_3.4.32'
collect2: error: ld returned 1 exit status
make[2]: *** [gr-fec/lib/reed-solomon/CMakeFiles/gr_fec_rstest.dir/build.make:131: gr-fec/lib/reed-solomon/gr_fec_rstest] Error 1
make[1]: *** [CMakeFiles/Makefile2:2165: gr-fec/lib/reed-solomon/CMakeFiles/gr_fec_rstest.dir/all] Error 2
This commit is contained in:
Chuang Zhu 2024-01-28 20:48:10 +08:00 committed by Doron Behar
parent 1e1e90e327
commit b688bda73b
2 changed files with 8 additions and 4 deletions

View File

@ -244,6 +244,8 @@ stdenv.mkDerivation (finalAttrs: (shared // {
rm gr-fec/python/fec/qa_polar_encoder.py
rm gr-fec/python/fec/qa_polar_encoder_systematic.py
rm gr-filter/python/filter/qa_freq_xlating_fft_filter.py
# Failed with libstdc++ from GCC 13
rm gr-filter/python/filter/qa_filterbank.py
'';
patches = [
# Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227

View File

@ -31668,12 +31668,14 @@ with pkgs;
};
};
};
gnuradio3_8 = disable-warnings-if-gcc13 (callPackage ../applications/radio/gnuradio/wrapper.nix {
unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix {
gnuradio3_8 = callPackage ../applications/radio/gnuradio/wrapper.nix {
unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix ({
inherit (darwin.apple_sdk.frameworks) CoreAudio;
python = python3;
};
});
} // lib.optionalAttrs stdenv.isLinux {
stdenv = pkgs.stdenvAdapters.useLibsFrom stdenv pkgs.gcc12Stdenv;
});
};
gnuradio3_8Packages = lib.recurseIntoAttrs gnuradio3_8.pkgs;
# A build without gui components and other utilites not needed if gnuradio is
# used as a c++ library.