[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with linking when compiling GNUTLS
From: |
Simon Josefsson |
Subject: |
Re: Problem with linking when compiling GNUTLS |
Date: |
Thu, 05 Nov 2009 14:13:34 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
Dagobert Michelsen <address@hidden> writes:
> Hi,
>
> when I try to compile GNUTLS 2.8.5 on Solaris 8 Sparc with Sun Studio 11
> against libgcrypt the configure-script has problems linking to it:
>
>> configure:7443: /opt/studio/SOS11/SUNWspro/bin/cc -o conftest -xO3 -
>> xarch=v8 -I/opt/csw/include -I/opt/csw/include -xarch=v8 -L/opt/csw/
>> lib conftest.c /opt/csw/lib/libgcrypt.so -R/opt/csw/lib >&5
>> Undefined first referenced
>> symbol in file
>> gpg_err_code_from_errno conftest.o (symbol belongs to
>> implicit dependency /opt/csw/lib/libgpg-error.so.0)
>> gpg_err_code_from_syserror conftest.o (symbol belongs to
>> implicit dependency /opt/csw/lib/libgpg-error.so.0)
>> ld: fatal: Symbol referencing errors. No output written to conftest
>
> The problem is that configure links directly to libgcrypt.so instead
> of what is correctly reported:
>
>> build8s% /opt/csw/bin/libgcrypt-config --libs
>> -L/opt/csw/lib -lgcrypt -lgpg-error
>
> Adding "-L/opt/csw/lib -lgpg-error" manually solves the problem.
Hi. GnuTLS isn't using libgcrypt-config to detect the libgrypt
libraries, but the following patch hopefully fixes it. Will be part of
upcoming 2.9.8, so please test that.
/Simon
>From 65e184ffdcf0441b51cd447f519d929376f7e06b Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Thu, 5 Nov 2009 14:12:16 +0100
Subject: [PATCH] Make sure libgcrypt's dependency on libgpg-error is known.
---
lib/m4/hooks.m4 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/m4/hooks.m4 b/lib/m4/hooks.m4
index 2973d6d..8e3ec92 100644
--- a/lib/m4/hooks.m4
+++ b/lib/m4/hooks.m4
@@ -34,7 +34,7 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
DLL_VERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
AC_SUBST(DLL_VERSION)
- AC_LIB_HAVE_LINKFLAGS(gcrypt,, [#include <gcrypt.h>],
+ AC_LIB_HAVE_LINKFLAGS([gcrypt], [gpg-error], [#include <gcrypt.h>],
[enum gcry_cipher_algos i = GCRY_CIPHER_CAMELLIA128])
if test "$ac_cv_libgcrypt" != yes; then
AC_MSG_ERROR([[
--
1.6.5.2