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 780398 - Build failure in Continuous
Build failure in Continuous
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Build
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-22 13:33 UTC by Emmanuele Bassi (:ebassi)
Modified: 2017-04-06 16:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Attempt to fix -Werror build with libxml 2.9.4 (992 bytes, patch)
2017-04-06 16:30 UTC, Michael Catanzaro
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2017-03-22 13:33:02 UTC
Epiphany fails to build in GNOME Continuous:

../../lib/ephy-langs.c:228:52: warning: pointer targets in passing argument 3 of 'xmlStrPrintf' differ in signedness [-Werror=pointer-sign]
../../lib/ephy-langs.c:229:48: warning: pointer targets in passing argument 3 of 'xmlStrPrintf' differ in signedness [-Werror=pointer-sign]

Full build log:

http://build.gnome.org/continuous/buildmaster/builds/2017/03/22/27/build/log-epiphany.txt

I had to manually disable -Werror, but this reduces the utility of having a continuous integration/delivery solution.
Comment 1 Michael Catanzaro 2017-03-22 19:33:35 UTC
I remember discussing these warnings with Christian before. They appear on the Fedora koji builders as well, but not when I build Epiphany with JHBuild. (Perhaps it's related to optimization level? I use -O0.) Anyway, xmlStrPrintf is defined in xmlstring.h as:

XMLPUBFUN int XMLCALL
                xmlStrPrintf             (xmlChar *buf,
                                         int len,
                                         const xmlChar *msg,
                                         ...);

And those call sites are:

  xmlStrPrintf (iso_entries, sizeof (iso_entries), (const xmlChar *)"iso_%d_entries", iso);
  xmlStrPrintf (iso_entry, sizeof (iso_entry), (const xmlChar *)"iso_%d_entry", iso);

So the warning seems to be incorrect. The function expects to receive a const xmlChar *, and that's exactly what it's getting. I'm not sure what can be done here.
Comment 2 PoltoS 2017-04-04 11:58:31 UTC
Looks I see same: https://bugzilla.gnome.org/show_bug.cgi?id=780900

The warning comes from the newly added __printflike__ modifier (under LIBXML_ATTR_FORMAT macro) and changes of the param type from xmlChar (= unsigned char) to char.
Comment 3 Michael Catanzaro 2017-04-04 12:54:38 UTC
Oh wow. So it's caused by a libxml API break. Wasn't expecting that. Thanks for the investigation!
Comment 4 Michael Catanzaro 2017-04-04 12:58:23 UTC
No, something's still not right. I'll comment in bug #780900.
Comment 5 Michael Catanzaro 2017-04-04 13:02:46 UTC
OK, we need to move libxml from sysdeps to core-deps in JHBuild to fix this, so that Epiphany can depend on libxml 2.9.4. :(
Comment 6 PoltoS 2017-04-04 13:05:04 UTC
You also need to change the cast from (const xmlChar *) to ((const char *), since xmlChar is not same as char. This is what I've found in the new header files.
Comment 7 Michael Catanzaro 2017-04-04 13:23:08 UTC
Actually seems Ubuntu has backported that patch, and Fedora is waaay behind on CVEs, so we just need to update libxml2 in Fedora. I'll get the ball rolling.
Comment 8 Michael Catanzaro 2017-04-04 13:23:26 UTC
(In reply to PoltoS from comment #6)
> You also need to change the cast from (const xmlChar *) to ((const char *),
> since xmlChar is not same as char. This is what I've found in the new header
> files.

Well we can get rid of the cast entirely now. ;)
Comment 9 Michael Catanzaro 2017-04-06 16:30:21 UTC
The following fix has been pushed:
0e47861 Attempt to fix -Werror build with libxml 2.9.4
Comment 10 Michael Catanzaro 2017-04-06 16:30:31 UTC
Created attachment 349389 [details] [review]
Attempt to fix -Werror build with libxml 2.9.4

The prototype of this printf function changed.