Created attachment 822482 [details] Don't link with openldap libraries at build time. Description of problem: libcurl links with -llber and -lldap and requires liblber-2.4.so.2 and libldap-2.4.so.2 at runtime. These libraries are provided by the openldap package, which is fairly large, and has lots of dependencies. That's unfortunate, as libcurl is required by low-level system tools as Yum and DNF, and broken or missing openldap breaks the whole system. Version-Release number of selected component (if applicable): How reproducible: rpm -e openldap --nodeps Actual results: Any attempt to use libcurl results in a fatal error. Expected results: Limited curl functionality, non-functional ldap:// URLs. Additional info: It'd be nice if openldap libraries were loaded on demand. Please see the attached patch. I'm not sure it works, or it's the best way to deal with the problem- just to give the idea.
RHEL-5 works exactly as you describe -- it loads the libraries at run-time (if the LDAP protocol is actually selected). It used to cause problems and upstream decided to drop that feature long time ago: https://github.com/bagder/curl/commit/d0edb478 I am afraid they are not about to implement it once again...
Thanks for the link. Probably not worth it, wontfix. openldap is about 1MB (large but not huge package), and there are many packages requiring it already: sudo, samba, openssh, dhcp, sssd, sendmail, httpd... Unless we "fix" all of them (highly unlikely), openldap has to be the core component anyway.