X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fxmlstarlet%2F0001-Fix-static-linking-problem-with-libgcrypt.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fxmlstarlet%2F0001-Fix-static-linking-problem-with-libgcrypt.patch;h=ea54c983a2f2de9bbd299b3fc1b69102b1e9b9d3;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/xmlstarlet/0001-Fix-static-linking-problem-with-libgcrypt.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/xmlstarlet/0001-Fix-static-linking-problem-with-libgcrypt.patch new file mode 100644 index 0000000..ea54c98 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/xmlstarlet/0001-Fix-static-linking-problem-with-libgcrypt.patch @@ -0,0 +1,46 @@ +From 8cee09b59a8c1ff2ebfc8c46097825d2eafdc4dd Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 16 May 2015 17:32:13 +0200 +Subject: [PATCH] Fix static linking problem with libgcrypt + +When libgcrypt is used, it is linked with libgpg-error, so we should +also test that libgpg-error is available, and include -lgpg-error in +the LIBS variable. + +This fixes build issues like: + + CCLD xml +/home/thomas/projets/buildroot/output/host/usr/bfin-buildroot-uclinux-uclibc/sysroot/usr/lib/libexslt.a(crypto.o): In function `_exsltCryptoGcryptInit': +crypto.c:(.text+0x112): undefined reference to `_gcry_check_version' +/home/thomas/projets/buildroot/output/host/usr/bfin-buildroot-uclinux-uclibc/sysroot/usr/lib/libexslt.a(crypto.o): In function `_exsltCryptoRc4DecryptFunction': +crypto.c:(.text+0x316): undefined reference to `_gcry_cipher_open' +crypto.c:(.text+0x32a): undefined reference to `_gcry_strerror' +crypto.c:(.text+0x34c): undefined reference to `_gcry_cipher_setkey' + +Which are caused by the AC_SEARCH_LIBS() test for libgcrypt to fail +due to -lgpg-error not been present in the LIBS variable. + +Note that using PKG_CHECK_MODULES() would be a much much better +replacement than this complicated handling of static libraries, but +it's a much more significant effort. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 4db0129..e378996 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -125,6 +125,7 @@ AS_IF([test "x$STATIC_LIBS" != xno], + [AC_SEARCH_LIBS([libiconv_open], [iconv], [], [], "$USER_LIBS")], "$USER_LIBS") + AC_SEARCH_LIBS([clock_gettime], [rt], [], [], "$USER_LIBS") + AC_SEARCH_LIBS([deflate], [z], [], [], "$USER_LIBS") ++ AC_SEARCH_LIBS([gpg_strerror], [gpg-error], [], [], "$USER_LIBS") + AC_SEARCH_LIBS([gcry_cipher_encrypt], [gcrypt], [], [], "$USER_LIBS") + + # Checks for inet libraries: +-- +2.1.0 +