Commit e9a3f9e5 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

wxSVG: fix build failure against `gcc-13`

Without the change `wxSVG` fails the build in `master` as
https://hydra.nixos.org/build/248172755:

    libwx_gtk3u_xrc-3.2.so: undefined reference to `std::ios_base_library_init()@GLIBCXX_3.4.32'
    collect2: error: ld returned 1 exit status
    make[1]: *** [Makefile:416: svgview] Error 1

This happens due to mix of `gcc-12` / `gcc-13` `libstdc++` libraries.

THe fix just applies upstream fix for `wxSVG` for `gcc-13`.
parent cd5c10f6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -23,6 +23,12 @@ stdenv.mkDerivation rec {
    hash = "sha256-rkcykfjQpf6voGzScMgmxr6tS86yud1vzs8tt8JeJII=";
  };

  postPatch = ''
    # Apply upstream patch for gcc-13 support:
    #   https://sourceforge.net/p/wxsvg/git/ci/7b17fe365fb522618fb3520d7c5c1109b138358f/
    sed -i src/cairo/SVGCanvasCairo.cpp -e '1i #include <cstdint>'
  '';

  nativeBuildInputs = [
    pkg-config
  ];
+0 −1
Original line number Diff line number Diff line
@@ -25506,7 +25506,6 @@ with pkgs;
  wxSVG = callPackage ../development/libraries/wxSVG {
    wxGTK = wxGTK32;
    stdenv = gcc12Stdenv;
  };
  wtk = callPackage ../development/libraries/wtk { };