GNOME Bugzilla – Bug 636750
./configure --with-minimum build failed
Last modified: 2012-05-11 02:55:47 UTC
Building the library fails with the following message: make[2]: Entering directory `/home/anthony/rtl/xml-data-binding/libxml2-2.7.8' gcc -DHAVE_CONFIG_H -I. -I./include -I./include -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -MT xmllint.o -MD -MP -MF .deps/xmllint.Tpo -c -o xmllint.o xmllint.c xmllint.c: In function ‘main’: xmllint.c:3353: error: ‘format’ undeclared (first use in this function) xmllint.c:3353: error: (Each undeclared identifier is reported only once xmllint.c:3353: error: for each function it appears in.) make[2]: *** [xmllint.o] Error 1 make[2]: Leaving directory `/home/anthony/rtl/xml-data-binding/libxml2-2.7.8'
Created attachment 186392 [details] [review] Patch for xmllint.c to mode #endif of LIBXML_OUTPUT_ENABLED down a couple of lines #ifdef LIBXML_OUTPUT_ENABLED format = atoi(argv[i]); #endif /* LIBXML_OUTPUT_ENABLED */ if (format == 1) { noblanks++; xmlKeepBlanksDefault(0); } } becomes #ifdef LIBXML_OUTPUT_ENABLED format = atoi(argv[i]); if (format == 1) { noblanks++; xmlKeepBlanksDefault(0); } +#endif /* LIBXML_OUTPUT_ENABLED */ } as the format variable is not defined unless LIBXML_OUT_ENABLED is defined
Comment on attachment 186392 [details] [review] Patch for xmllint.c to mode #endif of LIBXML_OUTPUT_ENABLED down a couple of lines [Setting "patch" flag and correcting mime type so this can actually be queried for.]
Thanks André ! Brandon, the patch is perfectly right, applied :-) http://git.gnome.org/browse/libxml2/commit/?id=0c7109c81f3de1408ddac898bce0aa21823e3507 thanks a lot ! Daniel