Hi, Thanks for providing this. We'll review it in January after the holidays. Thanks, David
David Bender STAF/STAX Development IBM Software Group, WPLC 11501 Burnet Rd. Bldg. 903-5B002 Austin, TX 78758-3400 Phone (T/L): 1-512-286-5315 (363-5315) ITN: 23635315 Email: bda...@us.ibm.com "Semih Cemiloglu" <semih.cemilo...@nec.com.au> 12/17/2009 08:30 PM To <staf-users@lists.sourceforge.net> cc Subject [staf-users] Building and installing STAF 3.3.5 on OpenSolaris x86 with Sun Studio CC Dear Staf users, Following steps describe how to compile STAF on OpenSolaris with Sun Studio C++ compiler. The files used within this post are attached to this posting. I kindly ask STAF developers to review and merge changes to main trunk. The change on STAFConnectionProvider::~STAFConnectionProvider() is especially important as I'm observing an exception being thrown while stack unwinding is in progress, which forces STAFProc process to call abort() and core dump. 0. CONTEXT: I have used - STAF version 3.3.5 - OpenSolaris version 2009.06 on x86 - Sun Studio version 12 update 1: $ uname -a SunOS giant 5.11 snv_111b i86pc i386 i86pc Solaris $ CC -V CC: Sun C++ 5.10 SunOS_i386 2009/06/03 You also need zlib source code if you wish to use STAF's zip service. http://www.zlib.net/ A. BUILDING 1) It might be useful to create a user dedicated to STAF processes: # useradd -c "STAF User" -d /export/home/staf -g staff -s /bin/bash -m staf 2) Unzip the zlib source package. To configure use $ ./configure --shared --prefix=/your-prefix/zlib-1.2.3 Then follow the installation procedure for zlib. 3) Unzip the STAF 3.3.5 source package. Note that we shall use the OpenSSL libraries bundled with OpenSolaris. 4) Apply the changes to the STAF source tree, in the diff file given below. 5) If you wish to use a STAF Perl service, it is highly recommended that you obtain ActivePerl's vinary distribution (v5.8.9 or later). http://ActivePerl.com Using OpenSolaris default Perl version (v5.8.4) will create problems for services written in Perl later on, if you select it as default Perl interpreter. 6) Set the environment variables for building STAF: export CC_NAME=suncc export OS_NAME=solaris export BUILD_TYPE=retail export OPENSSL_ROOT=/ export ZLIB_SOURCEDIR=/export/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 PERL_V58_ROOT=/opt/ActivePerl-5.8.9 export PERL_V58_INCLUDEDIRS=$PERL_V58_ROOT/lib/CORE export PERL_V58_LIBDIRS=$PERL_V58_ROOT/lib/CORE export PERL_BUILD_V58=1 # For Java components export JAVA_BUILD_V11=0 export JAVA_BUILD_V12=1 export JAVA_V12_ROOT=/usr/jdk/jdk1.6.0_13 export JAVA_DEFAULT_VERSION=V12 7) Follow the STAF build process; that is $ gmake 2>&1 |tee make.log # After the build completes successfully cd to this directory $ pwd /your-path-to-staf/staf-3.3.5/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.5 -verbose B. CREATING SMF SPECIFICATION Optionally you can create SMF (Service Management Facility) specification which will ensure that STAF daemon (STAFProc) will be managed by OS. For instance when a reboot occurs STAFProc will be launched by OS automatically. For more details about SMF please see: http://hub.opensolaris.org/bin/view/Community+Group+smf/ 1) Modify startSTAFProc.sh script as indicated by following diff. Adapt the paths. $ diff startSTAFProc.sh.org startSTAFProc.sh 5c5,10 < nohup /nec/STAF/staf-3.3.5/bin/STAFProc & --- > #nohup /nec/STAF/staf-3.3.5/bin/STAFProc & > > LOGFN=/nec/STAF/staf/data/STAFProc.log > LD_PRELOAD_32=libperl.so /nec/STAF/staf/bin/STAFProc >$LOGFN 2>&1 & > echo "Check $LOGFN for logs" 1) Copy stafd.sh to /install-destination (Default is /nec/STAF) 2) Review staf.xml specification. Please adapt the paths to your circumstances. (Default install directory is /nec/STAF/staf) 3) Ensure staf.xml is valid XML $ xmllint --valid /var/svc/manifest/application/staf.xml 4) Copy SMF manifest to proper directory $ pfexec cp staf.xml /var/svc/manifest/application/staf.xml 5) Further validation via svccfg utility $ pfexec svccfg validate /var/svc/manifest/application/staf.xml 6) Import specification into SMF graph $ pfexec svccfg import /var/svc/manifest/application/staf.xml 6a) OPTIONAL: If an error occurs in above commands and you are in need of starting afresh, don't forget to return back to a clean state: $ pfexec svccfg delete stafd 7) Enable STAF deamon service (will start STAFProc) $ pfexec svcadm enable stafd 7a) OPTIONAL: Disable STAF daemon service permanently (will stop STAFProc) $ pfexec svcadm disable stafd 7b) OPTIONAL: Disable STAF daemon service temporarily (will stop STAFProc) $ pfexec svcadm disable -t stafd 8) Inspection of stafd service is performed via: $ svcs -x stafd svc:/application/staf/stafd:default (STAF Daemon (STAFProc)) State: online since 17 December 2009 10:03:39 AM See: http://staf.sourceforge.net See: /var/svc/log/application-staf-stafd:default.log Impact: None. Kind regards, Semih Cemiloglu This email may be confidential and/or privileged. Only the intended recipient may access or use it. If you are not the intended recipient, please delete this email and notify NEC Australia Pty Ltd promptly. NEC uses antivirus software but excludes all liability for viruses or similar in any attachment. Please consider our environment before printing this email. [attachment "staf-3.3.5-diff.txt" deleted by David Bender/Austin/IBM] [attachment "staf.xml" deleted by David Bender/Austin/IBM] [attachment "stafd.sh" deleted by David Bender/Austin/IBM] ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users