1 |
commit: 13cb72bb0421f600e12802111db6d05514d763d8 |
2 |
Author: Sven Wegener <swegener <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 30 09:50:25 2020 +0000 |
4 |
Commit: Sven Wegener <swegener <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 30 09:53:24 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13cb72bb |
7 |
|
8 |
net-dns/pdns-recursor: Fix building with gcc-10, bug #724398 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/724398 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org> |
13 |
|
14 |
.../files/pdns-recursor-4.3.1-gcc-10.patch | 61 ++++++++++++++++++++++ |
15 |
net-dns/pdns-recursor/pdns-recursor-4.3.1.ebuild | 1 + |
16 |
2 files changed, 62 insertions(+) |
17 |
|
18 |
diff --git a/net-dns/pdns-recursor/files/pdns-recursor-4.3.1-gcc-10.patch b/net-dns/pdns-recursor/files/pdns-recursor-4.3.1-gcc-10.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..8244a456e64 |
21 |
--- /dev/null |
22 |
+++ b/net-dns/pdns-recursor/files/pdns-recursor-4.3.1-gcc-10.patch |
23 |
@@ -0,0 +1,61 @@ |
24 |
+commit b35614ed8b45adba304bcddcb3f2db6cb36b1462 |
25 |
+Author: Sander Hoentjen <shoentjen@××××××××××.nl> |
26 |
+Date: Mon Dec 16 22:44:43 2019 +0100 |
27 |
+ |
28 |
+ Fix build with gcc-10 |
29 |
+ |
30 |
+ From an e-mail from Jeff Law <law@××××××.com>: |
31 |
+ |
32 |
+ Subject: Minor problem in pdns, dnsdist and pdns-recursor packages in Fedora |
33 |
+ |
34 |
+ [ All three packages have embedded copies of the same problematic code |
35 |
+ and the same patch fixes all three. ] |
36 |
+ |
37 |
+ Red Hat's compiler team continues to try and be proactive in identifying |
38 |
+ issues that will arise as a result of the introduction of a new GCC |
39 |
+ release into Fedora each spring. |
40 |
+ |
41 |
+ You're being contacted because a package you maintain in Fedora is going |
42 |
+ to fail to build with gcc-10 in the spring. Yes, I know that's a few |
43 |
+ months away, but it's far easier to fix this stuff proactively now than |
44 |
+ wait. |
45 |
+ |
46 |
+ Fixing it now also means that your package will continue to be built |
47 |
+ with testing versions of gcc-10 as we proceed through the development |
48 |
+ process thus allowing additional issues to be caught early. |
49 |
+ |
50 |
+ Your particular package will fail due to an uninstantiated template for |
51 |
+ AsyncLoader<Request>. These kinds of problems are relatively common due to |
52 |
+ changes in the tuning of the inliner for gcc-10: |
53 |
+ |
54 |
+ > BUILDSTDERR: /usr/bin/ld: webserver.o: in function `WebServer::serveConnection(std::shared_ptr<Socket>) const': |
55 |
+ > BUILDSTDERR: /builddir/build/BUILD/pdns-4.2.1/pdns/webserver.cc:373: undefined reference to `YaHTTP::AsyncLoader<YaHTTP::Request>::feed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' |
56 |
+ > BUILDSTDERR: collect2: error: ld returned 1 exit status |
57 |
+ > BUILDSTDERR: make[3]: *** [Makefile:2751: ixfrdist] Error 1 |
58 |
+ > |
59 |
+ |
60 |
+ The attached patch arranges for an instance to be instantiated when |
61 |
+ compiling reqresp.cpp and is sufficient to fix this problem. The |
62 |
+ choice of reqresp.cpp fairly arbitrary IIRC. |
63 |
+ |
64 |
+ Ideally you'll with upstream to get this fixed, but a Fedora patch is |
65 |
+ clearly OK as well. I'll install the attached fix into Fedora in a |
66 |
+ week or so if I haven't heard from you. |
67 |
+ |
68 |
+ Jeff |
69 |
+ |
70 |
+ (cherry picked from commit ffb885e937c27bb1c62dee8f18c58ae0d5d52d39) |
71 |
+ |
72 |
+diff --git a/ext/yahttp/yahttp/reqresp.cpp b/ext/yahttp/yahttp/reqresp.cpp |
73 |
+index 686a6c7bd..ca2154f6a 100644 |
74 |
+--- a/ext/yahttp/yahttp/reqresp.cpp |
75 |
++++ b/ext/yahttp/yahttp/reqresp.cpp |
76 |
+@@ -2,6 +2,8 @@ |
77 |
+ |
78 |
+ namespace YaHTTP { |
79 |
+ |
80 |
++ template class AsyncLoader<Request>; |
81 |
++ |
82 |
+ bool isspace(char c) { |
83 |
+ return std::isspace(c) != 0; |
84 |
+ } |
85 |
|
86 |
diff --git a/net-dns/pdns-recursor/pdns-recursor-4.3.1.ebuild b/net-dns/pdns-recursor/pdns-recursor-4.3.1.ebuild |
87 |
index 30eca37b6ed..378e02c50a6 100644 |
88 |
--- a/net-dns/pdns-recursor/pdns-recursor-4.3.1.ebuild |
89 |
+++ b/net-dns/pdns-recursor/pdns-recursor-4.3.1.ebuild |
90 |
@@ -36,6 +36,7 @@ S="${WORKDIR}"/${P/_/-} |
91 |
|
92 |
PATCHES=( |
93 |
"${FILESDIR}"/${P}-boost-1.73.0.patch |
94 |
+ "${FILESDIR}"/${P}-gcc-10.patch |
95 |
) |
96 |
|
97 |
pkg_setup() { |