From 1ba5f55a46ed29df6be7d2c51ac1255d1f57fb77 Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Feb 22 2022 17:58:34 +0000 Subject: FTBFS fix - resolves: #2046721 --- diff --git a/bz2046721_f36_ftbfs.patch b/bz2046721_f36_ftbfs.patch new file mode 100644 index 0000000..0e6b1cc --- /dev/null +++ b/bz2046721_f36_ftbfs.patch @@ -0,0 +1,40 @@ +From b8a31ae9b4bcd5690a2b3d2fbd6373caffbc4a57 Mon Sep 17 00:00:00 2001 +From: Peter Schiffer <3899107+pschiffe@users.noreply.github.com> +Date: Mon, 21 Feb 2022 21:09:30 +0100 +Subject: [PATCH] Add `#include ` to `string_util.cc` + +Lnav fails to build on the next Fedora version due to the following error: +``` +make[3]: Entering directory '/builddir/build/BUILD/lnav-0.10.1/src/base' +g++ -std=c++14 -DHAVE_CONFIG_H -I. -I../../src -Wall -I../../src/ -I../../src/third-party -I../../src/fmtlib -I../../src/third-party/doctest-root -I/usr/local/include -D_ISOC99_SOURCE -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o string_util.o string_util.cc +make[3]: Leaving directory '/builddir/build/BUILD/lnav-0.10.1/src/base' +string_util.cc: In function 'std::string repeat(const std::string&, size_t)': +string_util.cc:199:22: error: 'ostream_iterator' is not a member of 'std' + 199 | std::fill_n(std::ostream_iterator(os), num, input); + | ^~~~~~~~~~~~~~~~ +string_util.cc:38:1: note: 'std::ostream_iterator' is defined in header ''; did you forget to '#include '? + 37 | #include "string_util.hh" + +++ |+#include + 38 | +``` + +Reason is probably the updated GNU toolchain, more info: +https://fedoraproject.org/wiki/Changes/GNUToolchainF36 + +This patch fixes the issue. +--- + src/base/string_util.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/base/string_util.cc b/src/base/string_util.cc +index 661add42..ad46cfdc 100644 +--- a/src/base/string_util.cc ++++ b/src/base/string_util.cc +@@ -29,6 +29,7 @@ + + #include "config.h" + ++#include + #include + #include + diff --git a/lnav.spec b/lnav.spec index 7370bd8..945a842 100644 --- a/lnav.spec +++ b/lnav.spec @@ -1,6 +1,6 @@ Name: lnav Version: 0.10.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Curses-based tool for viewing and analyzing log files License: BSD @@ -20,6 +20,8 @@ BuildRequires: readline-devel BuildRequires: sqlite-devel BuildRequires: zlib-devel +Patch1: bz2046721_f36_ftbfs.patch + %description %{name} is an enhanced log file viewer that takes advantage of any semantic information that can be gleaned from the files being viewed, such as @@ -32,6 +34,7 @@ quickly and efficiently zero in on problems. %prep %setup -q +%patch1 -p1 %build %configure --disable-static --disable-silent-rules @@ -49,6 +52,10 @@ quickly and efficiently zero in on problems. %changelog +* Tue Feb 22 2022 Peter Schiffer - 0.10.1-3 +- resolves: #2046721 + fix FTBFS on F36+ + * Thu Jan 20 2022 Fedora Release Engineering - 0.10.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild