]> git.ipfire.org Git - people/arne_f/ipfire-2.x.git/commitdiff
hyperscan: Fix FTBFS
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 14 Apr 2021 10:02:37 +0000 (10:02 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 5 Jul 2021 05:42:39 +0000 (07:42 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/hyperscan
src/patches/hyperscan-5.4.0-fix-undefined-reference-to.patch [new file with mode: 0644]

index f89b202243137efab79c4815127d072be7c6dee0..477a77c46c8991c883f2e255f046f492566eeb6a 100644 (file)
@@ -76,7 +76,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/hyperscan-5.4.0-fix-undefined-reference-to.patch
        cd $(DIR_APP) && cmake . \
                -DCMAKE_INSTALL_PREFIX:PATH=/usr \
                -DBUILD_SHARED_LIBS:BOOL=ON \
diff --git a/src/patches/hyperscan-5.4.0-fix-undefined-reference-to.patch b/src/patches/hyperscan-5.4.0-fix-undefined-reference-to.patch
new file mode 100644 (file)
index 0000000..fdd2543
--- /dev/null
@@ -0,0 +1,24 @@
+From 66189546403e5476c560bdbad89d24c3df87b172 Mon Sep 17 00:00:00 2001
+From: Yue Ni <niyue.com@gmail.com>
+Date: Tue, 19 Jan 2021 17:03:02 +0800
+Subject: [PATCH] Fix hyperscan compilation issue for
+ https://github.com/intel/hyperscan/issues/292, avoid the compilation error
+ reporting 'undefined reference to `avx2_snprintf`'.
+
+---
+ cmake/build_wrapper.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/build_wrapper.sh b/cmake/build_wrapper.sh
+index 1962813f..895610c0 100755
+--- a/cmake/build_wrapper.sh
++++ b/cmake/build_wrapper.sh
+@@ -17,7 +17,7 @@ KEEPSYMS=$(mktemp -p /tmp keep.syms.XXXXX)
+ LIBC_SO=$("$@" --print-file-name=libc.so.6)
+ cp ${KEEPSYMS_IN} ${KEEPSYMS}
+ # get all symbols from libc and turn them into patterns
+-nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ ]*\).*/^\1$/' >> ${KEEPSYMS}
++nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
+ # build the object
+ "$@"
+ # rename the symbols in the object