Bug 2471 - libgen not used for resolving any symbol
Summary: libgen not used for resolving any symbol
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.11
Hardware: SGI IRIX
: P3 normal
Target Milestone: none
Assignee: James Peach
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-16 14:47 UTC by Jason Mader (mail bounces back)
Modified: 2005-08-24 10:20 UTC (History)
0 users

See Also:


Attachments
config.log (52.25 KB, application/x-gzip)
2005-03-22 11:49 UTC, Jason Mader (mail bounces back)
no flags Details
config.log (52.44 KB, application/x-gzip)
2005-03-22 11:56 UTC, Jason Mader (mail bounces back)
no flags Details
check for getspnam in libc before trying libgen (474 bytes, patch)
2005-05-09 23:53 UTC, James Peach
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader (mail bounces back) 2005-03-16 14:47:19 UTC
On Irix, libgen is never needed to link any of the Samba binaries.  A scan of
the source doesn't show any reliance on basename() or dirname(), so it might not
be necessary on other platforms either.
Comment 1 Jason Mader (mail bounces back) 2005-03-19 10:44:38 UTC
configure.in does this:

# UnixWare 7.x has its getspnam in -lgen
AC_LIBTESTFUNC(gen, getspnam)

which leads to adding -lgen on LIBS in the Makefile; on Irix leads to
unnecessary linking against libgen.
Comment 2 Gerald (Jerry) Carter (dead mail address) 2005-03-22 08:49:16 UTC
I'm not sure I understand you. The configure test should only 
add -lgen if gespnam() is found in that lib.  Only linux,
I don't see it being added at all.  So if getspnam() is in
-lgen, then we need to link with -lgen for clear text password
support.  Does IRIX do something different here ?
Comment 3 Jason Mader (mail bounces back) 2005-03-22 11:12:42 UTC
I did 'elfdump -c' on libgen.so, and there is no getspnam in it's string table.
 getspnam is in libc.so.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-03-22 11:36:21 UTC
Jason, could you attach the gzipped config.log file ?  Thanks.
Comment 5 Jason Mader (mail bounces back) 2005-03-22 11:49:18 UTC
Created attachment 1068 [details]
config.log
Comment 6 Jason Mader (mail bounces back) 2005-03-22 11:56:52 UTC
Created attachment 1069 [details]
config.log

I'm sorry, I uploaded the config.log from my own modified configure.in.  This
one contains the interesting bits.
Comment 7 Gerald (Jerry) Carter (dead mail address) 2005-03-24 09:29:57 UTC
Here's the relevant part of the log.  Apparentlt since getspnam() is 
in libc, the test succeeds even though the linker complains.  This 
is probably an issue on any platform with getspnam() in libc.so.
................

configure:18024: checking for getspnam in -lgen
configure:18055: cc -o conftest -O   conftest.c -lgen  -lexc  >&5
ld32: WARNING 84 : /usr/lib32/libgen.so is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/mips4/libexc.so is not used for resolving any symbol.
configure:18058: $? = 0
configure:18061: test -s conftest
configure:18064: $? = 0
configure:18076: result: yes
configure:18091: checking for getspnam
configure:18141: cc -o conftest -O   conftest.c -lgen -lexc  >&5
ld32: WARNING 84 : /usr/lib32/libgen.so is not used for resolving any symbol.
ld32: WARNING 84 : /usr/lib32/mips4/libexc.so is not used for resolving any symbol.
configure:18144: $? = 0
configure:18147: test -s conftest
configure:18150: $? = 0
configure:18161: result: yes
Comment 8 James Peach 2005-05-09 22:30:40 UTC
I did some checking and there's no way get the linker to exclude libgen if it turns out 
to be unnecessary. The real fix is to check whether the symbols are in libc before 
checking the suggested library. It would be nice if autoconf did this automatically
because in principle, this could apply to any combination of libraries and symbols.

To just shut the warning up, add the appropriate ld32 -woff argument to CFLAGS.
Comment 9 James Peach 2005-05-09 23:53:14 UTC
Created attachment 1214 [details]
check for getspnam in libc before trying libgen
Comment 10 James Peach 2005-06-07 00:43:32 UTC
Any comments on patch?
Comment 11 James Peach 2005-07-30 22:45:51 UTC
Reassign IRIX bugs to me.
Comment 12 James Peach 2005-08-13 02:42:51 UTC
Fixed in http://websvn.samba.org/cgi-bin/viewcvs.cgi?rev=9302&view=rev
Comment 13 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:20:30 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.