GNOME Bugzilla – Bug 307823
libxml2 2.6.19 does not compile when configured --without-schemas
Last modified: 2009-08-15 18:40:50 UTC
Please describe the problem: Two function definitions and one static variable definition contained within #ifdef LIBXML_SCHEMAS_ENABLED -- gen_void_ptr_ptr(), des_void_ptr_ptr(), and gen_nb_void_ptr_ptr -- are needed for segments of code contained within #ifdef LIBXML_READER_ENABLED and #ifdef LIBXML_MODULES_ENABLED. When libxml2 is configured --without-schemas, the definitions are disabled, but the code attempting to use them is still in place. It, of course, dies on compile. Steps to reproduce: 1. gzip -dc libxml2-2.6.19.tar.gz | tar -xf - 2. cd libxml-2.2.6.19 3. ./configure --without-schemas 4. make Watch it get to testapi.c and die messily. Actual results: The compile fails with the following: if gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -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 testapi.o -MD -MP -MF ".deps/testapi.Tpo" -c -o testapi.o testapi.c; then mv -f ".deps/testapi.Tpo" ".deps/testapi.Po"; else rm -f ".deps/testapi.Tpo"; exit 1; fi testapi.c: In function `test_xmlModuleSymbol': testapi.c:28545: error: `gen_nb_void_ptr_ptr' undeclared (first use in this function) testapi.c:28545: error: (Each undeclared identifier is reported only once testapi.c:28545: error: for each function it appears in.) testapi.c:28549: warning: implicit declaration of function `gen_void_ptr_ptr' testapi.c:28549: warning: nested extern declaration of `gen_void_ptr_ptr' testapi.c:28549: warning: assignment makes pointer from integer without a cast testapi.c:28556: warning: implicit declaration of function `des_void_ptr_ptr' testapi.c:28556: warning: nested extern declaration of `des_void_ptr_ptr' testapi.c: In function `test_xmlTextReaderGetErrorHandler': testapi.c:29865: error: `gen_nb_void_ptr_ptr' undeclared (first use in this function) testapi.c:29869: warning: nested extern declaration of `gen_void_ptr_ptr' testapi.c:28549: warning: redundant redeclaration of 'gen_void_ptr_ptr' testapi.c:28549: warning: previous implicit declaration of 'gen_void_ptr_ptr' was here testapi.c:29869: warning: assignment makes pointer from integer without a cast testapi.c:29875: warning: nested extern declaration of `des_void_ptr_ptr' testapi.c:28556: warning: redundant redeclaration of 'des_void_ptr_ptr' testapi.c:28556: warning: previous implicit declaration of 'des_void_ptr_ptr' was here testapi.c: At top level: testapi.c:301: warning: 'gen_unsigned_long' defined but not used testapi.c:308: warning: 'des_unsigned_long' defined but not used testapi.c:327: warning: 'gen_unsigned_long_ptr' defined but not used testapi.c:332: warning: 'des_unsigned_long_ptr' defined but not used *** Error code 1 make: Fatal error: Command failed for target `testapi.o' Current working directory /home/mjbauer/build/libxml2/src *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /home/mjbauer/build/libxml2/src *** Error code 1 make: Fatal error: Command failed for target `all' Expected results: testapi.c to compile without errors. Does this happen every time? Yes. Other information:
Seems fixed in CVS already. Or I can't reproduce your problem here... Daniel
Oh it wasn't, but should be fixed soon as well as a couple of other problems related to --without-schemas thanks, Daniel
This should be closed by release of libxml2-2.6.21, thanks, Daniel