I'm getting errors building Xalan-C from the trunk (revision 1294167 to be precise) that I cannot figure out for the life of me, and I'm hoping someone out there can help me. I'm not super familiar with the Linux toolchain, so it's possible I'm making some kind of newbie mistake. I was able to get Xalan-C building on Windows with VC10 (I even seem to have updated the projects/solutions to use ICU as a message loader, though I haven't actually tested using that build yet).
I'm building on Ubuntu 12.04 (which is currently a beta release, I realize, but the version of gcc has only changed from 4.6.1 to 4.6.3 since the last release of Ubuntu, 11.10, which doesn't seem likely to cause this kind of trouble). I would prefer to just use the libxerces-c-dev package (which is 3.1.1), but after getting these errors I also tried building Xerces myself and ended up with the exact same problem. I used the default configure options for Xalan (-p linux, -c gcc, -x g++) and for Xerces when I built it myself. Basically, I get a whole lot of "undefined reference to" various xerces_3_1::* symbols. See the attached xalan.log for the full make output. The obvious problem would be that the reference to the xerces-c lib is missing, however the command line from the make output proves this not to be the case. It correctly uses -L to reference the Xerces lib folder, and uses -lxerces-c to reference the lib itself, and would spit errors if it couldn't find the lib (I tried several bogus lib names to check this). Furthermore, using the "nm" utility on libxerces-c.so (and libxerces-c.a, for whatever it's worth) clearly shows that it contains the symbols that are apparently undefined. So, at this point, I'm at a loss. Can anyone suggest something I'm missing? Here's console output from an attempted build. The referenced xalan.log is attached. Thanks for any suggestions! $ pwd /home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167 $ echo $XERCESCROOT /home/andy/Development/Libraries/Builds/xerces-c-3.1.1 $ echo $XALANCROOT /home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167 $ make > xalan.log 2>&1 $ nm $XERCESCROOT/lib/libxerces-c.so --demangle | grep 'xercesc_3_1::XMLString::stringLen' 00126f60 T xercesc_3_1::XMLString::stringLen(char const*) $ nm $XERCESCROOT/lib/libxerces-c.so --demangle | grep 'xercesc_3_1::XMLString::compareString' 00126ae0 T xercesc_3_1::XMLString::compareString(char const*, char const*) 00127bc0 T xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*) $ nm $XERCESCROOT/lib/libxerces-c.so --demangle | grep 'xercesc_3_1::XMLString::release' 00128cf0 T xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*) 00128d20 T xercesc_3_1::XMLString::release(unsigned short**, xercesc_3_1::MemoryManager*)
make -C src/xalanc all make[1]: Entering directory `/home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167/src/xalanc' Preparing the directory structure for a build ... mkdir -p ../../obj mkdir -p ../../lib mkdir -p ../../bin make -C Utils prepare make[2]: Entering directory `/home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167/src/xalanc/Utils' mkdir -p ../../../nls mkdir -p ../../../nls/include make[2]: Leaving directory `/home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167/src/xalanc/Utils' make -C Utils locale make[2]: Entering directory `/home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167/src/xalanc/Utils' make -C MsgCreator make[3]: Entering directory `/home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167/src/xalanc/Utils/MsgCreator' g++ -DLINUX -fPIC -pthread -D_REENTRANT -DXALAN_INMEM_MSG_LOADER \ -lm -lpthread -L/home/andy/Development/Libraries/Builds/xerces-c-3.1.1/lib -lxerces-c ../../../../obj/MsgFileOutputStream.o ../../../../obj/ICUResHandler.o ../../../../obj/InMemHandler.o ../../../../obj/MsgCreator.o ../../../../obj/NLSHandler.o ../../../../obj/SAX2Handler.o -o ../../../../bin/MsgCreator ../../../../obj/InMemHandler.o: In function `xalanc_1_11::InMemHandler::printToDataFile(char const**)': InMemHandler.cpp:(.text+0xb4): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' ../../../../obj/InMemHandler.o: In function `xalanc_1_11::InMemHandler::createBottomForDataFile()': InMemHandler.cpp:(.text+0x163): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' InMemHandler.cpp:(.text+0x186): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' InMemHandler.cpp:(.text+0x1e9): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' ../../../../obj/InMemHandler.o: In function `xalanc_1_11::InMemHandler::printBeginOfDataLine()': InMemHandler.cpp:(.text+0x31c): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' ../../../../obj/InMemHandler.o:InMemHandler.cpp:(.text+0x610): more undefined references to `xercesc_3_1::XMLString::stringLen(char const*)' follow ../../../../obj/InMemHandler.o: In function `xalanc_1_11::InMemHandler::endElement(unsigned short const*, unsigned short const*, unsigned short const*)': InMemHandler.cpp:(.text+0x6a2): undefined reference to `xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*)' ../../../../obj/InMemHandler.o: In function `xalanc_1_11::InMemHandler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_3_1::Attributes const&)': InMemHandler.cpp:(.text+0x710): undefined reference to `xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*)' InMemHandler.cpp:(.text+0x726): undefined reference to `xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*)' ../../../../obj/MsgCreator.o: In function `xercesc_3_1::XMLAttDefList::~XMLAttDefList()': MsgCreator.cpp:(.text._ZN11xercesc_3_113XMLAttDefListD0Ev[_ZN11xercesc_3_113XMLAttDefListD5Ev]+0x22): undefined reference to `xercesc_3_1::XMemory::operator delete(void*)' ../../../../obj/MsgCreator.o: In function `StrX::~StrX()': MsgCreator.cpp:(.text._ZN4StrXD2Ev[_ZN4StrXD5Ev]+0x11): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' MsgCreator.cpp:(.text._ZN4StrXD2Ev[_ZN4StrXD5Ev]+0x23): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' ../../../../obj/MsgCreator.o: In function `main': MsgCreator.cpp:(.text.startup+0x116): undefined reference to `xercesc_3_1::XMLUni::fgXercescDefaultLocale' MsgCreator.cpp:(.text.startup+0x136): undefined reference to `xercesc_3_1::XMLPlatformUtils::Initialize(char const*, char const*, xercesc_3_1::PanicHandler*, xercesc_3_1::MemoryManager*)' MsgCreator.cpp:(.text.startup+0x13c): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' MsgCreator.cpp:(.text.startup+0x14e): undefined reference to `xercesc_3_1::XMLReaderFactory::createXMLReader(xercesc_3_1::MemoryManager*, xercesc_3_1::XMLGrammarPool*)' MsgCreator.cpp:(.text.startup+0x154): undefined reference to `xercesc_3_1::XMLUni::fgSAX2CoreValidation' MsgCreator.cpp:(.text.startup+0x172): undefined reference to `xercesc_3_1::XMLUni::fgXercesDynamic' MsgCreator.cpp:(.text.startup+0x18c): undefined reference to `xercesc_3_1::XMLUni::fgSAX2CoreNameSpaces' MsgCreator.cpp:(.text.startup+0x1a6): undefined reference to `xercesc_3_1::XMLUni::fgXercesSchema' MsgCreator.cpp:(.text.startup+0x1c0): undefined reference to `xercesc_3_1::XMLUni::fgXercesSchemaFullChecking' MsgCreator.cpp:(.text.startup+0x1da): undefined reference to `xercesc_3_1::XMLUni::fgSAX2CoreNameSpacePrefixes' MsgCreator.cpp:(.text.startup+0x394): undefined reference to `xercesc_3_1::XMLPlatformUtils::Terminate()' MsgCreator.cpp:(.text.startup+0x52f): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' MsgCreator.cpp:(.text.startup+0x540): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' MsgCreator.cpp:(.text.startup+0x726): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' ../../../../obj/MsgCreator.o:(.data.rel.ro._ZTVN11xercesc_3_113XMLAttDefListE[vtable for xercesc_3_1::XMLAttDefList]+0x10): undefined reference to `xercesc_3_1::XMLAttDefList::isSerializable() const' ../../../../obj/MsgCreator.o:(.data.rel.ro._ZTVN11xercesc_3_113XMLAttDefListE[vtable for xercesc_3_1::XMLAttDefList]+0x14): undefined reference to `xercesc_3_1::XMLAttDefList::serialize(xercesc_3_1::XSerializeEngine&)' ../../../../obj/MsgCreator.o:(.data.rel.ro._ZTVN11xercesc_3_113XMLAttDefListE[vtable for xercesc_3_1::XMLAttDefList]+0x18): undefined reference to `xercesc_3_1::XMLAttDefList::getProtoType() const' ../../../../obj/MsgCreator.o:(.data.DW.ref._ZTIN11xercesc_3_112XMLExceptionE[DW.ref._ZTIN11xercesc_3_112XMLExceptionE]+0x0): undefined reference to `typeinfo for xercesc_3_1::XMLException' ../../../../obj/SAX2Handler.o: In function `xalanc_1_11::SAX2Handler::~SAX2Handler()': SAX2Handler.cpp:(.text+0xa4): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0xb5): undefined reference to `xercesc_3_1::XMLString::release(unsigned short**, xercesc_3_1::MemoryManager*)' ../../../../obj/SAX2Handler.o: In function `StrX::~StrX() [clone .constprop.4]': SAX2Handler.cpp:(.text+0x221): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0x22f): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' ../../../../obj/SAX2Handler.o: In function `xalanc_1_11::SAX2Handler::warning(xercesc_3_1::SAXParseException const&)': SAX2Handler.cpp:(.text+0x271): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0x27f): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x28b): undefined reference to `xercesc_3_1::SAXParseException::getColumnNumber() const' SAX2Handler.cpp:(.text+0x29b): undefined reference to `xercesc_3_1::SAXParseException::getLineNumber() const' SAX2Handler.cpp:(.text+0x2a7): undefined reference to `xercesc_3_1::SAXParseException::getSystemId() const' SAX2Handler.cpp:(.text+0x2ad): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0x2bb): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x3eb): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0x3fd): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x403): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0x415): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' ../../../../obj/SAX2Handler.o: In function `xalanc_1_11::SAX2Handler::fatalError(xercesc_3_1::SAXParseException const&)': SAX2Handler.cpp:(.text+0x4f0): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0x4ff): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x50f): undefined reference to `xercesc_3_1::SAXParseException::getColumnNumber() const' SAX2Handler.cpp:(.text+0x523): undefined reference to `xercesc_3_1::SAXParseException::getLineNumber() const' SAX2Handler.cpp:(.text+0x533): undefined reference to `xercesc_3_1::SAXParseException::getSystemId() const' SAX2Handler.cpp:(.text+0x542): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x687): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x69a): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x6b8): undefined reference to `xercesc_3_1::SAXParseException::SAXParseException(xercesc_3_1::SAXParseException const&)' SAX2Handler.cpp:(.text+0x6be): undefined reference to `xercesc_3_1::SAXParseException::~SAXParseException()' SAX2Handler.cpp:(.text+0x6cb): undefined reference to `typeinfo for xercesc_3_1::SAXParseException' ../../../../obj/SAX2Handler.o: In function `xalanc_1_11::SAX2Handler::error(xercesc_3_1::SAXParseException const&)': SAX2Handler.cpp:(.text+0x7b0): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0x7bf): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x7cf): undefined reference to `xercesc_3_1::SAXParseException::getColumnNumber() const' SAX2Handler.cpp:(.text+0x7e3): undefined reference to `xercesc_3_1::SAXParseException::getLineNumber() const' SAX2Handler.cpp:(.text+0x7f3): undefined reference to `xercesc_3_1::SAXParseException::getSystemId() const' SAX2Handler.cpp:(.text+0x802): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x947): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x95a): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0x978): undefined reference to `xercesc_3_1::SAXParseException::SAXParseException(xercesc_3_1::SAXParseException const&)' SAX2Handler.cpp:(.text+0x97e): undefined reference to `xercesc_3_1::SAXParseException::~SAXParseException()' SAX2Handler.cpp:(.text+0x98b): undefined reference to `typeinfo for xercesc_3_1::SAXParseException' ../../../../obj/SAX2Handler.o: In function `xalanc_1_11::SAX2Handler::printToIndexFile(char const**)': SAX2Handler.cpp:(.text+0xb54): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' ../../../../obj/SAX2Handler.o: In function `xalanc_1_11::SAX2Handler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_3_1::Attributes const&)': SAX2Handler.cpp:(.text+0xc67): undefined reference to `xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*)' SAX2Handler.cpp:(.text+0xce1): undefined reference to `xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*)' SAX2Handler.cpp:(.text+0xd7b): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' ../../../../obj/SAX2Handler.o: In function `xalanc_1_11::SAX2Handler::setLocale(char const*)': SAX2Handler.cpp:(.text+0xe55): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' SAX2Handler.cpp:(.text+0xe68): undefined reference to `xercesc_3_1::XMLString::release(unsigned short**, xercesc_3_1::MemoryManager*)' SAX2Handler.cpp:(.text+0xe7a): undefined reference to `xercesc_3_1::XMLString::transcode(char const*, xercesc_3_1::MemoryManager*)' ../../../../obj/MsgFileOutputStream.o: In function `xalanc_1_11::MsgFileOutputStream::write(char const*, unsigned int)': MsgFileOutputStream.cpp:(.text+0x708): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' MsgFileOutputStream.cpp:(.text+0x71a): undefined reference to `xercesc_3_1::XMLString::transcode(char const*, xercesc_3_1::MemoryManager*)' MsgFileOutputStream.cpp:(.text+0x748): undefined reference to `xercesc_3_1::XMLString::release(unsigned short**, xercesc_3_1::MemoryManager*)' ../../../../obj/MsgFileOutputStream.o: In function `xalanc_1_11::MsgFileOutputStream::writeAsASCII(unsigned short const*, unsigned int)': MsgFileOutputStream.cpp:(.text+0x778): undefined reference to `xercesc_3_1::XMLPlatformUtils::fgMemoryManager' MsgFileOutputStream.cpp:(.text+0x78a): undefined reference to `xercesc_3_1::XMLString::transcode(unsigned short const*, xercesc_3_1::MemoryManager*)' MsgFileOutputStream.cpp:(.text+0x7b8): undefined reference to `xercesc_3_1::XMLString::release(char**, xercesc_3_1::MemoryManager*)' ../../../../obj/ICUResHandler.o: In function `xalanc_1_11::ICUResHandler::printToDataFile(char const**)': ICUResHandler.cpp:(.text+0xc4): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' ../../../../obj/ICUResHandler.o: In function `xalanc_1_11::ICUResHandler::endElement(unsigned short const*, unsigned short const*, unsigned short const*)': ICUResHandler.cpp:(.text+0x4b2): undefined reference to `xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*)' ../../../../obj/ICUResHandler.o: In function `xalanc_1_11::ICUResHandler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_3_1::Attributes const&)': ICUResHandler.cpp:(.text+0x520): undefined reference to `xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*)' ICUResHandler.cpp:(.text+0x536): undefined reference to `xercesc_3_1::XMLString::compareString(unsigned short const*, unsigned short const*)' ../../../../obj/ICUResHandler.o: In function `xercesc_3_1::DefaultHandler::fatalError(xercesc_3_1::SAXParseException const&)': ICUResHandler.cpp:(.text._ZN11xercesc_3_114DefaultHandler10fatalErrorERKNS_17SAXParseExceptionE[xercesc_3_1::DefaultHandler::fatalError(xercesc_3_1::SAXParseException const&)]+0x3a): undefined reference to `xercesc_3_1::SAXParseException::SAXParseException(xercesc_3_1::SAXParseException const&)' ICUResHandler.cpp:(.text._ZN11xercesc_3_114DefaultHandler10fatalErrorERKNS_17SAXParseExceptionE[xercesc_3_1::DefaultHandler::fatalError(xercesc_3_1::SAXParseException const&)]+0x40): undefined reference to `xercesc_3_1::SAXParseException::~SAXParseException()' ICUResHandler.cpp:(.text._ZN11xercesc_3_114DefaultHandler10fatalErrorERKNS_17SAXParseExceptionE[xercesc_3_1::DefaultHandler::fatalError(xercesc_3_1::SAXParseException const&)]+0x4d): undefined reference to `typeinfo for xercesc_3_1::SAXParseException' ../../../../obj/NLSHandler.o: In function `xalanc_1_11::NLSHandler::printBeginOfDataLine()': NLSHandler.cpp:(.text+0x75): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' NLSHandler.cpp:(.text+0xb1): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' ../../../../obj/NLSHandler.o: In function `xalanc_1_11::NLSHandler::printToDataFileAsASCII(char const**)': NLSHandler.cpp:(.text+0x2b4): undefined reference to `xercesc_3_1::XMLString::stringLen(char const*)' collect2: ld returned 1 exit status make[3]: *** [../../../../bin/MsgCreator] Error 1 make[3]: Leaving directory `/home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167/src/xalanc/Utils/MsgCreator' make[2]: *** [../../../bin/MsgCreator] Error 2 make[2]: Leaving directory `/home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167/src/xalanc/Utils' make[1]: *** [locale] Error 2 make[1]: Leaving directory `/home/andy/Development/Libraries/Builds/xalan-c-trunk.1294167/src/xalanc' make: *** [all] Error 2
--------------------------------------------------------------------- To unsubscribe, e-mail: xalan-dev-unsubscr...@xml.apache.org For additional commands, e-mail: xalan-dev-h...@xml.apache.org