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/
Index: lib/libvarnishapi/Makefile.am
===================================================================
--- lib/libvarnishapi/Makefile.am (revision 4939)
+++ lib/libvarnishapi/Makefile.am (working copy)
@@ -25,4 +25,4 @@
libvarnishapi_la_CFLAGS = \
-DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"'
-libvarnishapi_la_LIBADD = @PCRE_LIBS@
+libvarnishapi_la_LIBADD = @PCRE_LIBS@ ../libvarnish/libvarnish.la
signature.asc
Description: Digital signature
_______________________________________________ varnish-dev mailing list [email protected] http://lists.varnish-cache.org/mailman/listinfo/varnish-dev
