After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747521 - web-extension also needs libxml in configure.ac
web-extension also needs libxml in configure.ac
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Build
3.16.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-08 17:01 UTC by Luca Bruno
Modified: 2015-09-08 17:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
web-extension: don't compile files multiple times (2.38 KB, patch)
2015-04-09 15:28 UTC, Michael Catanzaro
needs-work Details | Review
Split files shared with the web extension into a new library (14.92 KB, patch)
2015-08-30 17:38 UTC, Michael Catanzaro
none Details | Review
Link the web extension to libephymisc.la (2.32 KB, patch)
2015-08-30 17:42 UTC, Michael Catanzaro
committed Details | Review

Description Luca Bruno 2015-04-08 17:01:22 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)
Comment 1 Michael Catanzaro 2015-04-08 17:49:23 UTC
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
Comment 2 Luca Bruno 2015-04-09 08:55:01 UTC
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.
Comment 3 Michael Catanzaro 2015-04-09 15:28:03 UTC
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.
Comment 4 Luca Bruno 2015-04-09 16:00:51 UTC
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
Comment 5 Michael Catanzaro 2015-04-09 18:38:23 UTC
Maybe you need to use 'git am' (or 'git bz apply') to pick up the rename?
Comment 6 Luca Bruno 2015-04-10 14:52:30 UTC
Ok compiles fine.
Comment 7 Michael Catanzaro 2015-05-03 13:07:43 UTC
Carlos, any thoughts on this bug? I don't understand why we have -I/usr/include/libxml2 but Luca doesn't.
Comment 8 Michael Catanzaro 2015-06-16 12:59:40 UTC
Review of attachment 301214 [details] [review]:

Removing from the unreviewed patches list. We agreed to make a new convenience library for the shared files.
Comment 9 Michael Catanzaro 2015-08-30 17:38:09 UTC
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).
Comment 10 Michael Catanzaro 2015-08-30 17:42:32 UTC
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.
Comment 11 Michael Catanzaro 2015-09-08 16:54:17 UTC
We discussed this via Jabber and agreed to go with the patch I recommend, and revert it later if Carlos asks us to. :)
Comment 12 Michael Catanzaro 2015-09-08 17:39:59 UTC
Attachment 310319 [details] pushed as b518c6e - Link the web extension to libephymisc.la