gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with linking when compiling GNUTLS


From: Dagobert Michelsen
Subject: Problem with linking when compiling GNUTLS
Date: Thu, 5 Nov 2009 13:27:35 +0100

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.

Additionally, there is an issue with missing networks libs on Solaris:

        DEPDIR=.deps depmode=none /bin/bash ../../build-aux/depcomp \
/opt/studio/SOS11/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. - I../.. -I../../lib/includes -I../../lib/includes -I../../libextra/ includes -I../../gl -I../../gl -I/opt/csw/include -xO3 -xarch=v8 - I/opt/csw/include -c ex-serv1.c
"ex-serv1.c", line 195: warning: statement not reached
/bin/bash ../../libtool --tag=CC --mode=link /opt/studio/SOS11/ SUNWspro/bin/cc -xO3 -xarch=v8 -I/opt/csw/include -no-install - xarch=v8 -L/opt/csw/lib -lgpg-error -L/opt/csw/lib -o ex-serv1 ex- serv1.o libexamples.la ../../lib/libgnutls.la ../../libextra/ libgnutls-extra.la ../../gl/libgnu.la -lsocket libtool: link: /opt/studio/SOS11/SUNWspro/bin/cc -xO3 -xarch=v8 -I/ opt/csw/include -xarch=v8 -o ex-serv1 ex-serv1.o -L/opt/csw/ lib ./.libs/libexamples.a ../../lib/.libs/libgnutls.so ../../ libextra/.libs/libgnutls-extra.so /home/dam/mgar/pkg/gnutls/trunk/ work/solaris8-sparc/build-isa-sparcv8/gnutls-2.8.5/lib/.libs/ libgnutls.so -ltasn1 -lz -lgcrypt -lintl ../../gl/.libs/libgnu.a - lgpg-error -lsocket -R/home/dam/mgar/pkg/gnutls/trunk/work/solaris8- sparc/build-isa-sparcv8/gnutls-2.8.5/lib/.libs -R/home/dam/mgar/pkg/ gnutls/trunk/work/solaris8-sparc/build-isa-sparcv8/gnutls-2.8.5/ libextra/.libs -R/opt/csw/lib ld: warning: file /home/dam/mgar/pkg/gnutls/trunk/work/solaris8- sparc/build-isa-sparcv8/gnutls-2.8.5/lib/.libs/libgnutls.so: linked to ../../lib/.libs/libgnutls.so: attempted multiple inclusion of file
Undefined                       first referenced
 symbol                             in file
inet_ntop ex-serv1.o (symbol belongs to implicit dependency /lib/libnsl.so.1)
ld: fatal: Symbol referencing errors. No output written to ex-serv1
gmake[6]: *** [ex-serv1] Error 1
gmake[6]: Leaving directory `/home/dam/mgar/pkg/gnutls/trunk/work/ solaris8-sparc/build-isa-sparcv8/gnutls-2.8.5/doc/examples'
gmake[5]: *** [all-recursive] Error 1
gmake[5]: Leaving directory `/home/dam/mgar/pkg/gnutls/trunk/work/ solaris8-sparc/build-isa-sparcv8/gnutls-2.8.5/doc'

This can be solved by adding -lsocket -lnsl which shoud be
autodetected during configure.


Best regards

  -- Dago





reply via email to

[Prev in Thread] Current Thread [Next in Thread]