[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: autoconfig on Solaris (ITS#1337)

On Monday, 2001-09-17 at 12:54:03 -0700, Kurt D. Zeilenga wrote:
> At 11:53 PM 2001-09-16, lupe@lupe-christoph.de wrote:
> >On Sunday, 2001-09-16 at 20:21:56 +0000, Kurt Zeilenga wrote:
> >> Please provide the config.log fragment of the failed test

> >I couldn't find a failed test.  That's the problem - it does not test if it needs -lsocket.

> In looking at your config.log, it did in fact test for -lsocket
> but failed to detect that it was in working order due to the
> inclusion of -lbind as a library.

Ah, you're right. I was distracted by "checking for main". And the
program does not use any symbol except main.

configure:4765: checking for main in -lsocket
configure:4780: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lsocket  -ldl -lbind 1>&5
Undefined                       first referenced
 symbol                             in file
 yp_first                            /opt/local/i386/lib/libbind.a(nis_ho.o)  (symbol belongs to implicit dependency /usr/lib/libnsl.so.1)
 yp_next                             /opt/local/i386/lib/libbind.a(nis_ho.o)  (symbol belongs to implicit dependency /usr/lib/libnsl.so.1)
 yp_match                            /opt/local/i386/lib/libbind.a(nis_ho.o)  (symbol belongs to implicit dependency /usr/lib/libnsl.so.1)
 yp_get_default_domain               /opt/local/i386/lib/libbind.a(nis.o)  (symbol belongs to implicit dependency /usr/lib/libnsl.so.1)

Fails, because the missing functions are in -lnsl. Never use -lsocket
without -lnsl on Solaris. No program I know uses one without
the other.

> >Here is the part of config.log that is somehow related. You can
> >also see that even though I have -lbind (not part of Solaris),
> >it uses -lresolv, too. But I consider this my problem because
> >I created an unusual situation by installing a -lbind on
> >Solaris.

> Well, yes.  If you add -lbind to LIBS you need to be sure
> you add whatever -lbind depends upon to the environment
> as well.

I've never needed to include -lsocket and -lnsl. They are normally
added automatically. Why would you want to use a socket without
a nameservice.

OK, please close the bug. But maybe leaving off other libraries for this
test would be a good idea.

Lupe Christoph
| lupe@lupe-christoph.de       |        http://free.prohosting.com/~lupe |
| I have challenged the entire ISO-9000 quality assurance team to a      |
| Bat-Leth contest on the holodeck. They will not concern us again.      |
| http://public.logica.com/~stepneys/joke/klingon.htm                    |