Bug 3365 - WARNING: the global $LIBS variable contains some libraries!
WARNING: the global $LIBS variable contains some libraries!
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Other
unspecified
Sparc Solaris
: P3 normal
: ---
Assigned To: Stefan Metzmacher
Andrew Bartlett
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-31 11:27 UTC by David S. Collier-Brown
Modified: 2006-01-25 01:26 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David S. Collier-Brown 2005-12-31 11:27:03 UTC
When building samba 4 revision 12651 on
Solaris 10, Studio 11, I got the following
twice from configure:

...
checking for pam_start in -lpam... yes
checking configure summary... yes
LIBS: -lsocket-lnsl
configure: WARNING: the global $LIBS variable contains some libraries!
configure: WARNING: this should not happen, please report to samba-technical@lists.samba.org!
configure: error: only _EXT macros from aclocal.m4 should be used!
Comment 1 David S. Collier-Brown 2005-12-31 13:28:22 UTC
Tested with gcc 4.0.1, and I got, of all things,  
...
checking for pam_start in -lpam... no
checking configure summary... configure: error: summary failure. Aborting 

So it looks like it's specific to Sun Studio 11.  I'll rerun
it with cc one more time to be sure.  And it gave the same
error, LIBS: -lsocket-lnsl

Comment 2 Neil Hoggarth 2006-01-12 03:02:56 UTC
I don't think that this is related to the Sun Studio compiler. I also get:

configure: WARNING: the global $LIBS variable contains some libraries!
configure: WARNING: this should not happen, please report to samba-technical@lists.samba.org!
configure: error: only _EXT macros from aclocal.m4 should be used!

when trying to configure Samba 4 on Solaris 9, but I'm using GCC 3.3.5 (also
tried GCC 2.95.2 with the same result).

SAMBA VERSION: 3.9.0-SVN-build-12850
autoheader/autoconf 2.59

I tried reporting this on samba-technical a month or so back, but failed
to provoke a response. I'm happy to try and diagnose, if someone can give me
some pointers to get started. I haven't got my head around how Samba 4 is
using autoconf, yet. Surely one of the points of using configure is to find 
libraries like -lsocket which are needed on some platforms but not on others?
Comment 3 Andrew Bartlett 2006-01-12 03:10:40 UTC
So, the reason this occours is known:  we need to finish the m4 work in socket.m4.

Metze said he would look into it, but has been busy with other things.  While not good, I think we should support a global LIBS for the tech preview (that is, warn rather than die on this case).  
Comment 4 Stefan Metzmacher 2006-01-13 10:34:03 UTC
hopefully fixed in rev 12911

can you test this please?
Comment 5 Neil Hoggarth 2006-01-16 03:17:01 UTC
I updated my source tree to rev 12948 this morning. ./configure.developer now
fails to find a connect() function:

[...]
checking for sys/sockio.h... yes
checking for sys/un.h... (cached) yes
checking for sin_len in sock... no
checking for connect... no
checking for SOCKET_LIBS in -lnsl_s... no
checking for SOCKET_LIBS in -lnsl... no
checking for SOCKET_LIBS in -lsocket... no
checking for SOCKET_LIBS in -linet... no
configure: error: no connect() function available!


I would normally expect to find connect() in -lsocket on Solaris.
I assume that searching for a function called "SOCKET_LIBS()" is
actually some sort of typo?
Comment 6 Stefan Metzmacher 2006-01-16 08:23:04 UTC
hopefully I got it right this time...
please test rev 12959
Comment 7 Neil Hoggarth 2006-01-17 02:53:48 UTC
Yes. Rev 12959 will configure for me on Solaris 9.
Comment 8 Stefan Metzmacher 2006-01-25 01:26:34 UTC
fixed