These instructions show how to build BlackTie on a Solaris 10 platform. They may work with other SunOS releases but have only been validated on Solaris 10 update 8. The instructions are sufficiently different from the generic build instructions that a separate page is warranted.
Caveat: there are still some teething problems with running the tests and examples:- some of them fail intermittently and it currently takes multiple passes to get successful test run. You might want to track the issue via JIRA to see our progress.
Firstly, obtain a copy of Solaris 10 update 8 - I got my copy as a virtual appliance from the Oracle download center. Note that the standard VM does not come with enough disk space or swap space to run BlackTie so I'll include instructions as if you are building from such an appliance.
Add an extra disk using your virtualisation software, for example with VirtualBox use File->Virtual Media Manager to add an expandable disk of size 100 GB (that should be plenty though 10 - 20 may be enough too, but if the disk is expandable it will not matter). Boot Solaris and run format to see the device name of the new disk (format should report it as a VBOX disk of the size you chose, 100.00GB - the device name for my appliance is c0d1 because it is the second disk). Solaris comes with a nice tool for managing disks called zpool. Add the new disk to a new pool and give it a name such as data:
zpool create data c0d1
By default a zfs filesystem is created on the new disk (the mount point defaults to the pool name).
Add more swap backed by space on the new disk. My virtual appliance came with 500 MB and a test build will definitely fail unless you add more. So, create a 1 GB swap mounted a /data/swap:
zfs create -V 1gb data/swap
and ask the OS to use it for swapping:
swap -a /dev/zvol/dks/data/swap
(if you want it to be permanent don't forget to add the entry to vfstab)
Solaris comes with a set of useful utilities located in /usr/sfw/bin so put this early on in your PATH. Also the standard tar and patch do not work with GNU tools, use gtar and gpatch instead (use alias if you keep forgetting: alias tar="gtar"). /usr/ccs/bin must be in you path as well. My PATH looks like this:
PATH=$HOME/bin:$ANT_HOME/bin:$MAVEN_HOME/bin:/usr/sbin:/usr/sfw/bin:/usr/local/bin:/usr/ucb:/usr/ccs/bin
Much of the needed support software is not installed on Solaris so you'll need to get it from a third party such as sunfreeware.com which contains many pre-built SunOS packages for popular projects.
Important note - when using sunfreeware it is polite to use local mirrors.
I found it useful to install sudo (the sudoers file installs into /usr/local/etc):
# install sudo (as root)
wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/sudo-1.7.4p4-sol10-x86-local.gz
wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libintl-3.4.0-sol10-x86-local.gz
wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libgcc-3.4.6-sol10-x86-local.gz
wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/libiconv-1.13.1-sol10-x86-local.gz
# also get build dependencies:# gdbm, expat, Berkeley db (need for compilations)# apr and aprutil# ACE requires GNU make# install all of the above packages:sugunzip *.gzfor i in *local; do pkgadd -d $i; doneecho "unixusername ALL=(ALL) ALL" >> /usr/local/etc/sudoers# the APR install puts some of its includes in locations not recognised by log4cxx. As a quick fix I just copied them over:sudo cp /usr/local/apr/include/*.h /usr/local/apr/include/apr-1
# create a work are for building dependenciessudo mkdir -p /data/blacktie/utilsudo chown -R unixusername:staff /data/blacktiecd blacktie/util# log4cxxwget http://mirror.ox.ac.uk/sites/rsync.apache.org//logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gztar -zxf apache-log4cxx-0.10.0.tar.gzcd apache-log4cxx-0.10.0./configure && make# ACE + TAOmkdir ACE+TAO-5.8.0tar -C ACE+TAO-5.8.0 -zxf ACE+TAO-5.8.0.tar.gzcd ACE+TAO-5.8.0/ACE_wrappersecho "#define ACE_INITIALIZE_MEMORY_BEFORE_USE 1#include "ace/config-sunos5.10.h" > ace/config.hecho "include $(ACE_ROOT)/include/makeinclude/platform_sunos5_g++.GNU" > include/makeinclude/platform_macros.GNUexport ACE_ROOT=`pwd`export TAO_ROOT=`pwd`/TAOexport LD_LIBRARY_PATH=`pwd`/lib# ACE requires GNU make:export PATH=/usr/local/bin:$PATHcd ace; makecd ..; makecd apps/gperf/src/; makecd ../../../ACEXML/; makecd /data/blacktie/util/ACE+TAO-5.8.0/ACE_wrappers/TAO/TAO_IDL/;makeexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/blacktie/util/ACE+TAO-5.8.0/ACE_wrappers/TAO/TAO_IDLcd ../tao/; makecd ../orbsvcs/ImplRepo_Service/; makecd ../orbsvcs; makecd ../../../../..unset LD_LIBRARY_PATH# xerces C - I had to compile this as root (don't know why)tar -zxf xerces-c-3.1.1.tar.gzcd xerces-c-3.1.1; ./configure && makesudo chown -R mmusgrov:staff .cd ..# cppunit get version 1.12.1 from sourceforge# but it needs patching. The patch is available frommv ~/Desktop/solarisfinite.patch .gpatch -p0 -i solarisfinite.patchcd cppunit-1.12.1; ./configure && make
# as rootcd /usr/localtar -zxf apache-maven-2.2.1-bin.tar.gztar -zxf apache-ant-1.8.1-bin.tar.gztar -zxf ant-contrib-1.0b3-bin.tar.gz ant-contrib/ant-contrib-1.0b3.jarmv ant-contrib/ant-contrib-1.0b3.jar apache-ant-1.8.1/lib/rm *.gz; rmdir ant-contribchown -R bin:bin apache-maven-2.2.1 apache-ant-1.8.1# if the permissions get messed up fix them:find apache-maven-2.2.1 -type d -exec chmod 755 {} \;find apache-ant-1.8.1 -type d -exec chmod 755 {} \;# subversion has a number of dependenciesgunzip *.gzfor i in *local; do pkgadd -d $i; done# put apache maven and ant on the pathANT_HOME=/usr/local/apache-ant-1.8.1MAVEN_HOME=/usr/local/apache-maven-2.2.1JAVA_HOME=/usr/jdk/jdk1.6.0_22export PATH=$ANT_HOME/bin:$MAVEN_HOME/bin:$PATH
# stompconnectcd to the util dircd stompconnect-1.0unzip stompconnect.patch.zipgpatch -p0 -i stompconnect.patch
# BlackTie# or get the sources from the project download page# The BlackTie build is maven based and it gets its third party dependencies via maven.# Therefore the these dependencies need to be turned into maven artifacts. Here's how to do that:cd trunk/blacktie-util/thirdpartycp build.properties.template build.properties# modify build.properties to reflect the locations where you built the various dependencies. Mine looks like this:bpa=sol10u8-x86 log4cxx.lib.dir=/data/blacktie/util/apache-log4cxx-0.10.0/src/main/cpp/.libs log4cxx.include.dir=/data/blacktie/util/apache-log4cxx-0.10.0/src/main/include/log4cxx log4cxx.version=902683 stompconnect.dir=/data/blacktie/util/stompconnect-1.0 apr-1.lib.dir=/usr/local/apr/lib apr-1.include.dir=/usr/local/apr/include/apr-1 apr-1.version=1.3.3 ace.lib.dir=/data/blacktie/util/ACE+TAO-5.8.0/ACE_wrappers/lib ace.include.dir=/data/blacktie/util/ACE+TAO-5.8.0/ACE_wrappers/ ace.version=5.8.0 tao.idl.compiler=/data/blacktie/util/ACE+TAO-5.8.0/ACE_wrappers/TAO/TAO_IDL/tao_idl ace.gperf=/data/blacktie/util/ACE+TAO-5.8.0/ACE_wrappers/bin/ace_gperf expat.lib.dir=/usr/local/lib expat.include.dir=/usr/local/include expat.version=2.0.1 cppunit.lib.dir=/data/blacktie/util/cppunit-1.12.1/src/cppunit/.libs cppunit.include.dir=/data/blacktie/util/cppunit-1.12.1/include/cppunit cppunit.version=1.12 xercesc.lib.dir=/data/blacktie/util/xerces-c-3.1.1/src/.libs xercesc.include.dir=/data/blacktie/util/xerces-c-3.1.1/src xercesc.version=3.0.1
# The ant script in the same directory will package up these dependencies and install them in the local maven repository:ant -Dlinux=true -Dbpa=sol10u8-x86
# build in the main module directorycd ../../blacktie# don't forget to include the platform prefix (which the build uses to determine the correct artifacts for the current architecture):mvn clean -Dbpa=sol10u8-x86mvn install -DskipTests -Dbpa=sol10u8-x86
# jboss-5.1.0.GA needs a small fix to run on Solaris which is described in this post: http://community.jboss.org/thread/2390# edit server/<name>/conf/bootstrap/profile.xml edit the AttachmentStore bean constructor.# Add a class attribute (with value java.io.File) to the constructor parameter. So it should look like this:# <constructor><parameter class="java.io.File"> ...# from here you can safely follow the existing instructions for deploying and running BlackTie# except that SunOS does not support valgrind so it needs disabling by, for example, by adding a profile to your settings.xml (or use -Duse.valgrind=false on each mvn build):<profile>
<id>blacktie</id>
<activation> <activeByDefault>true</activeByDefault> </activation>
<properties>
<use.valgrind> false </use.valgrind>
</properties>
</profile>
Comments