gnutls-2.8.5 failure on OpenSolaris

Dr. David Kirkby david.kirkby at onetel.net
Sun Nov 29 02:32:12 CET 2009


I tried to build gnutls-2.8.5 on a Sun Ultra 27 running OpenSolaris 06/2009, 
with gcc 3.4.3 (the only one supplied with OpenSolaris). It fails, unless I add 
the 'nsl' library to to LDFLAGS.



bash-3.2$ uname -a
SunOS hawk 5.11 snv_111b i86pc i386 i86pc
bash-3.2$ cat /etc/release
                          OpenSolaris 2009.06 snv_111b X86
            Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                         Use is subject to license terms.
                               Assembled 07 May 2009
bash-3.2$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds2/sfwnv-111a/usr/src/cmd/gcc/gcc-3.4.3/configure 
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as 
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc 
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)


./configure  --with-libgcrypt-prefix=/usr

libtool: link: gcc -std=gnu99 -g -O2 -o ex-crq ex-crq.o  ./.libs/libexamples.a 
../../lib/.libs/libgnutls.so -L/usr/lib ../../libextra/.libs/libgnutls-extra.so 
/export/home/drkirkby/gnutls-2.8.5/lib/.libs/libgnutls.so -ltasn1 -lz -lgcrypt 
../../gl/.libs/libgnu.a -lsocket -R/export/home/drkirkby/gnutls-2.8.5/lib/.libs 
-R/export/home/drkirkby/gnutls-2.8.5/libextra/.libs -R/usr/local/lib
ld: warning: file /export/home/drkirkby/gnutls-2.8.5/lib/.libs/libgnutls.so: 
linked to ../../lib/.libs/libgnutls.so: attempted multiple inclusion of file
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..  -I../../lib/includes 
-I../../lib/includes -I../../libextra/includes -I../../gl -I../../gl    -g -O2 
-MT ex-serv1.o -MD -MP -MF .deps/ex-serv1.Tpo -c -o ex-serv1.o ex-serv1.c
mv -f .deps/ex-serv1.Tpo .deps/ex-serv1.Po
/bin/sh ../../libtool --tag=CC   --mode=link gcc -std=gnu99   -g -O2 -no-install 
  -o ex-serv1 ex-serv1.o libexamples.la ../../lib/libgnutls.la 
../../libextra/libgnutls-extra.la ../../gl/libgnu.la -lsocket
libtool: link: gcc -std=gnu99 -g -O2 -o ex-serv1 ex-serv1.o 
./.libs/libexamples.a ../../lib/.libs/libgnutls.so -L/usr/lib 
../../libextra/.libs/libgnutls-extra.so 
/export/home/drkirkby/gnutls-2.8.5/lib/.libs/libgnutls.so -ltasn1 -lz -lgcrypt 
../../gl/.libs/libgnu.a -lsocket -R/export/home/drkirkby/gnutls-2.8.5/lib/.libs 
-R/export/home/drkirkby/gnutls-2.8.5/libextra/.libs -R/usr/local/lib
ld: warning: file /export/home/drkirkby/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 /usr/lib/libnsl.so.1)
ld: fatal: symbol referencing errors. No output written to ex-serv1
collect2: ld returned 1 exit status
make[4]: *** [ex-serv1] Error 1
make[4]: Leaving directory `/export/home/drkirkby/gnutls-2.8.5/doc/examples'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/export/home/drkirkby/gnutls-2.8.5/doc'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/export/home/drkirkby/gnutls-2.8.5/doc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/home/drkirkby/gnutls-2.8.5'
make: *** [all] Error 2

Configuring with:

./configure  --with-libgcrypt-prefix=/usr 'LDFLAGS=-lnsl'

allows it to build ok





More information about the Gnutls-devel mailing list