News:

Check out the MegaGlest Wiki! Anyone can be an editor, and we want you!

Main Menu

Bug in configure script found (was xercesc requirements)

Started by realflash, 15 June 2005, 13:09:57

realflash

I have xercesc-2.6.0 installed at /usr/local/xerces-c, but running the configure script with
./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.

realflash

#1
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:
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

realflash

#2
OK, I have cracked this now. It's due to a typo in the configure script. The test command is indeed wrong:

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

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

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

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

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:

patch configure < xercesc-configure.patch

This is only a temporary solution as if autogen.sh gets run configure will be rewritten.

MatzeB

#3
fixed in cvs now.