Dear List, Further to the patch I posted on 30 April 2009, followings are the steps to compile STAF v3.3.3 with Sun CC compiler. The patch (2316610) is accessible from following URL: http://sourceforge.net/tracker/?func=detail&aid=2316610&group_id=33142&atid= 407383
During this work I have used followings: # Solaris 10 on sparc $ uname -a SunOS oberon 5.10 Generic_137137-09 sun4u sparc SUNW,Sun-Fire-880 # Sun Studio v12 C/C++ compilers $ cc -V cc: Sun C 5.9 SunOS_sparc Patch 124867-06 2008/06/10 usage: cc [ options] files. Use 'cc -flags' for details $ CC -V CC: Sun C++ 5.9 SunOS_sparc Patch 124863-04 2008/04/16 1) Compiling/installing third-party packages/products: ------------------- a) I encountered some problems with libperl.so when I used the default Perl interpreter that comes with Solaris 10: $ /usr/bin/perl -v This is perl, v5.8.4 built for sun4-solaris-64int ... Instead I used ActiveState's binary Perl distribution v5.8.9 build# 825 for Solaris/sparc: $ perl -v This is perl, v5.8.9 built for sun4-solaris-thread-multi (with 5 registered patches, see perl -V for more detail) ... See http://www.activestate.com to download the binary package. b) I used OpenSSL v0.9.8k. To configure use: $ ./config --prefix=/your-prefix/openssl-0.9.8k shared threads # Change Makefile #63 to define "-m32 -xarch=sparc -xO3" and remove "-xarch=v8plus" # Also change "CC= cc -mt" in the same Makefile I advise not to use "Configure" script which is advocated in the STAF manuals. This script was unable to produce shared openssl libraries which are crucial for STAF build. Please follow OpenSSL install procedure after the configuration. I also notice that using "config" after "make clean" created some problems, so my advice is to delete/recreate entire source tree if you wish to issue "config" second time. c) I used used zlib 1.2.3. To configure use $ ./configure --shared --prefix=/your-prefix/zlib-1.2.3 Then follow the installation procedure for zlib. d) I have used Sun's JDK 1.5.0_17 for Solaris-sparc. 2) Compiling STAF v3.3.3: ------------------- a) Setting environment variables: export CC_NAME=suncc export OS_NAME=solaris export BUILD_TYPE=retail export OPENSSL_ROOT=/home/semihc/local/openssl export ZLIB_SOURCEDIR=/home/semihc/Packages/zlib-1.2.3 export STAF_USE_SSL=1 export STAF_USE_IPV6= export PROJECTS="staf connprov* java perl zip" # For building Perl support #export PROJECTS=perl export PERL_V58_ROOT=/home/semihc/local/ActivePerl export PERL_V58_INCLUDEDIRS=$PERL_V58_ROOT/lib/CORE export PERL_V58_LIBDIRS=$PERL_V58_ROOT/lib/CORE export PERL_V58_LIBS=perl export PERL_BUILD_V58=1 # For Java components export JAVA_BUILD_V11=0 export JAVA_BUILD_V12=1 export JAVA_V12_ROOT=/usr/local/java/jdk1.5.0_17 export JAVA_DEFAULT_VERSION=V12 b) I have come across an interesting problem where STAF shared libraries uses C++ standard library routines but this use is not being registered on the shared libraries produced by STAF build. In order to avoid this problem you need to "-library=Cstd" flag in makefile.suncc. That is use following directive in makefile.suncc CC_MK_SHARED_LIB := CC -mt -G -library=Cstd instead of just CC_MK_SHARED_LIB := CC -mt -G # libCstd.so would be missing In order to check if this problem happens with your STAF you can use "ld -Lr" command: $ ldd -Lr libSTAF.so ... # You should see dependency to C++ standard library libCstd.so.1 => /usr/lib/libCstd.so.1 ... c) Follow the STAF build process; that is $ gmake 2>&1 |tee make.log # After the build completes successfully giant$ pwd /your-path-to-staf/staf-3.3.3/rel/solaris/staf/retail/lib $ mkdir IPv4 $ cp -p libSTAF.so IPv4/. $ cp -p libSTAFTCP.so IPv4/. $ cd .. $ ./STAFInst -target /install-destination/staf-3.3.3-suncc -verbose 3) Post installation notes ------------------- a) I have noticed an interesting circular dependency between Perl shared libraries (libperl.so and libthread.so) In order to resolve this issue STAFProc has to be run with "libperl.so" preloaded. To achieve that please use LD_PRELOAD=libperl.so # Note that there is no absole-path To run the STAFProc change last line of "startSTAFProc.sh" script as followings: LD_PRELOAD=libperl.so /install-destination/staf-3.3.3-suncc/bin/STAFProc & b) Similar dynamically loaded library errors can be traced by Solaris' extensive tracing facility: LD_DEBUG=files STAFProc & For more details of shared library debugging please see Solaris "Linker and Libraries Guide". c) The above procedure generates 32-bit STAF executables. Although I have not produced 64-bit STAF yet, it can be as easy as using "-m64" flag instead of "-m32" for C/C++ compiler. To use 64-bit JVM please use java at /java-home/jdk1.5.0_17/bin/sparcv9. d) Using the STAF built by above process, I was able to load up all external STAF services and STAX. I also managed to run sample device manager service for Perl. I have not attempted to use Python or Tcl with STAF. Kind regards, Semih Cemiloglu ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users