Difference between revisions of "Instructions to Build SPLOT"

From NAMIC Wiki
Jump to: navigation, search
m (typo)
 
(5 intermediate revisions by the same user not shown)
Line 15: Line 15:
  
 
* Set environment variable: '''ACE_ROOT'''. For instance, in '''.bash_profile''', add
 
* Set environment variable: '''ACE_ROOT'''. For instance, in '''.bash_profile''', add
   ACE_ROOT=/home/hliu/projects/splot-build/ACE_wrappers
+
   ACE_ROOT=/your-path/splot-build/ACE_wrappers
 
   export ACE_ROOT
 
   export ACE_ROOT
  
Line 44: Line 44:
 
   tar xvf xerces-c-src_2_7_0.tar
 
   tar xvf xerces-c-src_2_7_0.tar
 
* Set environmental variable: '''XERCESCROOT'''. For instance, in '''.bash_profile''', add:
 
* Set environmental variable: '''XERCESCROOT'''. For instance, in '''.bash_profile''', add:
   XERCESCROOT=/home/liu/projects/splot-build/xerces-c-src_2_7_0
+
   XERCESCROOT=/home/your-path/splot-build/xerces-c-src_2_7_0
 
   export XERCESCROOT
 
   export XERCESCROOT
  
Line 61: Line 61:
 
* Download scons from http://www.scons.org/download.php and unzip it into the directory "splot-build"
 
* Download scons from http://www.scons.org/download.php and unzip it into the directory "splot-build"
 
* Change directory to the scons root directory, e.g. scons-0.96.1
 
* Change directory to the scons root directory, e.g. scons-0.96.1
   cd /home/surg/projects/splot-build/scons-0.96.1
+
   cd /your-path/splot-build/scons-0.96.1
 
* Intall scons. For instance, run
 
* Intall scons. For instance, run
   python setup.py install --prefix=/home/surg/projects/splot-build/scons-0.96.1
+
   python setup.py install --prefix=/your-path/splot-build/scons-0.96.1
 
* Intall scons libs. For instance, run
 
* Intall scons libs. For instance, run
   python setup.py install --standard-lib --prefix=/home/surg/projects/splot-build/scons-0.96.1
+
   python setup.py install --standard-lib --prefix=/your-path/splot-build/scons-0.96.1
  
* Set '''PATH''' for /home/surg/projects/splot-build/scons-0.96.1/bin
+
* Set '''PATH''' for /your-path/splot-build/scons-0.96.1/bin
  
 
== Build opentracker ==  
 
== Build opentracker ==  
  
* In "splot-build,", download opentracker 2.0 from
+
* In "splot-build,", check out ICGBuilder from
 +
  svn --username otreader co https://svn.icg.tu-graz.ac.at/svn/ICGBuilder/trunk ICGBuilder
 +
Press "t" to temporarily accept the certificate. Input '''OPEN4read''' when prompted for password.
 +
 
 +
* In "splot-build,", check out opentracker 2.0 from
 
   svn co --username otreader https://svn.icg.tu-graz.ac.at/svn/opentracker/trunk opentracker
 
   svn co --username otreader https://svn.icg.tu-graz.ac.at/svn/opentracker/trunk opentracker
 
Press "t" to temporarily accept the certificate. Input '''OPEN4read''' when prompted for password.
 
Press "t" to temporarily accept the certificate. Input '''OPEN4read''' when prompted for password.
  
* Download ICGBuilder from https://share.spl.harvard.edu/xythoswfs/webui/users/hliu/JHU and unzip it into "splot-build"
+
* Make a symbolic link in the opentracker root directory to 'ICGBuilder'
 
 
* Make a symlink in the opentracker root directory to 'ICGBuilder'
 
 
   ln -s ../ICGBuilder ICGBuilder
 
   ln -s ../ICGBuilder ICGBuilder
  
 
* Set the environment variables '''XERCESROOT''' and '''ACEROOT'''. For instance, in '''.bash_profile''', add
 
* Set the environment variables '''XERCESROOT''' and '''ACEROOT'''. For instance, in '''.bash_profile''', add
   XERCESROOT=/home/surg/projects/splot-build/xerces-c-src_2_7_0
+
   XERCESROOT=/your-path/splot-build/xerces-c-src_2_7_0
 
   export XERCESROOT
 
   export XERCESROOT
   ACEROOT=/home/surg/projects/splot-build/ACE_wrappers
+
   ACEROOT=/your-path/splot-build/ACE_wrappers
 
   export ACEROOT
 
   export ACEROOT
  
Line 111: Line 113:
 
   ccmake .
 
   ccmake .
  
