Bug 255795 - net/openldap24-server: ld: error: unable to find library -lltdl
Summary: net/openldap24-server: ld: error: unable to find library -lltdl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-11 14:36 UTC by O. Hartmann
Modified: 2021-05-12 16:52 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (delphij)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2021-05-11 14:36:17 UTC
Recent update of port net/openldap24-server results in a compiler/linker error, as shown below. Configuration is as follows:

# make showconfig
===> The following configuration options are available for openldap-sasl-server-2.4.58_2:
     ACCESSLOG=on: With In-Directory Access Logging overlay
     ACI=off: Per-object ACI (experimental)
     AUDITLOG=on: With Audit Logging overlay
     BDB=off: With BerkeleyDB backend (DEPRECATED)
     COLLECT=off: With Collect overy Services overlay
     CONSTRAINT=off: With Attribute Constraint overlay
     DDS=on: With Dynamic Directory Services overlay
     DEBUG=off: Build with debugging support
     DEREF=off: With Dereference overlay
     DNSSRV=on: With Dnssrv backend
     DYNACL=on: Run-time loadable ACL (experimental)
     DYNAMIC_BACKENDS=on: Build dynamic backends (DEPRECATED)
     DYNAMIC_MODULES=on: Build dynamic backend and overlay modules
     DYNGROUP=on: With Dynamic Group overlay
     DYNLIST=on: With Dynamic List overlay
     FETCH=off: Enable fetch(3) support
     GSSAPI=on: With GSSAPI support (implies SASL support)
     KQUEUE=off: With kqueue support (experimental)
     LASTBIND=off: With lastbind overlay
     LMPASSWD=off: With LM hash password support (DEPRECATED)
     MDB=on: With Memory-Mapped DB backend
     MEMBEROF=off: With Reverse Group Membership overlay
     ODBC=off: With SQL backend
     OUTLOOK=off: Force caseIgnoreOrderingMatch on name attribute (experimental)
     PASSWD=off: With Passwd backend
     PBKDF2=off: With PBKDF2 hash password support
     PCACHE=on: With Proxy Cache overlay
     PERL=off: With Perl backend
     PPOLICY=on: With Password Policy overlay
     REFINT=off: With Referential Integrity overlay
     RELAY=off: With Relay backend
     RETCODE=off: With Return Code testing overlay
     RLOOKUPS=off: With reverse lookups of client hostnames
     RWM=off: With Rewrite/Remap overlay
     SASL=on: With (Cyrus) SASL2 support
     SEQMOD=on: With Sequential Modify overlay
     SHA2=on: With SHA2 Password hashes overlay
     SHELL=off: With Shell backend (disables threading)
     SLAPI=off: With Netscape SLAPI plugin API (experimental)
     SLP=off: With SLPv2 (RFC 2608) support
     SMBPWD=on: With Samba Password hashes overlay
     SOCK=off: With Sock backend
     SSSVLV=off: With ServerSideSort/VLV overlay
     SYNCPROV=on: With Syncrepl Provider overlay
     TCP_WRAPPERS=on: With tcp wrapper support
     TRANSLUCENT=off: With Translucent Proxy overlay
     UNIQUE=on: With attribute Uniqueness overlay
     VALSORT=off: With Value Sorting overlay

Addednum:

# pkg info -xo tdl
libltdl-2.4.6                  devel/libltdl

The reported error is:

[...]
cc -shared  .libs/ppolicy.o .libs/version.o  -Wl,--rpath -Wl,/usr/ports/net/openldap24-server/work/openldap-2.4.58/libraries/libldap_r/.libs -Wl,--rpath -Wl,/usr/ports/net/openldap24-server/work/openldap-2.4.58/libraries/liblber/.libs -Wl,--rpath -Wl,/usr/local/lib ../../../libraries/libldap_r/.libs/libldap_r.so ../../../libraries/liblber/.libs/liblber.so -lltdl  -Wl,-soname -Wl,ppolicy-2.4.so.2 -o .libs/ppolicy-2.4.so.2.11.6
ld: error: unable to find library -lltdl
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [ppolicy.la] Error code 1
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-05-11 16:43:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d4a6b63b1c335f04cefbdba7b12b8dbb970e9976

commit d4a6b63b1c335f04cefbdba7b12b8dbb970e9976
Author:     Xin LI <delphij@FreeBSD.org>
AuthorDate: 2021-05-11 16:43:38 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2021-05-11 16:43:39 +0000

    net/openldap24-server: Use local libraries paths for libltdl is used.

    Reported by:    O. Hartmann
    PR:             255795

 net/openldap24-server/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 2 Xin LI freebsd_committer freebsd_triage 2021-05-11 16:44:44 UTC
My bad, fixed, thanks for reporting.
Comment 3 O. Hartmann 2021-05-12 08:51:01 UTC
After changes have made and the port compiles now, reinstalling and subsequent restarting then fails:

# service slapd restart
slapd not running? (check /var/run/openldap/slapd.pid).
Performing sanity check on slap configuration: FAILED
/usr/local/etc/rc.d/slapd: WARNING: failed precmd routine for slapd
Comment 4 O. Hartmann 2021-05-12 12:39:43 UTC
The OPTIONS=PPOLICY seems to be the culprit: if enabled and configured for a database as an overlay, this feature is considered a configuration error!
Comment 5 Xin LI freebsd_committer freebsd_triage 2021-05-12 16:32:13 UTC
(In reply to O. Hartmann from comment #4)
I can't reproduce.  Did you happen to have a configuration without:

moduleload      ppolicy

In the "Load dynamic backend modules" section of your slapd.conf?
Comment 6 O. Hartmann 2021-05-12 16:52:55 UTC
We use olc-config throutout our servers running OpenLDAP. Somehow the module ppolicy didn't load - we had to check cn=module. After ldapmodifying everything went as expected. Sorry for the noise.