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

svaba: fix `gcc-13` build failure

Without the change build fails on `master` as
https://hydra.nixos.org/build/249164637:

    In file included from Histogram.cpp:1:
    Histogram.h:104:61: error: 'uint32_t' does not name a type
      104 |   Histogram(const int32_t& start, const int32_t& end, const uint32_t& width);
          |                                                             ^~~~~~~~
parent ef620693
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -14,6 +14,13 @@ stdenv.mkDerivation rec {

  buildInputs = [ zlib bzip2 xz ];

  postPatch = ''
    # Fix gcc-13 build failure due to missing includes
    sed -e '1i #include <cstdint>' -i \
      SeqLib/src/non_api/Histogram.h \
      src/svaba/Histogram.h
  '';

  # Workaround build failure on -fno-common toolchains like upstream
  # gcc-10. Otherwise build fails as:
  #   ld: ./libfml.a(rle.o):/build/source/SeqLib/fermi-lite/rle.h:33: multiple definition of