Mandalika's scratchpad [ Work blog @Oracle | Stock Market Notes | My Music Compositions ]

Old Posts: 09.04  10.04  11.04  12.04  01.05  02.05  03.05  04.05  05.05  06.05  07.05  08.05  09.05  10.05  11.05  12.05  01.06  02.06  03.06  04.06  05.06  06.06  07.06  08.06  09.06  10.06  11.06  12.06  01.07  02.07  03.07  04.07  05.07  06.07  08.07  09.07  10.07  11.07  12.07  01.08  02.08  03.08  04.08  05.08  06.08  07.08  08.08  09.08  10.08  11.08  12.08  01.09  02.09  03.09  04.09  05.09  06.09  07.09  08.09  09.09  10.09  11.09  12.09  01.10  02.10  03.10  04.10  05.10  06.10  07.10  08.10  09.10  10.10  11.10  12.10  01.11  02.11  03.11  04.11  05.11  07.11  08.11  09.11  10.11  11.11  12.11  01.12  02.12  03.12  04.12  05.12  06.12  07.12  08.12  09.12  10.12  11.12  12.12  01.13  02.13  03.13  04.13  05.13  06.13  07.13  08.13  09.13  10.13  11.13  12.13  01.14  02.14  03.14  04.14  05.14  06.14  07.14  09.14  10.14  11.14  12.14  01.15  02.15  03.15  04.15  06.15  09.15  12.15  01.16  03.16  04.16  05.16  06.16  07.16  08.16  09.16  12.16  01.17  02.17  03.17  04.17  06.17 


Friday, February 04, 2005
 
Building ICU 2.2 & Xerces 2.1 on Solaris 10 for x86



______________________________

Building ICU 2.2 on Solaris 10 x86
______________________________

  1. 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

  2. cd $ICUROOT/source
  3. chmod +x runConfigureICU configure install-sh
  4. ./runConfigureICU SOLARISX86 --disable-64bit-libs --enable-layout --prefix=<installation-directory>
    (by default layout will be disabled)
  5. 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

  6. ./runConfigureICU SOLARISX86 --disable-64bit-libs --enable-layout --prefix=<installation-directory>
  7. gmake
  8. gmake check (optional)
  9. gmake install



_______________

Building Xerces 2.1
_______________

  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

  2. 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

  3. cd $XERCESCROOT/src/xercesc
    pushd $ICUROOT/lib

    foreach i ( $ICUROOT/lib/sol/release/*.so*)
    ln -s $i
    end

    popd

  4. 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

  5. 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}

  6. 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.
  7. gmake
  8. 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


Comments: Post a Comment

Links to this post:

Create a Link



<< Home


2004-2017 

This page is powered by Blogger. Isn't yours?