Package: w3m Version: 0.5.3-3 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu ubuntu-patch precise
w3m failed to build from source in the current Ubuntu development release. Here's the relevant part of the build log: gcc -Wall -g -DDEBIAN -I. -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -I./libwc -I/usr/include/openssl -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/lib/w3m\" -DCGIBIN_DIR=\"/usr/lib/w3m/cgi-bin\" -DHELP_DIR=\"/usr/share/w3m\" -DETC_DIR=\"/etc\" -DCONF_DIR=\"/etc/w3m\" -DRC_DIR=\"~/.w3m\" -DLOCALEDIR=\"/usr/share/locale\" -c -o etc.o etc.c etc.c:638:8: error: conflicting types for 'sys_errlist' /usr/include/i386-linux-gnu/bits/sys_errlist.h:28:30: note: previous declaration of 'sys_errlist' was here etc.c:640:1: warning: return type defaults to 'int' [-Wreturn-type] etc.c: In function 'mySystem': etc.c:1462:8: warning: ignoring return value of 'system', declared with attribute warn_unused_result [-Wunused-result] etc.c: In function 'prepare_sys_errlist': etc.c:652:1: warning: control reaches end of non-void function [-Wreturn-type] make[1]: *** [etc.o] Error 1 This turns out to be because the configure test failed due to -Werror=format-security being set in CFLAGS. This doesn't currently happen in unstable because w3m isn't using the output of dpkg-buildflags (http://lists.debian.org/debian-devel-announce/2011/09/msg00001.html), but that will be a problem once you enable this. Here's a patch to fix the build under -Werror=format-security. * debian/patches/060_format-security.patch: Appease gcc -Werror=format-security. diff -Nru w3m-0.5.3/debian/patches/060_format-security.patch w3m-0.5.3/debian/patches/060_format-security.patch --- w3m-0.5.3/debian/patches/060_format-security.patch 1970-01-01 01:00:00.000000000 +0100 +++ w3m-0.5.3/debian/patches/060_format-security.patch 2011-10-23 09:35:00.000000000 +0100 @@ -0,0 +1,44 @@ +Description: Appease gcc -Werror=format-security +Author: Colin Watson <cjwat...@ubuntu.com> +Forwarded: no +Last-Update: 2011-10-23 + +Index: b/acinclude.m4 +=================================================================== +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -866,7 +866,7 @@ + AC_TRY_COMPILE( + changequote(<<,>>)dnl + <<extern char *sys_errlist[];>>, +-<<printf(sys_errlist[0]);>>, ++<<printf("%s", sys_errlist[0]);>>, + changequote([,])dnl + [have_sys_errlist="yes"; AC_DEFINE(HAVE_SYS_ERRLIST)], + [have_sys_errlist="no"]) +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -8986,7 +8986,7 @@ + int + main () + { +-printf(sys_errlist[0]); ++printf("%s", sys_errlist[0]); + ; + return 0; + } +Index: b/w3mbookmark.c +=================================================================== +--- a/w3mbookmark.c ++++ b/w3mbookmark.c +@@ -99,7 +99,7 @@ + fprintf(f, "<body>\n<h1>Bookmarks</h1>\n"); + fprintf(f, "<h2>%s</h2>\n<ul>\n", section); + fprintf(f, "<li><a href=\"%s\">%s</a>\n", url, title); +- fprintf(f, end_section); ++ fprintf(f, "%s", end_section); + fprintf(f, "</ul>\n</body>\n</html>\n"); + fclose(f); + } diff -Nru w3m-0.5.3/debian/patches/series w3m-0.5.3/debian/patches/series --- w3m-0.5.3/debian/patches/series 2011-06-19 13:08:16.000000000 +0100 +++ w3m-0.5.3/debian/patches/series 2011-10-23 09:28:37.000000000 +0100 @@ -3,3 +3,4 @@ 030_pager-s-option.patch 040_link_gcc45.patch 050_entity-h-clean.patch +060_format-security.patch Thanks, -- Colin Watson [cjwat...@ubuntu.com] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org