Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use dlopen, dlsym, etc. to minimize depnendencies #349
It's worth mentioning that libextractor has a bunch of similar design consideraints to libcurl, both dynamically link against many external libraries, most of which are rarely used, both run on many platforms, etc. But
Instead of directly linking to libraries it only rarely uses, libextractor builds a shared object plugin for the different filetypes it supports, and those shared objects link against the external libraries they need. See : https://www.gnu.org/software/libextractor/
I'd imagine doing this with libcurl would be an unpleasently large change, but if done well it'd buy libcurl users some additional flexibility. At minimum, it'd simplify packaging libcurl for distributions that usually do not want stuff like LDAP, SSH, etc. but cannot exclude them all outright. And importantly plugins would aid in tightening AppArmor and SELinux profiles for applicaitons that use libcurl. It might therefore be worth considering such a change for "some future version".
Appears libcurl was "manually" dynamically linking the LDAP libraries using
In libextractor, there are modules for each filetype that live under
As an aside, there is a
I think this is a pretty interesting idea. I would say that a primary obstacle would be that it would need to be configurable since we have lots of users who want everything build statically and libcurl builds and runs on many systems that don't load stuff at run-time like normal *nix systems. This is not a priority feature for me personally so I'm not likely to work on it anytime soon. I'd be willing to help out if anyone else is willing to experiment.