Build + test problems on OpenSolaris (aka Solaris 11)

Simon Josefsson simon at
Mon Nov 2 11:40:49 CET 2009

"Dr. David Kirkby" <david.kirkby at> writes:

> I'm trying to build gnutls-2.8.4 on a Sun Ultra 27 running OpenSolaris
> (aka Solaris 11). The Ultra 27 has 3.333 GHz Quad core Intel Xeon
> processor, so is *not* one of Sun's SPARC processors.
> I'm using gcc 3.4.3.
> First gnutils-2.8.4  would not build at all, but would give this error message:
> Undefined                       first referenced
>  symbol                             in file
> inet_ntop                           ex-serv1.o  (symbol belongs to
> implicit dependency /lib/
> ld: fatal: symbol referencing errors. No output written to ex-serv1
> A web search found someone else having the exact same problem on
> Solaris 10 (not 11).
> A look in the man page for inet_ntop showed:
>      cc [ flag... ] file... -lsocket  -lnsl  [ library... ]
> so I tried to configure again, this time adding the 'nsl' library.
> $ ./configure 'LIBS=-lnsl'
> That worked, and the code built ok.

When you don't use the workaround, what is the value of LIBSOCKET in
doc/examples/Makefile?  I think it should contain -lnsl, and should be
used when linking ex-serv1.  Can you show the build output?

> But it fails one test.
> ...
> FAIL: chainverify

Yep -- known problem, but you could ignore it.  It will be fixed in soon
to be released 2.8.5.

> I noticed someone else had a problem on Solaris with a test failure,
> which was resolved by changing HUGE_VAL to HUGE, but this was thought
> to be a compiler bug.
> I do not want to waste your time on this test failures until I have
> verified it with a recent version of gcc.

That was a different problem.  But trying with a more recent gcc version
may be useful anyway, for the -lnsl issue.

> But the requirement to add the library does seem to be necessary with
> Solaris on x86 platforms. I think it is x86, rather than Solaris 10 vs
> 11, as the post above shows problems with Solaris 10 on x86, but I
> know Solaris 10 on SPARC has presented no such issue.

Gnulib modules should take care of the -lnsl issue, but it may be that
for some reason it is not working properly.


More information about the Gnutls-devel mailing list