public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 2/4] hyperscan: Patch required to build with updated binutils-2.36.1
Date: Wed, 21 Apr 2021 23:26:24 +0200	[thread overview]
Message-ID: <20210421212626.2729436-2-adolf.belka@ipfire.org> (raw)
In-Reply-To: <20210421212626.2729436-1-adolf.belka@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 2414 bytes --]

- Updated binutils caused failure in build of hyperscan
   Patch solved the problem
     https://github.com/intel/hyperscan/issues/292, avoid the compilation
     error reporting 'undefined reference to `avx2_snprintf`' etc.
- Thanks to Michael Tremer and Marcel Lorenz for guidance on the patch

Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 lfs/hyperscan                                 |  1 +
 ...can-5.4.0-fix-undefined-reference-to.patch | 24 +++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 src/patches/hyperscan-5.4.0-fix-undefined-reference-to.patch

diff --git a/lfs/hyperscan b/lfs/hyperscan
index f89b20224..7258d93dd 100644
--- a/lfs/hyperscan
+++ b/lfs/hyperscan
@@ -77,6 +77,7 @@ $(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
index 000000000..fdd2543f1
--- /dev/null
+++ b/src/patches/hyperscan-5.4.0-fix-undefined-reference-to.patch
@@ -0,0 +1,24 @@
+From 66189546403e5476c560bdbad89d24c3df87b172 Mon Sep 17 00:00:00 2001
+From: Yue Ni <niyue.com(a)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
-- 
2.31.1


  reply	other threads:[~2021-04-21 21:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 21:26 [PATCH 1/4] binutils: Update to 2.36.1 Adolf Belka
2021-04-21 21:26 ` Adolf Belka [this message]
2021-04-21 21:26 ` [PATCH 3/4] qemu: Patch required to build with updated binutils-2.36.1 Adolf Belka
2021-04-21 21:26 ` [PATCH 4/4] strace: add --enable-mpers=check to configure to fix problem from binutils-2.36.1 Adolf Belka
2021-05-17  8:32 ` [PATCH 1/4] binutils: Update to 2.36.1 Adolf Belka
2021-05-17 19:34   ` Peter Müller
2021-05-17 20:29     ` Adolf Belka
2021-05-17 20:44     ` Michael Tremer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210421212626.2729436-2-adolf.belka@ipfire.org \
    --to=adolf.belka@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox