* [Buildroot] [PATCH 1/1] package/freeipmi: fix static build with libgcrypt
@ 2022-01-15 15:33 Fabrice Fontaine
2022-01-26 22:09 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-01-15 15:33 UTC (permalink / raw)
To: buildroot; +Cc: 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 -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 <fontaine.fabrice@gmail.com>
---
...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
diff --git a/package/freeipmi/0003-configure.ac-use-pkg-config-to-find-gcrypt.patch b/package/freeipmi/0003-configure.ac-use-pkg-config-to-find-gcrypt.patch
new file mode 100644
index 0000000000..6db6c2ae3b
--- /dev/null
+++ b/package/freeipmi/0003-configure.ac-use-pkg-config-to-find-gcrypt.patch
@@ -0,0 +1,50 @@
+From 727291789fa1930a3e5aa04a25e954cfa6e615d6 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+[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
+
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/freeipmi: fix static build with libgcrypt
2022-01-15 15:33 [Buildroot] [PATCH 1/1] package/freeipmi: fix static build with libgcrypt Fabrice Fontaine
@ 2022-01-26 22:09 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2022-01-26 22:09 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
On Sat, 15 Jan 2022 16:33:19 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> 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
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-26 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-15 15:33 [Buildroot] [PATCH 1/1] package/freeipmi: fix static build with libgcrypt Fabrice Fontaine
2022-01-26 22:09 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.