Issue 1337 - autoconfig on Solaris
Summary: autoconfig on Solaris
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-16 12:22 UTC by lupe@lupe-christoph.de
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description lupe@lupe-christoph.de 2001-09-16 12:22:50 UTC
Full_Name: Lupe Christoph
Version: 2.0.14
OS: Solaris 8 x86
URL: 
Submission from: (NULL) (217.2.77.210)


configure fails to detect that it needs to link in -lsocket and -lnsl on
Solaris:

Undefined                       first referenced
 symbol                             in file
socket                              /opt/local/i386/lib/libbind.a(res_send.o) 
(symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
getpeername                         /opt/local/i386/lib/libbind.a(res_send.o) 
(symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
send                                /opt/local/i386/lib/libbind.a(res_send.o) 
(symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
bind                                /opt/local/i386/lib/libbind.a(res_send.o) 
(symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
sendto                              /opt/local/i386/lib/libbind.a(res_send.o) 
(symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
getsockname                         /opt/local/i386/lib/libbind.a(res_send.o) 
(symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
recvfrom                            /opt/local/i386/lib/libbind.a(res_send.o) 
(symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
connect                             /opt/local/i386/lib/libbind.a(res_send.o) 
(symbol belongs to implicit dependency /usr/lib/libsocket.so.1)

Comment 1 Kurt Zeilenga 2001-09-16 13:21:57 UTC
Please provide the config.log fragment of the failed test
Comment 2 Kurt Zeilenga 2001-09-16 13:22:03 UTC
changed state Open to Feedback
Comment 3 lupe@lupe-christoph.de 2001-09-17 06:52:22 UTC
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.

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.

HTH,
Lupe Christoph
------------------------------------------------------------------------
configure:4717: checking for socket
configure:4746: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -ldl -lbind 1>&5
Undefined			first referenced
 symbol  			    in file
socket                              /var/tmp/ccIQ6HUb.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 4722 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char socket(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char socket();
char (*f)();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_socket) || defined (__stub___socket)
choke me
#else
f = socket;
#endif

; return 0; }
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)
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 4773 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
configure:4808: checking for main in -lnet
configure:4823: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lnet  -ldl -lbind 1>&5
ld: fatal: library -lnet: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 4816 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
configure:4851: checking for main in -lnsl_s
configure:4866: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lnsl_s  -ldl -lbind 1>&5
ld: fatal: library -lnsl_s: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 4859 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
configure:4894: checking for main in -lnsl
configure:4909: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lnsl  -ldl -lbind 1>&5
configure:4937: checking for socket in -linet
configure:4956: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -linet  -lnsl -ldl -lbind 1>&5
ld: fatal: library -linet: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 4945 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char socket();

int main() {
socket()
; return 0; }
configure:4984: checking for main in -lgen
configure:4999: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lgen  -lnsl -ldl -lbind 1>&5
configure:5031: checking for select
configure:5060: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lgen -lnsl -ldl -lbind 1>&5
configure:5083: checking types of arguments for select()
configure:5116: gcc -c -g -O2 -I/opt/local/include/bind -I/opt/local/include conftest.c 1>&5
configure:5161: checking for regex.h
configure:5171: gcc -E -I/opt/local/include/bind -I/opt/local/include conftest.c >/dev/null 2>conftest.out
configure:5201: checking for regfree
configure:5230: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lgen -lnsl -ldl -lbind 1>&5
configure:5253: checking for compatible POSIX regex
configure:5288: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lgen -lnsl -ldl -lbind 1>&5
configure:5310: checking for res_query
configure:5339: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lgen -lnsl -ldl -lbind 1>&5
Undefined			first referenced
 symbol  			    in file
res_query                           /var/tmp/cc5B8WvZ.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 5315 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char res_query(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char res_query();
char (*f)();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_res_query) || defined (__stub___res_query)
choke me
#else
f = res_query;
#endif

; return 0; }
configure:5360: checking for res_query in -lbind
configure:5379: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lbind  -lgen -lnsl -ldl -lbind 1>&5
Undefined			first referenced
 symbol  			    in file
res_query                           /var/tmp/cc5Z469d.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 5368 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char res_query();

int main() {
res_query()
; return 0; }
configure:5411: checking for __res_query in -lbind
configure:5430: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lbind  -lgen -lnsl -ldl -lbind 1>&5
Undefined			first referenced
 symbol  			    in file
socket                              /opt/local/i386/lib/libbind.a(res_send.o)
getpeername                         /opt/local/i386/lib/libbind.a(res_send.o)
accept                              /opt/local/i386/lib/libbind.a(ev_connects.o)
send                                /opt/local/i386/lib/libbind.a(res_send.o)
bind                                /opt/local/i386/lib/libbind.a(res_send.o)
getsockopt                          /opt/local/i386/lib/libbind.a(ev_connects.o)
sendto                              /opt/local/i386/lib/libbind.a(res_send.o)
getsockname                         /opt/local/i386/lib/libbind.a(res_send.o)
recvfrom                            /opt/local/i386/lib/libbind.a(res_send.o)
listen                              /opt/local/i386/lib/libbind.a(ev_connects.o)
connect                             /opt/local/i386/lib/libbind.a(res_send.o)
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 5419 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char __res_query();

int main() {
__res_query()
; return 0; }
configure:5462: checking for res_query in -lresolv
configure:5481: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lresolv  -lgen -lnsl -ldl -lbind 1>&5
configure:5529: checking for getaddrinfo
configure:5558: gcc -o conftest -g -O2 -I/opt/local/include/bind -I/opt/local/include -L/opt/local/lib conftest.c -lresolv -lgen -lnsl -ldl -lbind 1>&5
Undefined			first referenced
 symbol  			    in file
socket                              /opt/local/i386/lib/libbind.a(gethostent.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
getpeername                         /opt/local/i386/lib/libbind.a(res_send.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
in6addr_any                         /opt/local/i386/lib/libbind.a(gethostent.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
send                                /opt/local/i386/lib/libbind.a(res_send.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
bind                                /opt/local/i386/lib/libbind.a(res_send.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
sendto                              /opt/local/i386/lib/libbind.a(res_send.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
getsockname                         /opt/local/i386/lib/libbind.a(res_send.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
recvfrom                            /opt/local/i386/lib/libbind.a(res_send.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
connect                             /opt/local/i386/lib/libbind.a(res_send.o)  (symbol belongs to implicit dependency /usr/lib/libsocket.so.1)
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 5534 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char getaddrinfo(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char getaddrinfo();
char (*f)();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
choke me
#else
f = getaddrinfo;
#endif

; return 0; }
-- 
| 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                    |
Comment 4 Kurt Zeilenga 2001-09-17 19:54:03 UTC
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.

>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.

Comment 5 lupe@lupe-christoph.de 2001-09-17 20:31:33 UTC
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.

Thanks,
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                    |
Comment 6 Kurt Zeilenga 2001-09-18 13:46:03 UTC
changed notes
changed state Feedback to Closed
Comment 7 Howard Chu 2003-12-12 22:49:24 UTC
moved from Incoming to Archive.Incoming
Comment 8 OpenLDAP project 2014-08-01 21:05:35 UTC
env issue