- set the following environment variables & create the directories as shown below:
setenv TZ PST8PDT
setenv ICUROOT <root directory of ICU source>
setenv ICU_DATA $ICUROOT/source/data/
setenv XERCESCROOT <root directory of xerces source>
setenv XALAN_USE_ICU true
setenv XALANCROOT <root directory of xalan source>
mkdir -p $ICUROOT/lib/sol/release
mkdir -p $ICUROOT/lib/sol/debug
mkdir -p $ICUROOT/bin/sol/release
mkdir -p $ICUROOT/bin/sol/debug
mkdir -p $XERCESCROOT/lib/sol/release
mkdir -p $XERCESCROOT/lib/sol/debug
mkdir -p $XALANCROOT/lib/sol/release
mkdir -p $XALANCROOT/lib/sol/debug
- Install "gmake"
Get it from http://www.sunfreeware.com for S10 x86
______________________________
Building ICU 2.2 on Solaris 10 x86
______________________________
- Download ICU 2.2 source code & 2.2 patch from:
ftp://www-126.ibm.com/pub/icu/2.2/icu-2.2.tgz
ftp://www-126.ibm.com/pub/icu/2.2/icu-2.2-patch.zip
- cd $ICUROOT/source
- chmod +x runConfigureICU configure install-sh
- ./runConfigureICU SOLARISX86 --disable-64bit-libs --enable-layout --prefix=<installation-directory>
(by default layout will be disabled)
- Edit icudefs.mk:
i) Add -lCrun link flag to DEFAULT_LIBS
ii) Add -L$(top_builddir)/data/out/build to LIBICUDT
104c104
< DEFAULT_LIBS = -lpthread -lm -lCrun
---
> DEFAULT_LIBS = -lpthread -lm
154c154
< LIBICUDT= -L$(top_builddir)/data/out -L$(top_builddir)/data/out/build -L$(top_builddir)/stubdata
-l$(ICUPREFIX)data$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
---
> LIBICUDT= -L$(top_builddir)/data/out -L$(top_builddir)/stubdata
-l$(ICUPREFIX)data$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
Edit runConfigureICU & configure files and remove the "-g" flag for RELEASE builds
- ./runConfigureICU SOLARISX86 --disable-64bit-libs --enable-layout --prefix=<installation-directory>
- gmake
- gmake check (optional)
- gmake install
_______________
Building Xerces 2.1
_______________
- Download the source for Xerces 2.1 from:
http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_1_0/xerces-c-src2_1_0.tar.gz
- Copy the unicode header files from ICU source distribution. Please note that Solaris 10 ships ICU 2.1 and failing to copy
the headers as shown below may result in undefined symbol errors:
cp $ICUROOT/source/common/unicode/*.h $ICUROOT/include/unicode/
cp $ICUROOT/source/common/icucfg.h $ICUROOT/include/icucfg.h
- cd $XERCESCROOT/src/xercesc
pushd $ICUROOT/lib
foreach i ( $ICUROOT/lib/sol/release/*.so*)
ln -s $i
end
popd
- Fix needed to allow compilation for DOMDocumentImpl.cpp
cp $XERCESCROOT/src/xercesc/dom/impl/DOMDeepNodeListImpl.hpp $XERCESCROOT/include/xercesc/dom/impl
cp $XERCESCROOT/src/xercesc/dom/impl/DOMDeepNodeListPool.hpp $XERCESCROOT/include/xercesc/dom/impl
- Edit Makefile.incl:
Add -lCstd link flag to all ALLLIBSs
138c138
< ALLLIBS = -mt -licuuc -licudata ${LIBS}
---
> ALLLIBS = -mt -licuuc -licudata -lCstd ${LIBS}
140c140
< ALLLIBS = -mt ${LIBS}
---
> ALLLIBS = -mt -lCstd ${LIBS}
144c144
< ALLLIBS = -mt -licuuc -licudata ${LIBS}
---
> ALLLIBS = -mt -licuuc -licudata -lCstd ${LIBS}
- runConfigure -psolaris -ccc -xCC -minmem -nsocket -ticu -rpthread -z-DXERCES_TMPLSINC -C --prefix=<installation-directory> -d
Note: -d builds a debug build; if needs an optimized release build, remove -d.
- gmake
- gmake install
** Note **
Failing to make the changes as mentioned above leads to undefined symbols
eg.,
% ldd -r libxerces-c.so.22.0
libicuuc.so.22 => /export/home/sunperf/icu/lib/sol/release/libicuuc.so.22
libicudata.so.2 => /usr/lib/libicudata.so.2
libpthread.so.1 => /usr/lib/libpthread.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libicudata.so.22 => (file not found)
libm.so.2 => /usr/lib/libm.so.2
libCrun.so.1 => /opt/SUNWspro/prod/usr/lib//libCrun.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libmd5.so.1 => /usr/lib/libmd5.so.1
libscf.so.1 => /usr/lib/libscf.so.1
libc.so.1 => /usr/lib/libc.so.1
libdoor.so.1 => /usr/lib/libdoor.so.1
libuutil.so.1 => /usr/lib/libuutil.so.1
symbol not found: __1cDstdEcout_ (./libxerces-c.so.22.0)
symbol not found: UCNV_FROM_U_CALLBACK_SUBSTITUTE_2_1 (./libxerces-c.so.22.0)
symbol not found: UCNV_FROM_U_CALLBACK_STOP_2_1 (./libxerces-c.so.22.0)
symbol not found: u_strlen_2_1 (./libxerces-c.so.22.0)
symbol not found: u_toupper_2_1 (./libxerces-c.so.22.0)
symbol not found: u_isspace_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_open_2_1 (./libxerces-c.so.22.0)
symbol not found: u_tolower_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_openU_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_getMaxCharSize_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_getMinCharSize_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_close_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_toUnicode_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_setFromUCallBack_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_fromUnicode_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_fromUChars_2_1 (./libxerces-c.so.22.0)
symbol not found: ucnv_toUChars_2_1 (./libxerces-c.so.22.0)
symbol not found: __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___Fflush6M_r1_ (./libxerces-c.so.22.0)
symbol not found: __1cDstdNbasic_ostream4Ccn0ALchar_traits4Cc___Fwrite6Mpkcl_r1_
(./libxerces-c.so.22.0)
symbol not found: u_charType_2_1 (./libxerces-c.so.22.0)
symbol not found: icudt22_dat (/export/home/sunperf/icu/lib/sol/release/libicuuc.so.22)
____________
These instructions may work on Solaris 10 for SPARC as well