Bug 192584 - isc-dhcp41-server will not build with LDAP support
Summary: isc-dhcp41-server will not build with LDAP support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-11 16:25 UTC by denis
Modified: 2014-08-12 15:08 UTC (History)
3 users (show)

See Also:


Attachments
Patch to add LDFLAGs needed for LDAP patch to build (435 bytes, patch)
2014-08-11 17:05 UTC, Denis Lemire
no flags Details | Diff
Add LDFLAGs variable required to build with LDAP support (470 bytes, patch)
2014-08-12 14:56 UTC, Denis Lemire
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description denis 2014-08-11 16:25:19 UTC
isc-dhcp41-server will not build with LDAP patch:

checking whether ldap_initialize is declared... yes
configure: error: in `/usr/ports/net/isc-dhcp41-server/work/dhcp-4.1-ESV-R7':
configure: error: *** Unable to find ldap_initialize()
See `config.log' for more details
===>  Script "configure" failed unexpectedly.
Please report the problem to douglas@douglasthrift.net [maintainer] and attach
the "/usr/ports/net/isc-dhcp41-server/work/dhcp-4.1-ESV-R7/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/isc-dhcp41-server
*** Error code 1

Stop.
make: stopped in /usr/ports/net/isc-dhcp41-server


Reviewing config.log:
configure:6430: cc -o conftest -O2 -pipe -fPIC -DLDAP_DEPRECATED -fno-strict-aliasing -D_PATH_DHCLIENT_SCRIPT='"/usr/
local/sbin/dhclient-script"' -D_PATH_DHCLIENT_CONF='"/usr/local/etc/dhclient.conf"' -D_PATH_DHCPD_CONF='"/usr/local/etc/dhcpd.conf"' -I/usr/local/include  -Wl,-rpath,/usr/lib:/usr/local/lib -Wl,-rpath,/usr/lib:/usr/local/lib -Wl,-rpath,/usr/lib:/usr/local/lib -Wl,-rpath,/usr/lib:/usr/local/lib conftest.c -lldap -llber >&5
/usr/bin/ld: cannot find -lldap

How-To-Repeat:
	Attempt to build isc-dhcp41-server with LDAP patch enabled

Fix:

	Fix currently unknown, worked as recent as isc-dhcp41-server-4.1.e_7,2
Comment 1 Denis Lemire 2014-08-11 17:05:28 UTC
Created attachment 145671 [details]
Patch to add LDFLAGs needed for LDAP patch to build

Found a simple fix, just needed to add the LDFLAGs variable...
Comment 2 John Marino freebsd_committer freebsd_triage 2014-08-11 20:40:23 UTC
back to Douglas for 2nd time this week...
Approval needed for LDAP patch.
Comment 3 Douglas Thrift 2014-08-11 21:17:42 UTC
I think that it should be -L${LOCALBASE}/lib like the other lines in there.
Comment 4 John Marino freebsd_committer freebsd_triage 2014-08-11 21:40:36 UTC
(In reply to douglas from comment #3)
> I think that it should be -L${LOCALBASE}/lib like the other lines in there.

I agree.
I also think it's strange that LDFLAGS is needed after LIBS was introduced to this port.  It doesn't hurt to have both LIBS and LDFLAGS though.
Comment 5 John Marino freebsd_committer freebsd_triage 2014-08-11 21:41:54 UTC
denis, can you add a new attachment and make the old one "obsolete"?
Comment 6 Denis Lemire 2014-08-12 14:56:22 UTC
Created attachment 145711 [details]
Add LDFLAGs variable required to build with LDAP support

Updated patch to use $LOCALBASE
Comment 7 commit-hook freebsd_committer freebsd_triage 2014-08-12 15:07:33 UTC
A commit references this bug:

Author: marino
Date: Tue Aug 12 15:06:57 UTC 2014
New revision: 364711
URL: http://svnweb.freebsd.org/changeset/ports/364711

Log:
  net/isc-dhcp41-server: Fix build with LDAP support

  PR:		192584
  Submitted by:	denis (inferno.incoherency.net)
  Approved by:	maintainer (Douglas Thrift)

Changes:
  head/net/isc-dhcp41-server/Makefile
Comment 8 John Marino freebsd_committer freebsd_triage 2014-08-12 15:08:23 UTC
Done, thanks!