Issue 7071 - OpenLDAP links against unneeded/wrong libnet.so
Summary: OpenLDAP links against unneeded/wrong libnet.so
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: 2.4.26
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-22 17:00 UTC by dam@opencsw.org
Modified: 2014-08-01 21:04 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 dam@opencsw.org 2011-10-22 17:00:55 UTC
Full_Name: Dagobert Michelsen
Version: 2.4.26
OS: Solaris 9
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (86.103.147.208)


During configure time on Solaris libnet.so is picked up. The autoconf code
either picks it up on BeOS (code looks correct) or for socket() to be seen here
in configure.in:

AC_CHECK_FUNC(socket, :, [
dnl hopefully we won't include too many libraries
        AC_CHECK_LIB(socket, main)
        AC_CHECK_LIB(net, main)
        AC_CHECK_LIB(nsl_s, main)
        AC_CHECK_LIB(nsl, main)
        AC_CHECK_LIB(inet, socket)
        AC_CHECK_LIB(gen, main)
])

In addition to the system wide libnet.so on some systems there could be the
packet assembly library from PacketFactory now hosted at
https://github.com/sam-github/libnet be installed which is then unnecessarily
picked up. The autoconf-check seems to not check the presence of socket():

configure:13909: checking for main in -lnet
configure:13928: /opt/SUNWspro/bin/cc -o conftest -xO3 -m32 -xarch=v8
-I/opt/csw/bdb48/include -I/opt/csw/include -m32 -xarch=v8 -L/opt/csw/bdb48/lib
-L/opt/csw/lib -R/opt/csw/bdb48/lib -R/opt/csw/lib conftest.c -lnet  -lsocket 
>&5
"conftest.c", line 81: warning: statement not reached
configure:13928: $? = 0
configure:13937: result: yes

It would be more precise if AC_CHECK_LIB would check the presence of the socket
function call.
Comment 1 Howard Chu 2011-11-01 19:09:48 UTC
changed notes
changed state Open to Test
moved from Incoming to Build
Comment 2 Quanah Gibson-Mount 2011-11-03 00:25:01 UTC
changed notes
changed state Test to Release
Comment 3 Quanah Gibson-Mount 2011-11-28 18:33:10 UTC
changed notes
changed state Release to Closed
Comment 4 OpenLDAP project 2014-08-01 21:04:06 UTC
fixed in master
fixed in RE24