Author Topic: Bug in configure script found (was xercesc requirements)  (Read 4702 times)

realflash

  • Guest
I have xercesc-2.6.0 installed at /usr/local/xerces-c, but running the configure script with
Code: [Select]
./configure --with-libxerces-c=/usr/local/xercesc
still results in the config script saying that it isn't installed. Can anyone hint on what further tests I can do to see what's wrong? I have put some debug code and can see that the param is getting into the script OK. Is it a binary release downloaded from xml.apache.org OK? The name libxerces-c seems a little misleading as xercesc is not referred to as this on xml.apache.org.

Any help would be greatly appreciated. Trying to test the latest CVS code.
« Last Edit: 16 June 2005, 12:02:54 by realflash »

realflash

  • Guest
Further:
« Reply #1 on: 15 June 2005, 13:18:44 »
I have added some more debug code, which shows that at the time of the g++ command being run, the working directory is /home/gibbsi/software/glest/glest/mk/linux. Which (I'm guessing) is where conftest.cc is created, so it's not likely to find xercesc under there, is it? Is there perhaps an include missing from this g++ command that gets run?

From config.log:
Code: [Select]
configure:4534: checking for xerces-c
configure:4551: g++ -o conftest   -I-c/include     conftest.cc -L-c/lib  -lxerces-c -lpthread  >&5
conftest.cc:1:42: xercesc/util/PlatformUtils.hpp: No such file or directory
conftest.cc:2: error: expected constructor, destructor, or type conversion before ';' token
conftest.cc: In function `int main(int, char**)':
conftest.cc:6: error: `XMLPlatformUtils' has not been declared
conftest.cc:6: error: `Initialize' undeclared (first use this function)
conftest.cc:6: error: (Each undeclared identifier is reported only once for each function it appears in.)
configure:4557: $? = 1
configure: failed program was:
| #include <xercesc/util/PlatformUtils.hpp>
| XERCES_CPP_NAMESPACE_USE;
| int
| main(int argc, char** argv)
| {
| XMLPlatformUtils::Initialize();
|   ;
|   return 0;
| }
|
configure:4593: result: not found
configure:4608: error: Please install xerces-c
« Last Edit: 16 June 2005, 12:00:07 by realflash »

realflash

  • Guest
FIXED
« Reply #2 on: 16 June 2005, 08:48:02 »
OK, I have cracked this now. It's due to a typo in the configure script. The test command is indeed wrong:

Code: [Select]
configure:4551: g++ -o conftest -I-c/include conftest.cc -L-c/lib -lxerces-c -lpthread >&5
should be

Code: [Select]
configure:4551: g++ -o conftest -I/usr/local/xercesc/include conftest.cc -L/usr/local/xercesc/lib -lxerces-c -lpthread >&5
where configure was run as

Code: [Select]
./configure --with-libxerces-c=/usr/local/xerces
On lines 4525 to 4529 of the configure script, a hyphen is used instead of an underscore:

Code: [Select]
CFLAGS="-I$with_libxerces-c/include $CFLAGS"
CPPFLAGS="-I$with_libxerces-c/include $CPPFLAGS"
LIBS="-L$with_libxerces-c/lib $LIBS"
RESCFLAGS="-I$with_libxerces-c/include $RESCFLAGS"
RESLIBS="-L$with_libxerces-c/lib $RESLIBS"

the var delcared eariler for the passed value of --with-libxerces-c is $with_libxerces_c. As a result, g++ gets called as

Code: [Select]
configure:4551: g++ -o conftest -I$with_libxerces-c/include conftest.cc -L$with_libxerces-c/lib -lxerces-c -lpthread >&5
where $with_libxerces is undefined, resulting in the duff command at the top. To temporarily resolve this issue and make configure work, download
this patch and apply it to configure:

Code: [Select]
patch configure < xercesc-configure.patch

This is only a temporary solution as if autogen.sh gets run configure will be rewritten.
« Last Edit: 1 January 1970, 00:00:00 by realflash »

MatzeB

  • Guest
(No subject)
« Reply #3 on: 18 June 2005, 20:50:27 »
fixed in cvs now.
« Last Edit: 1 January 1970, 00:00:00 by MatzeB »

 

anything