You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to build the v3/master branch today to attempt a static linking of libmodsecurity in an autotools project. While this works fine, ultimately when I try to run the executable I get this:
dlerror: undefined symbol: xmlFree
After a quick look at your modsecurity.pc file I realized that the private dependencies are missing. You should at least advertise Libs.private for linking and maybe Requires.private if some of your dependencies' API leak into your own headers (eg. a type from another library).
I'm only reporting this and not submitting a patch because you have optional dependencies so I'm not sure how to best piece it together.
More info on static linking and private dependencies:
Thanks for your report. As far as I can recall, only PCRE is mandatory now.
The remainder of dependencies (GeoIP/MaxMind, libcURL, YAJL, LBMD, Lua and Ssdeep) are all optional.
That being said, I believe there should be a way to allow the .pc file to support both dynamically and statically linking. Do you want to submit a pull request? :)
Add Libs.private to save static dependencies so applications linking
statically with modsecurity will be able to retrieve them through
pkg-config
Fixowasp-modsecurity#1918
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Hello,
I tried to build the
v3/master
branch today to attempt a static linking oflibmodsecurity
in an autotools project. While this works fine, ultimately when I try to run the executable I get this:After a quick look at your
modsecurity.pc
file I realized that the private dependencies are missing. You should at least advertiseLibs.private
for linking and maybeRequires.private
if some of your dependencies' API leak into your own headers (eg. a type from another library).I'm only reporting this and not submitting a patch because you have optional dependencies so I'm not sure how to best piece it together.
More info on static linking and private dependencies:
https://people.freedesktop.org/~dbn/pkg-config-guide.html#writing
cc @gquintard
The text was updated successfully, but these errors were encountered: