From 489cbfd7df1650a8790b3bdbcd69a2357f19764b Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Mon, 26 Jul 2021 08:37:49 +0200 Subject: [PATCH] package/libmodsecurity: fix static build Fix the following static build failure with nginx raised since bump of libmodsecurity to version 3.0.5 in commit 464d0be380c84ac7c3f1684e49153c3868280d7e: /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/instance-2/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libmodsecurity.a(libmodsecurity_la-transaction.o): in function `std::basic_streambuf >::sbumpc() [clone .isra.0]': transaction.cc:(.text+0x40): undefined reference to `std::__cxx11::basic_string, std::allocator >::_M_dispose()' Fixes: - http://autobuild.buildroot.org/results/e5a9eb8448980f1c5cafe97180b7d1f48ddf02ca Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- .../0002-modsecurity.pc.in-add-lstdc.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/libmodsecurity/0002-modsecurity.pc.in-add-lstdc.patch diff --git a/package/libmodsecurity/0002-modsecurity.pc.in-add-lstdc.patch b/package/libmodsecurity/0002-modsecurity.pc.in-add-lstdc.patch new file mode 100644 index 0000000000..6511e6f1e0 --- /dev/null +++ b/package/libmodsecurity/0002-modsecurity.pc.in-add-lstdc.patch @@ -0,0 +1,32 @@ +From 1a84881b280eb08852d5495c57e44351a40d3f91 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Mon, 26 Jul 2021 00:24:57 +0200 +Subject: [PATCH] modsecurity.pc.in: add -lstdc++ + +Add -lstdc++ to Libs.Private to avoid the following static build failure +with nginx: + +/home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/10.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/instance-2/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libmodsecurity.a(libmodsecurity_la-transaction.o): in function `std::basic_streambuf >::sbumpc() [clone .isra.0]': +transaction.cc:(.text+0x40): undefined reference to `std::__cxx11::basic_string, std::allocator >::_M_dispose()' + +Fixes: + - http://autobuild.buildroot.org/results/e5a9eb8448980f1c5cafe97180b7d1f48ddf02ca + +Signed-off-by: Fabrice Fontaine +--- + modsecurity.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modsecurity.pc.in b/modsecurity.pc.in +index 96cdf5ca..7c895ddc 100644 +--- a/modsecurity.pc.in ++++ b/modsecurity.pc.in +@@ -8,4 +8,4 @@ Description: ModSecurity API + Version: @MSC_VERSION_WITH_PATCHLEVEL@ + Cflags: -I@includedir@ + Libs: -L@libdir@ -lmodsecurity +-Libs.private: @CURL_LDADD@ @GEOIP_LDADD@ @MAXMIND_LDADD@ @GLOBAL_LDADD@ @LIBXML2_LDADD@ @LMDB_LDADD@ @LUA_LDADD@ @PCRE_LDADD@ @SSDEEP_LDADD@ @YAJL_LDADD@ ++Libs.private: @CURL_LDADD@ @GEOIP_LDADD@ @MAXMIND_LDADD@ @GLOBAL_LDADD@ @LIBXML2_LDADD@ @LMDB_LDADD@ @LUA_LDADD@ @PCRE_LDADD@ @SSDEEP_LDADD@ @YAJL_LDADD@ -lstdc++ +-- +2.30.2 + -- 2.30.2