Skip to content

Incomplete pkg-config for static linking #1918

@dridi

Description

@dridi

Hello,

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:

https://people.freedesktop.org/~dbn/pkg-config-guide.html#writing

cc @gquintard

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions