GNOME Bugzilla – Bug 780398
Build failure in Continuous
Last modified: 2017-04-06 16:30:31 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.
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.
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.
Oh wow. So it's caused by a libxml API break. Wasn't expecting that. Thanks for the investigation!
No, something's still not right. I'll comment in bug #780900.
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. :(
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.
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.
(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. ;)
The following fix has been pushed: 0e47861 Attempt to fix -Werror build with libxml 2.9.4
Created attachment 349389 [details] [review] Attempt to fix -Werror build with libxml 2.9.4 The prototype of this printf function changed.