package/freeipmi: fix static build with libgcrypt
PATCH 1/1 package/freeipmi: fix static build with libgcrypt
Fix the following static build failure with libgcrypt raised since the addition of the package in commit 663f39c88c01593855c18355a4decdceeffd884b:
configure:13665: /home/buildroot/autobuild/instance-1/output-1/host/bin/x86_64-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c -lgcrypt >&5/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/10.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libgcrypt.a(libgcrypt_la-visibility.o): in function `gcry_err_make_from_errno':
visibility.c:(.text+0x29): undefined reference to `gpg_err_code_from_errno'
Fixes:
- http://autobuild.buildroot.org/results/5354f7231cf08bf762e7d86fca874ce63d9a116b
--- ...ure.ac-use-pkg-config-to-find-gcrypt.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package/freeipmi/0003-configure.ac-use-pkg-config-to-find-gcrypt.patch
package/freeipmi/0003-configure.ac-use-pkg-config-to-find-gcrypt.patch new file +50 -0
@@ -0,0 +1,50 @@ +From 727291789fa1930a3e5aa04a25e954cfa6e615d6 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sat, 15 Jan 2022 16:27:44 +0100 +Subject: [PATCH] configure.ac: use pkg-config to find gcrypt + +Use pkg-config to find gcrypt and avoid the following static build +failure: + +configure:13642: checking for gcry_md_open in -lgcrypt +configure:13665: /home/buildroot/autobuild/instance-1/output-1/host/bin/x86_64-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c -lgcrypt >&5 +/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/10.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libgcrypt.a(libgcrypt_la-visibility.o): in function `gcry_err_make_from_errno': +visibility.c:(.text+0x29): undefined reference to `gpg_err_code_from_errno' + +Fixes: + - http://autobuild.buildroot.org/results/5354f7231cf08bf762e7d86fca874ce63d9a116b + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: https://github.com/chu11/freeipmi-mirror/pull/52] +--- + configure.ac | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index bcc4156ff..531e10b8d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -405,7 +405,11 @@ fi + dnl Checks for libraries. + dnl don\'t include lib if LAN not desired + if test x"${ac_with_encryption}" = xyes; then +- AC_CHECK_LIB([gcrypt], [gcry_md_open], [have_gcrypt=yes], [have_gcrypt=no]) ++ PKG_CHECK_MODULES([GCRYPT], [libgcrypt], [have_gcrypt=yes], [ ++ AC_CHECK_LIB([gcrypt], [gcry_md_open], ++ [have_gcrypt=yes GCRYPT_LIBS=-lgcrypt], ++ [have_gcrypt=no]) ++ ]) + if test "x${have_gcrypt}" = "xno"; then + AC_MSG_ERROR([libgcrypt required to build libfreeipmi]) + AC_MSG_NOTICE([Note: libgpg-error required for libgcrypt]) +@@ -421,7 +425,6 @@ if test x"${ac_with_encryption}" = xyes; then + if test "x${have_gcrypt_threads}" = "xno"; then + AC_MSG_ERROR([libgcrypt with threads support required for libfreeipmi]) + fi +- GCRYPT_LIBS=-lgcrypt + fi + AC_SUBST(GCRYPT_LIBS) + +-- +2.34.1 +
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · On Sat, 15 Jan 2022 16:33:19 +0100 Fabrice Fontaine…
Fix the following static build failure with libgcrypt raised since the addition of the package in commit
663f39c88c01593855c18355a4decdceeffd884b:configure:13665:
/home/buildroot/autobuild/instance-1/output-1/host/bin/x86_64-linux-gcc-o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -staticconftest.c-lgcrypt >&5/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/10.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libgcrypt.a(libgcrypt_la-visibility.o): in function `gcry_err_make_from_errno':
visibility.c:(.text+0x29): undefined reference to `gpg_err_code_from_errno'
Quoted 8 lines
Fixes:
- http://autobuild.buildroot.org/results/5354f7231cf08bf762e7d86fca874ce63d9a116bSigned-off-by Fabrice Fontaine <[email protected]>--- ...ure.ac-use-pkg-config-to-find-gcrypt.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package/freeipmi/0003-configure.ac-use-pkg-config-to-find-gcrypt.patch
I've marked this one as Not Applicable.
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot