The build document is attached. It'd be nice for some of these changes to end up being backported, so maybe this document could be a stepping stone toward some minor releases. If there's interest, I could probably submit patch files.
Otherwise, any comments are appreciated, and I hope someone finds this useful. -tfo -- Thomas F. O'Connell Programmer NetCentral http://www.netcentral.com/ 1814 Hayes Street Nashville, TN 37203 p: 615.777.5304 x27 f: 615.777.5340
This document provides build instructions for installing the Xerces/Xalan XML suite from the Apache XML Project on a GNU/Linux system. IBM's ICU is used for Unicode and formatting support. Package locations: ICU: ftp://www-126.ibm.com/pub/icu/2.4/icu-2.4.tgz Xerces C++: http://xml.apache.org/dist/xerces-c/stable/archives/Xerces-C_2_0_0/xerces-c-src2_0_0.tar.gz Xerces Perl: http://xml.apache.org/dist/xerces-p/stable/XML-Xerces-2.0.0-3.tar.gz Xalan C++: http://xml.apache.org/dist/xalan-c/archives/Xalan-C_1_4-src.tar.gz XML::Xalan: ftp://ftp.cpan.org/pub/CPAN/modules/by-module/XML/XML-Xalan-0.44.tar.gz N.B. All instructions are based on gcc-3.2.2 and assume building in the same shell environment. Shell syntax is (ba)sh. For the purposes of this document, assume the following: export PREFIX=/usr/local ICU 2.4 ------- 1. export ICUROOT=<absolute path to ICU source> (e.g., $PREFIX/src/icu) (This step is actually required not for ICU but for Xerces/Xalan. I include it here just to provide an example default value for $ICUROOT.) 2. cd $ICUROOT/source 3. chmod +x runConfigureICU configure install-sh 4. runConfigureICU RedHatLinux (This seems to work on other distributions, and there are no other distributions specified in the docs.) 5. gmake; gmake install 6. ldconfig Xerces C++ 2.0.0 ---------------- 1. Modify runConfigure to use the results of `which getopt` if the results do not return /usr/bin/getopt. The syntax for getopts is broken, so one cannot rely on the (ba)sh builtin. N.B. This step is distribution dependent. E.g., Slackware 9.0 just happens to put getopt in /bin rather than /usr/bin. 2. export XERCESCROOT=<absolute path to Xerces source> (e.g., $PREFIX/src/xerces-c-2_0_0) 4. Modify $XERCESCROOT/util/regx/XMLUniCharacter.cpp $XERCESCROOT/util/regx/TokenFactory.cpp $XERCESCROOT/util/Transcoders/ICU/ICUTransService.cpp Change #include <unicode/unicode.h> to #include <unicode/uchar.h> 5. Modify $XERCESCROOT/util/Trancoders/ICU/ICUTransService.cpp. Change all instances of Unicode::toUpperCase -> u_toupper Unicode::isSpaceChar -> u_isspace Unicode::toLowerCase -> u_tolower 6. Modify $XERCESCROOT/util/regx/XMLUniCharacter.cpp, changing Unicode::getType -> u_charType 7. runConfigure -plinux -cgcc -xg++ -minmem -nsocket -ticu -rpthread -P$PREFIX N.B. $PREFIX might not expand properly here. I just used it as a placeholder. 8. gmake; gmake install Xerces Perl 2.0.0-3 ------------------- 1. perl Makefile.PL 2. export LIBS=" -lpthread " 3. gmake; gmake test I got 97.14% okay on the test scripts, 99.82% okay on the subtests. 4. gmake install Xalan C++ 1.4 ------------- 1. export XALANCROOT=<full path to source> (e.g., $PREFIX/src/xml-xalan) 2. export XALAN_USE_ICU=1 3. Modify $XALANCROOT/c/src/ICUBridge/ICUBridge.cpp: U_USING_DEFAULT_ERROR -> -127 (There's probably a cleaner way to move away from the deprecated constant than hard-coding a magic number, but it's only used once, and I don't know the code well enough to make a better recommendation off the top of my head. I saw something about a _WARNING enum in the comments.) 4. Prefer configure to runConfigure, as runConfigure is less complete for Xalan C++ (e.g., one cannot specify --prefix) than for Xerces C++. E.g., ./configure --prefix=$PREFIX 5. For platforms using gcc 3.2.x, edit Makefile:138 as follows: CXXFLAGS = -g -02 -fno-elide-constructors Using the no-elide-constructors option prevents some assertions during runtime. 6. gmake 7. cp $XALANCROOT/lib/libxalan-c1_4_0.so $PREFIX/lib (Under Xalan C++ 1.4, the install rule in the Makefile seems to be a no-op). 8. ldconfig XML::Xalan 0.44 --------------- 1. Edit Makefile.PL: 108: $config{INC} = "-I$ENV{XALANCROOT}/c/src -I$ENV{XERCESCROOT}/include/xercesc "; assuming you have XALANCROOT=$PREFIX/src/xml-xalan and XERCESCROOT=$PREFIX/src/xerces-c-2_0_0 110: -lc -L$ENV{XALANCROOT}/lib -lxalan-c1_4_0 -L/usr/lib 118: Delete this line ( $config{CFLAGS} = "-instances=static" ) gcc 3.2.x does not accept a -instances flag. 2. Edit xs.dom 298: Remove the getNumber() block. 903: Change all occurrences of "supports" to "isSupported" in the supports( ... ) block. 3. perl Makefile.PL 4. gmake; gmake test I got 93.75% okay on the tests. 5. gmake install
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
