GNOME Bugzilla – Bug 747521
web-extension also needs libxml in configure.ac
Last modified: 2015-09-08 17:40:02 UTC
While building (-j4) I get the following error: building libephywebextension_la-ephy-string.lo CC libephywebextension_la-ephy-form-auth-data.lo CC libephywebextension_la-ephy-settings.lo building libephywebextension_la-ephy-uri-helpers.lo CC libephywebextension_la-ephy-string.lo ../../lib/ephy-file-helpers.c:41:30: fatal error: libxml/xmlreader.h: No such file or directory #include <libxml/xmlreader.h> Adding libxml to web-extension deps solves the problem: --- configure.ac.orig 2015-04-08 18:53:52.284580835 +0200 +++ configure.ac 2015-04-08 18:55:55.697225280 +0200 @@ -113,6 +113,7 @@ PKG_CHECK_MODULES(WEB_EXTENSION, [ webkit2gtk-web-extension-4.0 >= $WEBKIT_GTK_REQUIRED libsecret-1 >= $LIBSECRET_REQUIRED + libxml-2.0 >= $LIBXML_REQUIRED ]) AC_SUBST(WEB_EXTENSION_CFLAGS) AC_SUBST(WEB_EXTENSION_LIBS)
Thanks for reporting. What versions of automake and libtool are you using? And what linker (ld.gold perhaps)? Anything interesting set in LDFLAGS? My Makefile was generated with the following: DEPENDENCIES_CFLAGS = -pthread -D_REENTRANT -I/home/mcatanzaro/jhbuild/install/include/gtk-3.0/unix-print -I/home/mcatanzaro/jhbuild/install/include/libwnck-3.0 -I/home/mcatanzaro/jhbuild/install/include/webkitgtk-4.0 -I/home/mcatanzaro/jhbuild/install/include/libsoup-2.4 -I/home/mcatanzaro/jhbuild/install/include/libsecret-1 -I/home/mcatanzaro/jhbuild/install/include/gnome-desktop-3.0 -I/home/mcatanzaro/jhbuild/install/include/gcr-3 -I/home/mcatanzaro/jhbuild/install/include/gtk-3.0 -I/home/mcatanzaro/jhbuild/install/include/at-spi2-atk/2.0 -I/home/mcatanzaro/jhbuild/install/include/at-spi-2.0 -I/home/mcatanzaro/jhbuild/install/include/gtk-3.0 -I/home/mcatanzaro/jhbuild/install/include/gio-unix-2.0/ -I/home/mcatanzaro/jhbuild/install/include/cairo -I/home/mcatanzaro/jhbuild/install/include/pango-1.0 -I/home/mcatanzaro/jhbuild/install/include/harfbuzz -I/home/mcatanzaro/jhbuild/install/include/pango-1.0 -I/home/mcatanzaro/jhbuild/install/include/atk-1.0 -I/home/mcatanzaro/jhbuild/install/include/cairo -I/home/mcatanzaro/jhbuild/install/include/gdk-pixbuf-2.0 -I/home/mcatanzaro/jhbuild/install/include/gcr-3 -I/home/mcatanzaro/jhbuild/install/include/gck-1 -I/home/mcatanzaro/jhbuild/install/include/glib-2.0 -I/home/mcatanzaro/jhbuild/install/lib/glib-2.0/include -I/home/mcatanzaro/jhbuild/install/include/gsettings-desktop-schemas -I/usr/include/startup-notification-1.0 -I/usr/include/libxml2 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/p11-kit-1 WEB_EXTENSION_CFLAGS = -pthread -I/home/mcatanzaro/jhbuild/install/include/webkitgtk-4.0 -I/home/mcatanzaro/jhbuild/install/include/gtk-3.0 -I/home/mcatanzaro/jhbuild/install/include/at-spi2-atk/2.0 -I/home/mcatanzaro/jhbuild/install/include/at-spi-2.0 -I/home/mcatanzaro/jhbuild/install/include/gtk-3.0 -I/home/mcatanzaro/jhbuild/install/include/gio-unix-2.0/ -I/home/mcatanzaro/jhbuild/install/include/cairo -I/home/mcatanzaro/jhbuild/install/include/pango-1.0 -I/home/mcatanzaro/jhbuild/install/include/harfbuzz -I/home/mcatanzaro/jhbuild/install/include/pango-1.0 -I/home/mcatanzaro/jhbuild/install/include/atk-1.0 -I/home/mcatanzaro/jhbuild/install/include/cairo -I/home/mcatanzaro/jhbuild/install/include/gdk-pixbuf-2.0 -I/home/mcatanzaro/jhbuild/install/include/libsoup-2.4 -I/home/mcatanzaro/jhbuild/install/include/webkitgtk-4.0 -I/home/mcatanzaro/jhbuild/install/include/libsecret-1 -I/home/mcatanzaro/jhbuild/install/include/glib-2.0 -I/home/mcatanzaro/jhbuild/install/lib/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/libxml2
I have libxml2 include in DEPENDENCIES_CFLAGS but not in WEB_EXTENSION_CFLAGS. Rebuilt with -j1 and it fails when compiling libephywebextension_la-ephy-file-helpers.lo Using autoconf 2.69, automake 1.14.1, libtool 2.4.5, pkgconfig 0.28. Neither webkit2gtk-web-extension-4.0 nor libsecret-1 propagate libxml2 as dependency, am I wrong? So I wonder how do you get that libxml2 into WEB_EXTENSION_CFLAGS.
Created attachment 301214 [details] [review] web-extension: don't compile files multiple times Can you build using this patch? If not, let's just take yours. We link with libxml regardless, so it's only a build fix.
That patch breaks the build a different way: make[4]: Entering directory `/tmp/nix-build-epiphany-3.16.0.drv-2/epiphany-3.16.0/embed/web-extension' building libephywebextension_la-ephy-embed-form-auth.lo CC libephywebextension_la-ephy-embed-form-auth.lo building libephywebextension_la-ephy-web-extension.lo CC libephywebextension_la-ephy-web-extension.lo ephy-web-extension.c:32:24: fatal error: uri-tester.h: No such file or directory #include "uri-tester.h" ^ compilation terminated. make[4]: *** [libephywebextension_la-ephy-web-extension.lo] Error 1 make[4]: Leaving directory `/tmp/nix-build-epiphany-3.16.0.drv-2/epiphany-3.16.0/embed/web-extension' make[3]: *** [all-recursive] Error 1
Maybe you need to use 'git am' (or 'git bz apply') to pick up the rename?
Ok compiles fine.
Carlos, any thoughts on this bug? I don't understand why we have -I/usr/include/libxml2 but Luca doesn't.
Review of attachment 301214 [details] [review]: Removing from the unreviewed patches list. We agreed to make a new convenience library for the shared files.
Created attachment 310318 [details] [review] Split files shared with the web extension into a new library This ensures we don't have to compile anything twice without linking the web extension to unnecessary libraries. This is what we agreed on, but now that I've implemented it, I rather don't like it: too much trouble. I'd rather just link the web extension to the current libephymisc.la and be done with it. Let's pick one patch or the other now, since the build is broken due to some toolchain change between F22 and F23 (which will no doubt make its way into Debian sooner or later).
Created attachment 310319 [details] [review] Link the web extension to libephymisc.la This avoids compiling many files multiple times. Also, move the uri-tester into the web extension directory, since that's the only place it's used. This is the patch I recommend, but I guess Carlos isn't a fan of this.
We discussed this via Jabber and agreed to go with the patch I recommend, and revert it later if Carlos asks us to. :)
Attachment 310319 [details] pushed as b518c6e - Link the web extension to libephymisc.la