ACE: path + libACE.so; ACE_DIR: path to ACE_wrappers; OPENTRACKER: path + libopentracker.so; OT_INC: path to OpenTracker.h; XERCES: path + libxerces-c.so
+
ACE: path/libACE.so; ACE_DIR: path/ACE_wrappers; OPENTRACKER: path/libopentracker.so; OT_INC: directory containing OpenTracker.h; XERCES: path/libxerces-c.so
  
 
* Modify CMakeLists.txt to compile: add '''splot-build/opentracker/include''' to INCLUDE_DIRECTORIES
 
* Modify CMakeLists.txt to compile: add '''splot-build/opentracker/include''' to INCLUDE_DIRECTORIES

Latest revision as of 16:51, 7 January 2007

Home < Instructions to Build SPLOT

Create directory "splot-build"

  • Make this directory anywhere you want
  • This is the place all splot stuff and its dependent libs will sit

Build ACE

  • Move the compressed source code (e.g. ACE-5.5.tar.gz) to the directory "splot-build"
  • Unzip the source code and you will have this directory: ACE_wrappers
 gunzip ACE-5.5.tar.gz
 tar xvf ACE-5.5.tar
  • Set environment variable: ACE_ROOT. For instance, in .bash_profile, add
 ACE_ROOT=/your-path/splot-build/ACE_wrappers
 export ACE_ROOT
  • Add ACE lib to environment variable: LD_LIBRARY_PATH. For instance, in .bash_profile, add
 LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
  • Create a configuration file, config.h, in $ACE_ROOT/ace. Config.h will contain only the following line:
 #include "ace/config-linux.h"

This file includes the appropriate platform/compiler-specific header configurations from the ACE source directory.

  • Create a build configuration file, platform_macros.GNU, in $ACE_ROOT/include/makeinclude. Platform_macros.GNU will contain only the following line:
 include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU

This file contains the compiler and Makefile directives that are platform/compiler-specific.

  • Run "make" in the ACE_ROOT directory

The compiling failed in building $ACE_ROOT/ACEXML/examples/SAXPrint. But the ACE libraries are already built in $ACE_ROOT/lib.

Build xerces

 gunzip xerces-c-src_2_7_0.tar.gz
 tar xvf xerces-c-src_2_7_0.tar
  • Set environmental variable: XERCESCROOT. For instance, in .bash_profile, add:
 XERCESCROOT=/home/your-path/splot-build/xerces-c-src_2_7_0
 export XERCESCROOT
  • Run autoconf
 cd $XERCESCROOT/src/xercesc
 autoconf
  • In the same directory,
 ./configure
 make
  • You will see libraries built in $XERCESCROOT/lib

Build scons

 cd /your-path/splot-build/scons-0.96.1
  • Intall scons. For instance, run
 python setup.py install --prefix=/your-path/splot-build/scons-0.96.1
  • Intall scons libs. For instance, run
 python setup.py install --standard-lib --prefix=/your-path/splot-build/scons-0.96.1
  • Set PATH for /your-path/splot-build/scons-0.96.1/bin

Build opentracker

  • In "splot-build,", check out ICGBuilder from
 svn --username otreader co https://svn.icg.tu-graz.ac.at/svn/ICGBuilder/trunk ICGBuilder

Press "t" to temporarily accept the certificate. Input OPEN4read when prompted for password.

  • In "splot-build,", check out opentracker 2.0 from
 svn co --username otreader https://svn.icg.tu-graz.ac.at/svn/opentracker/trunk opentracker

Press "t" to temporarily accept the certificate. Input OPEN4read when prompted for password.

  • Make a symbolic link in the opentracker root directory to 'ICGBuilder'
 ln -s ../ICGBuilder ICGBuilder
  • Set the environment variables XERCESROOT and ACEROOT. For instance, in .bash_profile, add
 XERCESROOT=/your-path/splot-build/xerces-c-src_2_7_0
 export XERCESROOT
 ACEROOT=/your-path/splot-build/ACE_wrappers
 export ACEROOT
  • Add xerces library path to LD_LIBRARY_PATH to build the middleware executable (we don't really need this), e.g.
 LD_LIBRARY_PATH=$XERCESROOT/lib:$LD_LIBRARY_PATH
  • Run scons in the OpenTracker root directory
 scons

Build newmat

 make -f nm_gnu.mak

Build CMake

Assume Slicer3 has been built, set PATH for CMake bin.

Build SPLOT

  • Check out SPLOT code into "splot-build" from
 svn co http://www.na-mic.org:8000/svn/Sign/SPLOT/trunk SPLOT
  • Configure the build by running this command in SPLOT root directory
 ccmake .

ACE: path/libACE.so; ACE_DIR: path/ACE_wrappers; OPENTRACKER: path/libopentracker.so; OT_INC: directory containing OpenTracker.h; XERCES: path/libxerces-c.so

  • Modify CMakeLists.txt to compile: add splot-build/opentracker/include to INCLUDE_DIRECTORIES
  • Compile
 make