I briefly describe all the unsuccessful strategies (I-IV) that I tried, and the one (V) that finally succeeded. I give all the specific details for the successful strategy at the end. The problem: installing XML::Xerces on a stable-release Debian system without upgrading the system's perl-base and perl-modules packages (based on Perl 5.6.1) to their testing release versions (based on Perl 5.8.x). Strategy I: 1. install Perl 5.8.x under /opt (the system's Perl 5.6.1 is under /usr); 2. install Debian packages libxerces23 and libxerces23-dev (from testing) in the standard way (i.e. using dpkg/apt-get); 3. instead of installing XML::Xerces through the standard Debian package libxml-xerces-perl (which, as already mentioned, would require upgrading the system's perl), build XML::Xerces from sources and install under /opt. This strategy failed: the directive "use XML::Xerces" triggered the error: Can't load '/home/jones/.cpan/build/XML-Xerces-2.3.0-4/blib/arch/auto/XML/Xerces/Xerces.so' for module XML::Xerces: /home/jones/.cpan/build/XML-Xerces-2.3.0-4/blib/arch/auto/XML/Xerces/Xerces.so: undefined symbol: _Q211xercesc_2_316XMLPlatformUtils.fgMemoryManager at /opt/lib/perl5/5.8.3/i686-linux/DynaLoader.pm line 229. It looks like libxerces-c.so.23.0 fails to define the symbol _Q211xercesc_2_316XMLPlatformUtils.fgMemoryManager. Strategy II: 1. install Perl 5.8.x (as above); 2. build libxerces-c.so.23 from sources and install under /opt; 3. build XML::Xerces from sources (linking against the freshly compiled libxerces-c) and install under /opt. This strategy failed because the compiler g++-2.95.4 would throw the error /home/jones/build/xerces-c-src_2_3_0/include/xercesc/dom/impl/DOMDeepNodeListPool.c: In method `xercesc_2_3::DOMDeepNodeListPool<xercesc_2_3::DOMDeepNodeListImpl>::DOMDeepNodeListPool(long unsigned int, bool, long unsigned int = 128)': DOMDocumentImpl.cpp:900: instantiated from here /home/jones/build/xerces-c-src_2_3_0/include/xercesc/dom/impl/DOMDeepNodeListPool.c:104: Internal compiler error. /home/jones/build/xerces-c-src_2_3_0/include/xercesc/dom/impl/DOMDeepNodeListPool.c:104: Please submit a full bug report. /home/jones/build/xerces-c-src_2_3_0/include/xercesc/dom/impl/DOMDeepNodeListPool.c:104: Internal compiler error: /home/jones/build/xerces-c-src_2_3_0/include/xercesc/dom/impl/DOMDeepNodeListPool.c:104: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. make[2]: *** [DOMDocumentImpl.o] Error 1 Strategy III: Like strategy II, but switch compilers to gcc-3.0/g++-3.0. g++-3.0 was able to compile libxerces-c-23, but still this strategy also failed, again at the "make test" step in the build of XML::Xerces. The error was similar to the one that nixed Stragegy I: Can't load '/home/jones/.cpan/build/XML-Xerces-2.3.0-4/blib/arch/auto/XML/Xerces/Xerces.so' for module XML::Xerces: /home/jones/.cpan/build/XML-Xerces-2.3.0-4/blib/arch/auto/XML/Xerces/Xerces.so: undefined symbol: __gxx_personality_v0 at /opt/lib/perl5/5.8.3/i686-linux/DynaLoader.pm line 229. ...except that the undefined symbol this time, __gxx_personality_v0, is one that should be defined in libstdc++. Strategy IV: Like Strategy III, except that in step (2), add the -lstdc++ linker flag, via the runConfigure step: ./runConfigure -plinux -c/usr/bin/gcc-3.0 -x/usr/bin/g++-3.0 -minmem -nsocket -tnative -rpthread -P/opt -l'-lstdc++' Again, this strategy failed at the "make test" step in the build of XML::Xerces. The error was similar to the one that nixed Stragegies I and III: Can't load '/home/jones/.cpan/build/XML-Xerces-2.3.0-4/blib/arch/auto/XML/Xerces/Xerces.so' for module XML::Xerces: /home/jones/.cpan/build/XML-Xerces-2.3.0-4/blib/arch/auto/XML/Xerces/Xerces.so: undefined symbol: _ZN19PerlCallbackHandler16set_callback_objEP2sv at /opt/lib/perl5/5.8.3/i686-linux/DynaLoader.pm line 229. ...but now the undefined symbol is _ZN19PerlCallbackHandler16set_callback_objEP2sv, which doesn't look like it should be defined by libxerces-c-23, but rather by Xerces.o. Strategy V: Like Strategy IV, but for the build of XML::Xerces specify the linker flag --export-dynamic, via perl Makefile.PL LDDLFLAGS='-shared -L/usr/local/lib -Wl,--export-dynamic' (The flags "-shared -L/usr/local/lib" were already generated by default; they need to be specified again; using LDDLFLAGS='-Wl,--export-dynamic' would just overwrite the 'shared -L/usr/local/lib" flags.) SUCCESS AT LAST! Well, partial success. This version of Xerces.so at least won't cause the line "use XML::Xerces" to trigger any "undefined symbol" errors. In fact most tests performed via "make test" succeed. The only ones that fail are actualCast.t and DOMDocument.t. The failure of actualCast.t seems to be insignificant (the number of planned tests does not match the number of tests actually carried out). DOMDocument.t is almost successful, when one considers that it comprises 35,125 subtests, and more than 99% of them succeed. I am not yet sure how serious the few remaining failures are. DETAILS OF STRATEGY V: ENVIRONMENT: $ uname -ar Linux linux 2.4.18c #1 Sun Apr 4 17:45:51 EDT 2004 i686 unknown Debian 3.0 stable release (mostly) $ gcc -v Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20011002 (Debian prerelease) $ gcc-3.0 -v Reading specs from /usr/lib/gcc-lib/i386-linux/3.0.4/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux Thread model: posix gcc version 3.0.4 PROCEDURE: 1. Downloaded sources xerces-c-src_2_3_0.tar.gz and XML-Xerces-2.3.0-4.tar.gz from xml.apache.org and www.cpan.org, respectively. NOTE: DO *NOT* use xerces-c-current.tar.gz. It corresponds to Xerces 2.5.0, which is incompatible with the latest version of XML::Xerces (2.3.0). 2. The sources above where unpacked to the directories $HOME/build/xerces-c-src_2_3_0 and $HOME/build/XML-Xerces-2.3.0-4, respectively. 3. Set environment variables: export XERCESCROOT=$HOME/build/xerces-c-src_2_3_0 4. cd to $XERCESCROOT/src/xercesc, and run runConfigure -plinux -c/usr/bin/gcc-3.0 -x/usr/bin/g++-3.0 -minmem -nsocket -tnative -rpthread -P/opt -l'-lstdc++' make make install (as root) 5. cd to $HOME/build/XML-Xerces-2.3.0-4, and run /opt/bin/perl-5.8.3 Makefile.PL LDDLFLAGS='-shared -L/usr/local/lib -Wl,--export-dynamic' make make test (did not fully succeed for me, as described above) make install (as root) OK, it's time for a beer. Or twelve. Cheers. kj --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
