https://bugs.openldap.org/show_bug.cgi?id=9672
Issue ID: 9672 Summary: Permit static linking with libsasl2 Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: build Assignee: bugs@openldap.org Reporter: dpa-openldap@aegee.org Target Milestone: ---
Created attachment 838 --> https://bugs.openldap.org/attachment.cgi?id=838&action=edit pkg-config + libsasl2 = ♥
I want to link slapd statically. First I link openssl and libsasl2 statically. The static libsasl2 bundles all SASL plugins, and linking towards it must be done (in my case) with -lcrypto. The check in configure.ac:
``` AC_CHECK_LIB(sasl2, sasl_client_init, [ol_link_sasl="-lsasl2"], [AC_CHECK_LIB(sasl, sasl_client_init, [ol_link_sasl="-lsasl"])]) ```
fails, since -lcrypto is not passed during linking with the static -lsasl2 . `pkg-config --statit libsasl2 --libs` knows how to link statically with libsasl2 and it knows, whether libsasl2 is installed.
The applied patch does linking/preprocessing of libsasl2 by utilizing pkg-config, when available.
https://bugs.openldap.org/show_bug.cgi?id=9672
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID
--- Comment #1 from Howard Chu hyc@openldap.org --- Just add -lcrypto to LIBS before running configure.
https://bugs.openldap.org/show_bug.cgi?id=9672
--- Comment #2 from dpa-openldap@aegee.org dpa-openldap@aegee.org --- When GSSAPI is bundled in libsasl2.a, the amount of need libraries to be added manually increases. Pkg-config provides means to avoid manual adding these libraries.
Besides, WiredTiger is detected with pkg-config, and to some extend also systemd . So I do not see a reason to skip the advantages, offered by pkgconfig, when it comes to cyrus sasl.
https://bugs.openldap.org/show_bug.cgi?id=9672
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED