Commit b688bda7 authored by Chuang Zhu's avatar Chuang Zhu Committed by Doron Behar
Browse files

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
parent 1e1e90e3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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
+6 −4
Original line number Diff line number Diff line
@@ -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.