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.
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.
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 ?
I did 'elfdump -c' on libgen.so, and there is no getspnam in it's string table. getspnam is in libc.so.
Jason, could you attach the gzipped config.log file ? Thanks.
Created attachment 1068 [details] config.log
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.
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
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.
Created attachment 1214 [details] check for getspnam in libc before trying libgen
Any comments on patch?
Reassign IRIX bugs to me.
Fixed in http://websvn.samba.org/cgi-bin/viewcvs.cgi?rev=9302&view=rev
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.