[PATCH] Link "libvarnishapi" against "libvarnish".

Florian Forster varnish at octo.it
Tue Jun 8 22:38:08 CEST 2010


Hi,

I noticed that "libvarnishapi" uses some symbols found in
"libvarnish" [0] but doesn't link against that library. If a program
simply links with "-lvarnishapi" [1], those symbols can't be found and
the link will fail.

The source of the problem is probably that "libvarnishapi" uses some
source files from the "libvarnish" directory.

The attached patch solves the problem by linking "libvarnishapi" with
"libvarnish", so a dynamic linker can resolve this dependency
automatically. You might want to add "libvarnish" and "pcre" to the
"Libs.private" field in the .pc file in order to fix static linking.

Best regards,
—octo

[0] At least "VRE_compile" and "VRE_exec".
[1] As propagated by the "varnishapi.pc" pkg-config file.
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: link-libvarnishapi.patch
Type: text/x-diff
Size: 406 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100608/f0e12923/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100608/f0e12923/attachment-0003.pgp>


More information about the varnish-dev mailing list