Difference between revisions of "Kyle and Dan Build Notes"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
 
(47 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
on http://clasweb.jlab.org/wiki/index.php/UNH_Sim12_Setup. In the second to last dashed-line box, it says $XERCESROOT rather than $XERCES<u>C</u>ROOT
 
on http://clasweb.jlab.org/wiki/index.php/UNH_Sim12_Setup. In the second to last dashed-line box, it says $XERCESROOT rather than $XERCES<u>C</u>ROOT
  
on http://clasweb.jlab.org/wiki/index.php/UNH_Sim12_Setup
+
==Nuances==
<blockquote>
+
 
*export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC"
+
Never '''ever''' use ~ in paths. Use absolute paths to be sure.
This should read:
+
 
*export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/"xercesc build directory""
+
==Sim12 Notes==
ie I untarred to /net/home/kyle/CLAS12/Sim12/XERCESC/xerces-src_2_8_0
+
 
</blockquote>
+
Could use a redraw button, or redraw on window focus.
 +
Keyboard shortcuts for rotation, zoom
 +
Batch mode run entirely from terminal or output displayed in same window as commands
 +
 
 +
Currently exploring sim 12 batch mode
 +
drawing volumes and firing the beam
 +
 
 +
looking into xml setup for building the detector description.
 +
 
 +
 
  
 
=<font color="#660000">Kyle's Build Notes</font>=
 
=<font color="#660000">Kyle's Build Notes</font>=
Line 37: Line 46:
  
 
Missing header files:
 
Missing header files:
<blockquote>
+
<pre>
*AbstractDOMParser.cpp:46:44: xercesc/dom/impl/DOMAttrImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:46:44: xercesc/dom/impl/DOMAttrImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:47:48: xercesc/dom/impl/DOMTypeInfoImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:47:48: xercesc/dom/impl/DOMTypeInfoImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:50:44: xercesc/dom/impl/DOMTextImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:50:44: xercesc/dom/impl/DOMTextImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:51:48: xercesc/dom/impl/DOMDocumentImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:51:48: xercesc/dom/impl/DOMDocumentImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:52:52: xercesc/dom/impl/DOMDocumentTypeImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:52:52: xercesc/dom/impl/DOMDocumentTypeImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:54:49: xercesc/dom/impl/DOMElementNSImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:54:49: xercesc/dom/impl/DOMElementNSImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:55:46: xercesc/dom/impl/DOMEntityImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:55:46: xercesc/dom/impl/DOMEntityImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:56:55: xercesc/dom/impl/DOMEntityReferenceImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:56:55: xercesc/dom/impl/DOMEntityReferenceImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:57:48: xercesc/dom/impl/DOMNotationImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:57:48: xercesc/dom/impl/DOMNotationImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:60:61: xercesc/dom/impl/DOMProcessingInstructionImpl.hpp: No such file or directory
+
AbstractDOMParser.cpp:60:61: xercesc/dom/impl/DOMProcessingInstructionImpl.hpp: No such file or directory
*AbstractDOMParser.cpp:61:45: xercesc/dom/impl/DOMNodeIDMap.hpp: No such file or directory
+
AbstractDOMParser.cpp:61:45: xercesc/dom/impl/DOMNodeIDMap.hpp: No such file or directory
*AbstractDOMParser.cpp:62:41: xercesc/dom/impl/DOMCasts.hpp: No such file or directory
+
AbstractDOMParser.cpp:62:41: xercesc/dom/impl/DOMCasts.hpp: No such file or directory
*AbstractDOMParser.cpp: In member function `void xercesc_2_8::AbstractDOMParser::cleanUp()':
+
AbstractDOMParser.cpp: In member function `void xercesc_2_8::AbstractDOMParser::cleanUp()':
</blockquote>
+
</pre>
  
The wiki is incorrect. According to http://clasweb.jlab.org/wiki/index.php/UNH_Sim12_Setup :
+
need to export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC/xerces-c-src_2_8_0", my install directory.
*export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC"
 
This should read:
 
*export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/where_ever_you_untar_too"
 
  
 
#./runConfigure -plinux -cgcc -xg++ - good
 
#./runConfigure -plinux -cgcc -xg++ - good
Line 62: Line 68:
  
  
 
 
===DAWN===
 
===DAWN===
  
Line 78: Line 83:
  
 
make script failing
 
make script failing
 +
 +
using absolute path rather than path from ~, makefile doesn't read relative paths correctly.
 +
 +
eg:
 +
<pre>
 +
CLHEPROOT=/net/home/kyle/CLAS12/Sim12/CLHEP
 +
CLHEP_BASE_DIR=/net/home/kyle/CLAS12/Sim12/CLHEP
 +
XERCESCROOT=/net/home/kyle/CLAS12/Sim12/XERCESC
 +
G4WORKDIR=/net/home/kyle/CLAS12/Sim12/workDIR
 +
CLHEP_LIB=/net/home/kyle/CLAS12/Sim12/CLHEP/lib
 +
</pre>
  
 
creating working directory:  
 
creating working directory:  
 
*export G4WORKDIR="/net/home/kyle/CLAS12/Sim12/workDIR"
 
*export G4WORKDIR="/net/home/kyle/CLAS12/Sim12/workDIR"
 
using absolute path rather than path from ~, makefile doesn't read relative paths correctly.
 
<blockquote>
 
*CLHEPROOT=/net/home/kyle/CLAS12/Sim12/CLHEP
 
*CLHEP_BASE_DIR=/net/home/kyle/CLAS12/Sim12/CLHEP
 
*XERCESCROOT=/net/home/kyle/CLAS12/Sim12/XERCESC
 
*G4WORKDIR=/net/home/kyle/CLAS12/Sim12/workDIR
 
*CLHEP_LIB=/net/home/kyle/CLAS12/Sim12/CLHEP/lib
 
</blockquote>
 
  
  
Line 110: Line 117:
 
#make - good!
 
#make - good!
 
#export HDDSROOT="/net/home/kyle/CLAS12/Sim12/HDDS"
 
#export HDDSROOT="/net/home/kyle/CLAS12/Sim12/HDDS"
 +
  
 
===JGEANT4===
 
===JGEANT4===
Line 122: Line 130:
 
===Sim12===
 
===Sim12===
 
Enviroment variables:
 
Enviroment variables:
<blockquote>
+
<pre>
*[kyle@parity JGeant4]$ echo $XERCESCROOT
+
[kyle@parity JGeant4]$ echo $XERCESCROOT
*/net/home/kyle/CLAS12/Sim12/XERCESC
+
/net/home/kyle/CLAS12/Sim12/XERCESC
*[kyle@parity JGeant4]$ echo $CLHEPROOT
+
[kyle@parity JGeant4]$ echo $CLHEPROOT
*/net/home/kyle/CLAS12/Sim12/CLHEP
+
/net/home/kyle/CLAS12/Sim12/CLHEP
*[kyle@parity JGeant4]$ echo $EVIOROOT
+
[kyle@parity JGeant4]$ echo $EVIOROOT
*/net/home/kyle/CLAS12/Sim12/evio
+
/net/home/kyle/CLAS12/Sim12/evio
*[kyle@parity JGeant4]$ echo $HDDSROOT
+
[kyle@parity JGeant4]$ echo $HDDSROOT
*/net/home/kyle/CLAS12/Sim12/HDDS
+
/net/home/kyle/CLAS12/Sim12/HDDS
*[kyle@parity JGeant4]$ echo $JGEANT4ROOT
+
[kyle@parity JGeant4]$ echo $JGEANT4ROOT
*/net/home/kyle/CLAS12/Sim12/JGeant4
+
/net/home/kyle/CLAS12/Sim12/JGeant4
*[kyle@parity JGeant4]$ echo $G4WORKDIR
+
[kyle@parity JGeant4]$ echo $G4WORKDIR
*/net/home/kyle/CLAS12/Sim12/workDIR
+
/net/home/kyle/CLAS12/Sim12/workDIR
</blockquote>
+
</pre>
 
make - compile time error
 
make - compile time error
  
 +
<pre>
 
Compiling Sim12.cc ...
 
Compiling Sim12.cc ...
<blockquote>
+
Sim12.cc:75: error: expected class-name before '{' token
*Sim12.cc:75: error: expected class-name before '{' token
+
Sim12.cc: In constructor `MySession::MySession(int, char**)':
*Sim12.cc: In constructor `MySession::MySession(int, char**)':
+
Sim12.cc:111: error: class `MySession' does not have any field named `G4UIXm'
*Sim12.cc:111: error: class `MySession' does not have any field named `G4UIXm'
+
Sim12.cc: In function `int main(int, char**)':
*Sim12.cc: In function `int main(int, char**)':
+
Sim12.cc:238: error: cannot convert `G4UIterminal*' to `MySession*' in assignment
*Sim12.cc:238: error: cannot convert `G4UIterminal*' to `MySession*' in assignment
+
Sim12.cc:290: error: 'class MySession' has no member named 'SessionStart'
*Sim12.cc:290: error: 'class MySession' has no member named 'SessionStart'
+
/net/home/kyle/CLAS12/Sim12/CLHEP/include/CLHEP/Random/Randomize.h: At global scope:
*/net/home/kyle/CLAS12/Sim12/CLHEP/include/CLHEP/Random/Randomize.h: At global scope:
+
/net/home/kyle/CLAS12/Sim12/CLHEP/include/CLHEP/Random/Randomize.h:67: warning: 'CLHEP::HepRandomGenActiv e' defined but not used
*/net/home/kyle/CLAS12/Sim12/CLHEP/include/CLHEP/Random/Randomize.h:67: warning: 'CLHEP::HepRandomGenActiv e' defined but not used
+
make: ***  
*make: ***  
+
[/net/home/kyle/CLAS12/Sim12/workDIR/tmp/Linux-g++/Sim12/exe/Sim12.o]  
*[/net/home/kyle/CLAS12/Sim12/workDIR/tmp/Linux-g++/Sim12/exe/Sim12.o]  
+
Error 1
*Error 1
+
</pre>
</blockquote>
 
  
 
'''solution: env.sh was NOT setting variables. Recompiled geant4 and edited env.sh as needed'''
 
'''solution: env.sh was NOT setting variables. Recompiled geant4 and edited env.sh as needed'''
Line 158: Line 166:
 
linking error:
 
linking error:
  
*Compiling Sim12.cc ...
+
<pre>
*Using granular libraries ...
+
Compiling Sim12.cc ...
*Linking Sim12 ...
+
Using granular libraries ...
*/usr/bin/ld: cannot find -l/net/home/kyle/CLAS12/Sim12/CLHEP/lib
+
Linking Sim12 ...
*collect2: ld returned 1 exit status
+
/usr/bin/ld: cannot find -l/net/home/kyle/CLAS12/Sim12/CLHEP/lib
*make: *** [/net/home/kyle/CLAS12/Sim12/workDIR/bin/Linux-g++/Sim12] Error 1
+
collect2: ld returned 1 exit status
 +
make: *** [/net/home/kyle/CLAS12/Sim12/workDIR/bin/Linux-g++/Sim12] Error 1
 +
</pre>
  
From make -n, our error is the the second to last thing linked by ld. The directory is in ls's path (LD_LIBRARY_PATH). Hmmmm...
+
From make -n, our error is the the second to last thing linked by ld. The directory is in ld's path (LD_LIBRARY_PATH). Hmmmm...
  
 
'''solution: make was treating the variable CLHEP_LIB as an archive, but it is a directory. export CLHEP_LIB="CLHEP"'''
 
'''solution: make was treating the variable CLHEP_LIB as an archive, but it is a directory. export CLHEP_LIB="CLHEP"'''
Line 173: Line 183:
 
...
 
...
  
====Steps to make Sim12:====
+
====Steps to make and run Sim12:====
 +
 
 +
=====Making=====
 +
 
 
Setting variables:
 
Setting variables:
  
Line 179: Line 192:
  
 
I needed to tag this to the end of env.sh
 
I needed to tag this to the end of env.sh
<blockquote>
+
<pre>
*export CLHEP_BASE_DIR="/net/home/kyle/CLAS12/Sim12/CLHEP"
+
export CLHEP_BASE_DIR="/net/home/kyle/CLAS12/Sim12/CLHEP"
*export CLHEPROOT="/net/home/kyle/CLAS12/Sim12/CLHEP"
+
export CLHEPROOT="/net/home/kyle/CLAS12/Sim12/CLHEP"
*export CLHEP_LIB="CLHEP"
+
export CLHEP_LIB="CLHEP"
*export CLHEP_LIB_DIR="/net/home/kyle/CLAS12/Sim12/CLHEP/lib"
+
export CLHEP_LIB_DIR="/net/home/kyle/CLAS12/Sim12/CLHEP/lib"
*env | grep CLHEP
+
env | grep CLHEP
*export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC/xerces-c-src_2_8_0"
+
export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC/xerces-c-src_2_8_0"
*export EVIOROOT="/net/home/kyle/CLAS12/Sim12/evio"
+
export EVIOROOT="/net/home/kyle/CLAS12/Sim12/evio"
*export HDDSROOT="/net/home/kyle/CLAS12/Sim12/HDDS"
+
export HDDSROOT="/net/home/kyle/CLAS12/Sim12/HDDS"
*export JGEANT4ROOT="/net/home/kyle/CLAS12/Sim12/JGeant4"
+
export JGEANT4ROOT="/net/home/kyle/CLAS12/Sim12/JGeant4"
*env | grep ROOT
+
env | grep ROOT
*export G4WORKDIR="/net/home/kyle/CLAS12/Sim12/workDIR"
+
export G4WORKDIR="/net/home/kyle/CLAS12/Sim12/workDIR"
*export G4INSTALL="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01"
+
export G4INSTALL="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01"
*export G4INCLUDE="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/include"
+
export G4INCLUDE="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/include"
*export G4LIB="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/lib"
+
export G4LIB="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/lib"
</blockquote>
+
</pre>
 +
 
  
Then, run 'source env.sh' in whatever directory your in. cd to the Sim12 directory and make.
+
#Set env variables with env.sh: 'source ...../env.sh'
 +
#cd to Sim12 directory, make
 
Success!
 
Success!
  
</font>
 
----
 
  
=Dan's Notes=
+
=====Running=====
 +
 
 +
Make sure LD_LIBRARY_PATH is up to date.
 +
<pre>
 +
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$G4LIB/$G4SYSTEM:$CLHEP_LIB_DIR:$HDDSROOT/tmp/$G4SYSTEM/hdds:$JGEANT4ROOT/tmp/$G4SYSTEM/JGeant4:$XERCESROOT/lib:$EVIOROOT"
 +
</pre>
 +
 
 +
My whole path:
 +
<pre>
 +
LD_LIBRARY_PATH=/net/home/kyle/CLAS12/Sim12/GEANT4/lib/geant4/Linux-g++:/net/home/kyle/CLAS12/Sim12/CLHEP/lib:
 +
/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/lib/Linux-g++:/net/home/kyle/CLAS12/Sim12/CLHEP/lib:
 +
/net/home/kyle/CLAS12/Sim12/HDDS/tmp/Linux-g++/hdds:/net/home/kyle/CLAS12/Sim12/JGeant4/tmp/Linux-g++/JGeant4:
 +
/lib:/net/home/kyle/CLAS12/Sim12/evio:/net/home/kyle/CLAS12/Sim12/XERCESC/xerces-c-src_2_8_0/lib
 +
</pre>
 +
 
 +
 
 +
You want to be in the directory with clas12.xml...your Sim12 directory. IE on my station it's in /net/home/kyle/CLAS12/Sim12/Sim12
 +
 
  
====Useful links I keep losing:====
+
Now simply run $G4WORKDIR/bin/Linux-g++/Sim12
  
http://clasweb.jlab.org/wiki/index.php/UNH_Sim12_Setup
 
http://clasweb.jlab.org/wiki/index.php/Getting_Started_with_Sim12_Offsite
 
  
 +
Now your sciencing!!!
 +
----
  
The Official Sim12 Offsite wiki has you leaving stuff where you compile it most of the time, while some of the directions assume that you do not.  This is extremely confusing and leads to lots of problemsAlso, I think it is better to install to a separate directory, so I will do so:
+
=Daniel's Build Notes=
 +
 
 +
The Official Sim12 Offsite wiki has you leaving stuff where you compile it, while some of the directions assume that you do not.  This is extremely confusing.  Because many of the packages need the source of the others laying around, I will simply try to make things as
 +
orderly as possible, with every major package in its own subdirectory under ~/Sim12.  This leads to a few purely cosmetic steps in my
 +
directions.
  
 
==NOTE:  DO NOT USE PATH NAMES WITH ~ for HOME DIRECTORY!  USE ABSOLUTE PATHS!==
 
==NOTE:  DO NOT USE PATH NAMES WITH ~ for HOME DIRECTORY!  USE ABSOLUTE PATHS!==
  
The process(will be cleaned-up):
+
Replace any mentions of "/Users/daniel" with whatever path you want your Sim12 directory to sit in.
 +
I have not used a shortcut like "~" because then people will copy-and-paste it, and it will cause
 +
problems.
  
 
====Preliminaries:====
 
====Preliminaries:====
#mkdir -p /net/home/dan/Sim12-build
+
<pre>
#mkdir -p /net/home/dan/Sim12
+
mkdir -p /Users/daniel/Sim12
 +
mkdir -p /Users/daniel/Sim12/source
 +
</pre>
  
 
===CLHEP===
 
===CLHEP===
#mkdir -p /net/home/dan/Sim12/CLHEP
+
<pre>
#mkdir -p /net/home/dan/Sim12-build/CLHEP
+
cd /Users/daniel/Sim12/source
#cd /net/home/dan/Sim12-build/CLHEP
+
wget http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/distributions/clhep-2.0.3.2-src.tgz
#tar -zxvf /net/home/dan/Tarpit/clhep-2.0.3.1.tgz
+
cd /Users/daniel/Sim12
#cd 2.0.3.1/CLHEP
+
tar -zxvf /Users/daniel/Sim12/source/clhep-2.0.3.2.tgz
#./configure --prefix=/net/home/dan/Sim12/CLHEP
+
mv 2.0.3.2/CLHEP ./
#make
+
rmdir 2.0.3.2
#make install
+
cd CLHEP
#export CLHEPROOT="/net/home/dan/Sim12/CLHEP"
+
./configure --prefix=/Users/daniel/Sim12/CLHEP
 +
make
 +
make install
 +
export CLHEPROOT="/Users/daniel/Sim12/CLHEP"
 +
</pre>
  
 
===XERCESC===
 
===XERCESC===
#mkdir /net/home/dan/Sim12-build/xercesc
+
<pre>
#mkdir -p /net/home/dan/Sim12/XERCESC
+
cd /Users/daniel/Sim12
#cd /net/home/dan/Sim12-build/xercesc
+
tar -zxvf /Users/daniel/Sim12/source/xerces-c-src_2_8_0.tar.gz
#tar -zxvf /net/home/dan/Tarpit/xerces-c-src_2_8_0.tar.gz
+
mv xerces-c-src_2_8_0 XERCESC
#cd xerces-c-src_2_8_0/src/xercesc
+
cd XERCESC/src/xercesc
#export XERCESCROOT="/net/home/dan/Sim12-build/xercesc/xerces-c-src_2_8_0"
+
export XERCESCROOT="/Users/daniel/Sim12/XERCESC"
#./runConfigure -p linux -c gcc -x g++ -P /net/home/dan/Sim12/XERCESC
+
./runConfigure -p linux -c gcc -x g++    # on a Mac, "./runConfigure -p macosx -c gcc -x g++"
#make
+
make
#make install
+
</pre>
 
+
====Building XERCESC fails if using ~/blah for XERCESCROOT!====
====Building XERCESC fails if using ~/blah for XERCESROOT!====
 
#export XERCESCROOT="/net/home/dan/Sim12/XERCESC"
 
  
 
===DAWN===
 
===DAWN===
#mkdir /net/home/dan/Sim12/DAWN
+
<pre>
#mkdir /net/home/dan/Sim12-build/dawn
+
cd /Users/daniel/Sim12
#cd /net/home/dan/Sim12-build/dawn
+
tar -zxvf /Users/daniel/Sim12/source/dawn_3_88a.taz  
#tar -zxvf /net/home/dan/Tarpit/dawn_3_88a.taz  
+
mv dawn_3_88a DAWN
#cd dawn_3_88a
+
cd DAWN
#edit Makefile:  Change INSTALL_DIR line to use "/net/home/dan/Sim12/DAWN"
+
make
#make
+
</pre>
#make install
 
  
 
===GEANT4===
 
===GEANT4===
 +
<pre>
 +
cd /Users/daniel/Sim12
 +
tar -zxvf /Users/daniel/Sim12/source/geant4.9.0.p01.gtar.gz
 +
mv geant4.9.0.p01 GEANT4
 +
cd GEANT4
 +
mkdir data
 +
cd data
 +
tar -zxvf /Users/daniel/Sim12/source/G4EMLOW.4.3.tar.gz
 +
tar -zxvf /Users/daniel/Sim12/source/G4NDL.3.11.tar.gz
 +
tar -zxvf /Users/daniel/Sim12/source/G4RadioactiveDecay.3.2.tar.gz
 +
tar -zxvf /Users/daniel/Sim12/source/PhotonEvaporation.2.0.tar.gz
 +
cd ..
 +
./Configure -build
 +
</pre>
  
#mkdir /net/home/dan/Sim12-build/geant4
+
Here is most of the output of the script, with my answers.
#cd /net/home/dan/Sim12-build/geant4
 
#tar -zxvf ~/Tarpit/geant4.9.0.p01.gtar.gz
 
#cd geant4.9.0.p01
 
#mkdir data
 
#cd data
 
#tar -zxvf /net/home/dan/Tarpit/G4EMLOW.4.3.tar.gz
 
#tar -zxvf /net/home/dan/Tarpit/G4NDL.3.11.tar.gz
 
#tar -zxvf /net/home/dan/Tarpit/G4RadioactiveDecay.3.2.tar.gz
 
#tar -zxvf /net/home/dan/Tarpit/PhotonEvaporation.2.0.tar.gz
 
#cd /net/home/dan/Sim12-build/geant4
 
#mv geant4.9.0.p01 /net/home/dan/Sim12/GEANT4
 
#cd /net/home/dan/Sim12/GEANT4
 
#./Configure -build
 
  
==GEANT4 Questions:==
+
<pre>
 +
====GEANT4 Questions:====
 
Definition of G4SYSTEM variable is Linux-g++.
 
Definition of G4SYSTEM variable is Linux-g++.
 
That stands for:
 
That stands for:
Line 385: Line 426:
 
You have selected to use the XM Motif based user interfaces.
 
You have selected to use the XM Motif based user interfaces.
 
Specify the correct path where Xm is installed in your system.
 
Specify the correct path where Xm is installed in your system.
It was found in /usr/X11R6. Press [Enter] to set this path or type the correct one.
+
It was found in /sw. Press [Enter] to set this path or type the correct one.
  
 
You can set '-' (without quotation) to CANCEL the XM flag at all:  
 
You can set '-' (without quotation) to CANCEL the XM flag at all:  
[/usr/X11R6]  
+
[/sw]  
  
 
   G4VIS_NONE
 
   G4VIS_NONE
Line 480: Line 521:
 
[n]  
 
[n]  
 
   
 
   
End of configuration phase."
+
End of configuration phase.
 +
</pre>
  
==and so on==
+
Now if you hit ENTER it should go off and compile for a long time.  Get a coffee.  And a pizza.
  
===Current problem:  Compiling Sim12===
+
<pre>
 +
source /Users/daniel/Sim12/GEANT4/.config/bin/Linux-g++/env.sh # >>  For Linux users
 +
source /Users/daniel/Sim12/GEANT4/.config/bin/Darwin-g++/env.sh #>> For MacOS X users
 +
cp /Users/daniel/Sim12/GEANT4/.config/bin/Darwin-g++/env.sh  /Users/daniel/Sim12/env.sh
 +
mkdir /Users/daniel/Sim12/workDir
 +
export G4WORKDIR="/Users/daniel/Sim12/workDir"
 +
cd source/physics_lists
 +
make
 +
</pre>
 +
 
 +
===EVIO===
 +
I had to install expat in MacOSX before I could compile
 +
 
 +
<pre>
 +
cd /Users/daniel/Sim12
 +
tar -zxvf /Users/daniel/Sim12/source/evio-2.0-source.tar.gz
 +
mv evio EVIO
 +
cd EVIO
 +
make
 +
export EVIOROOT="/Users/daniel/Sim12/EVIO"
 +
</pre>
 +
 
 +
===HDDS===
 +
<pre>
 +
cd /Users/daniel/Sim12
 +
svn checkout https://phys12svn.jlab.org/repos/trunk/src/HDDS
 +
cd HDDS
 +
export G4WORKDIR=`pwd`
 +
make
 +
export HDDSROOT="/Users/daniel/Sim12/HDDS"
 +
</pre>
  
<blockquote>
+
===JGeant4===
[dan@benfranklin Sim12]$ make Making dependency for file Sim12.cc ...
+
<pre>
Making dependency for file src/Sim12VisDetectorConstruction.cc ...
+
cd /Users/daniel/Sim12
Making dependency for file src/Sim12SteppingVerbose.cc ...
+
svn checkout https://phys12svn.jlab.org/repos/trunk/src/JGeant4/
Making dependency for file src/Sim12SteppingAction.cc ...
+
mv JGeant4 JGEANT4  # Just for consistency
Making dependency for file src/Sim12RunAction.cc ...
+
cd JGEANT4
Making dependency for file src/Sim12PrimaryGeneratorMessenger.cc ...
+
export G4WORKDIR=`pwd`
Making dependency for file src/Sim12PrimaryGeneratorAction.cc ...
+
make
Making dependency for file src/Sim12PhysicsListMessenger.cc ...
+
export JGEANT4ROOT="/Users/daniel/Sim12/JGEANT4"
Making dependency for file src/Sim12PhysicsList.cc ...
+
</pre>
Making dependency for file src/Sim12EventActionMessenger.cc ...
 
Making dependency for file src/Sim12EventAction.cc ...
 
Compiling Sim12EventAction.cc ...
 
Compiling Sim12EventActionMessenger.cc ...
 
Compiling Sim12PhysicsList.cc ...
 
Compiling Sim12PhysicsListMessenger.cc ...
 
Compiling Sim12PrimaryGeneratorAction.cc ...
 
Compiling Sim12PrimaryGeneratorMessenger.cc ...
 
Compiling Sim12RunAction.cc ...
 
Compiling Sim12SteppingAction.cc ...
 
Compiling Sim12SteppingVerbose.cc ...
 
Compiling Sim12VisDetectorConstruction.cc ...
 
Creating shared library /net/home/dan/Sandbox/Sim12/workDir/tmp/Linux-g++/Sim12/libSim12.so ...
 
Compiling Sim12.cc ...
 
Using granular libraries ...
 
Linking Sim12 ...
 
/usr/bin/ld: cannot find -l/net/home/dan/Sandbox/Sim12/CLHEP/lib
 
collect2: ld returned 1 exit status
 
make: *** [/net/home/dan/Sandbox/Sim12/workDir/bin/Linux-g++/Sim12] Error 1
 
[dan@benfranklin Sim12]$
 
  
<blockquote>
+
===Sim12===
 +
<pre>
 +
export G4WORKDIR="/Users/daniel/Sim12/workDir"
 +
export HDDSROOT="/Users/daniel/Sim12/HDDS"
 +
export EVIOROOT="/Users/daniel/Sim12/EVIO"
 +
export CLHEPROOT="/Users/daniel/Sim12/CLHEP"
 +
export XERCESCROOT="/Users/daniel/Sim12/XERCESC"
 +
cd /Users/daniel/Sim12
 +
tar -jxvf source/Sim12.tar.bz2
 +
cd /Users/daniel/Sim12/Sim12
 +
make clean
 +
make
 +
</pre>

Latest revision as of 22:28, 28 October 2007

Note: It's ugly. New to editing wikis.


Kyle's Generic Notes

Typos

on http://clasweb.jlab.org/wiki/index.php/UNH_Sim12_Setup. In the second to last dashed-line box, it says $XERCESROOT rather than $XERCESCROOT

Nuances

Never ever use ~ in paths. Use absolute paths to be sure.

Sim12 Notes

Could use a redraw button, or redraw on window focus. Keyboard shortcuts for rotation, zoom Batch mode run entirely from terminal or output displayed in same window as commands

Currently exploring sim 12 batch mode drawing volumes and firing the beam

looking into xml setup for building the detector description.


Kyle's Build Notes

CLHEP SETUP

  1. Download CLHEP - good (http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/distributions/clhep-2.0.3.1.tgz)
  2. tar -xzvf clhep-2.0.3.1.tgz - good
  3. changed wd to ~/CLAS12/Sim12/CLHEP/2.0.3.1/CLHEP
  4. ./configure --prefix=/net/home/kyle/Sim12/CLHEP - good
  5. make (CLHEP) - good
  6. make install (CLHEP) - good
  7. export CLHEPROOT="/net/home/kyle/CLAS12/Sim12/CLHEP" - good


XERCES-C SETUP

  1. Download XERCES-C - good (http://apache.mirror99.com/xerces/c/sources/xerces-c-src_2_8_0.tar.gz)
  2. tar -xzvf xerces-c-src_2_8_0.tar.gz - good
  3. export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC" - good
  4. cd to (XERCESCROOT)/xerces-c-src_2_8_0.tar.gz/src/xercesc
  5. ./runConfigure -plinux -cgcc -xg++ - good
  6. make (.../xercesc) - failed compiletime for Abstract DOMParser.o, several errors.

Missing header files:

AbstractDOMParser.cpp:46:44: xercesc/dom/impl/DOMAttrImpl.hpp: No such file or directory
AbstractDOMParser.cpp:47:48: xercesc/dom/impl/DOMTypeInfoImpl.hpp: No such file or directory
AbstractDOMParser.cpp:50:44: xercesc/dom/impl/DOMTextImpl.hpp: No such file or directory
AbstractDOMParser.cpp:51:48: xercesc/dom/impl/DOMDocumentImpl.hpp: No such file or directory
AbstractDOMParser.cpp:52:52: xercesc/dom/impl/DOMDocumentTypeImpl.hpp: No such file or directory
AbstractDOMParser.cpp:54:49: xercesc/dom/impl/DOMElementNSImpl.hpp: No such file or directory
AbstractDOMParser.cpp:55:46: xercesc/dom/impl/DOMEntityImpl.hpp: No such file or directory
AbstractDOMParser.cpp:56:55: xercesc/dom/impl/DOMEntityReferenceImpl.hpp: No such file or directory
AbstractDOMParser.cpp:57:48: xercesc/dom/impl/DOMNotationImpl.hpp: No such file or directory
AbstractDOMParser.cpp:60:61: xercesc/dom/impl/DOMProcessingInstructionImpl.hpp: No such file or directory
AbstractDOMParser.cpp:61:45: xercesc/dom/impl/DOMNodeIDMap.hpp: No such file or directory
AbstractDOMParser.cpp:62:41: xercesc/dom/impl/DOMCasts.hpp: No such file or directory
AbstractDOMParser.cpp: In member function `void xercesc_2_8::AbstractDOMParser::cleanUp()':

need to export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC/xerces-c-src_2_8_0", my install directory.

  1. ./runConfigure -plinux -cgcc -xg++ - good
  2. make - good


DAWN

  1. Downloaded and extracted dawn into a directory. (http://geant4.kek.jp/%7Etanaka/DAWN/About_DAWN.html)
  2. make - good


GEANT4

  1. Downloaded and extracted geant4 and data files
  2. compiled geant4 - no problem
  3. make physics_list stuff...

had to assign many enviroment variables

make script failing

using absolute path rather than path from ~, makefile doesn't read relative paths correctly.

eg:

CLHEPROOT=/net/home/kyle/CLAS12/Sim12/CLHEP
CLHEP_BASE_DIR=/net/home/kyle/CLAS12/Sim12/CLHEP
XERCESCROOT=/net/home/kyle/CLAS12/Sim12/XERCESC
G4WORKDIR=/net/home/kyle/CLAS12/Sim12/workDIR
CLHEP_LIB=/net/home/kyle/CLAS12/Sim12/CLHEP/lib

creating working directory:

  • export G4WORKDIR="/net/home/kyle/CLAS12/Sim12/workDIR"


Evio

Download site no longer active

  1. cp from /net/data/taro/maurik/evio
  2. make clean
  3. make - good
  4. export EVIOROOT="/net/home/kyle/CLAS12/Sim12/evio"


HDDS

  • cp maurik's HDDS files from /net/data/taro/maurik/HDDS

needs G4INSTALL defined

  1. export G4INSTALL="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01"
  2. make clean
  3. make - good!
  4. export HDDSROOT="/net/home/kyle/CLAS12/Sim12/HDDS"


JGEANT4

  1. cd to Sim12 directory
  2. svn checkout https://phys12svn.jlab.org/repos/trunk/src/JGeant4/
  3. export G4WORKDIR="/net/home/kyle/CLAS12/Sim12/JGeant4"
  4. make - good!
  5. export JGEANT4ROOT="/net/home/kyle/CLAS12/Sim12/JGeant4"
  6. export G4WORKDIR="/net/home/kyle/CLAS12/Sim12/workDIR"


Sim12

Enviroment variables:

[kyle@parity JGeant4]$ echo $XERCESCROOT
/net/home/kyle/CLAS12/Sim12/XERCESC
[kyle@parity JGeant4]$ echo $CLHEPROOT
/net/home/kyle/CLAS12/Sim12/CLHEP
[kyle@parity JGeant4]$ echo $EVIOROOT
/net/home/kyle/CLAS12/Sim12/evio
[kyle@parity JGeant4]$ echo $HDDSROOT
/net/home/kyle/CLAS12/Sim12/HDDS
[kyle@parity JGeant4]$ echo $JGEANT4ROOT
/net/home/kyle/CLAS12/Sim12/JGeant4
[kyle@parity JGeant4]$ echo $G4WORKDIR
/net/home/kyle/CLAS12/Sim12/workDIR

make - compile time error

Compiling Sim12.cc ...
Sim12.cc:75: error: expected class-name before '{' token
Sim12.cc: In constructor `MySession::MySession(int, char**)':
Sim12.cc:111: error: class `MySession' does not have any field named `G4UIXm'
Sim12.cc: In function `int main(int, char**)':
Sim12.cc:238: error: cannot convert `G4UIterminal*' to `MySession*' in assignment
Sim12.cc:290: error: 'class MySession' has no member named 'SessionStart'
/net/home/kyle/CLAS12/Sim12/CLHEP/include/CLHEP/Random/Randomize.h: At global scope:
/net/home/kyle/CLAS12/Sim12/CLHEP/include/CLHEP/Random/Randomize.h:67: warning: 'CLHEP::HepRandomGenActiv e' defined but not used
make: *** 
[/net/home/kyle/CLAS12/Sim12/workDIR/tmp/Linux-g++/Sim12/exe/Sim12.o] 
Error 1

solution: env.sh was NOT setting variables. Recompiled geant4 and edited env.sh as needed


linking error:

Compiling Sim12.cc ...
Using granular libraries ...
Linking Sim12 ...
/usr/bin/ld: cannot find -l/net/home/kyle/CLAS12/Sim12/CLHEP/lib
collect2: ld returned 1 exit status
make: *** [/net/home/kyle/CLAS12/Sim12/workDIR/bin/Linux-g++/Sim12] Error 1

From make -n, our error is the the second to last thing linked by ld. The directory is in ld's path (LD_LIBRARY_PATH). Hmmmm...

solution: make was treating the variable CLHEP_LIB as an archive, but it is a directory. export CLHEP_LIB="CLHEP"

make...success!

...

Steps to make and run Sim12:

Making

Setting variables:

Not all directories will be correct in env.sh. Make sure G4 variable directories are pointing in the right place.

I needed to tag this to the end of env.sh

export CLHEP_BASE_DIR="/net/home/kyle/CLAS12/Sim12/CLHEP"
export CLHEPROOT="/net/home/kyle/CLAS12/Sim12/CLHEP"
export CLHEP_LIB="CLHEP"
export CLHEP_LIB_DIR="/net/home/kyle/CLAS12/Sim12/CLHEP/lib"
env | grep CLHEP
export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC/xerces-c-src_2_8_0"
export EVIOROOT="/net/home/kyle/CLAS12/Sim12/evio"
export HDDSROOT="/net/home/kyle/CLAS12/Sim12/HDDS"
export JGEANT4ROOT="/net/home/kyle/CLAS12/Sim12/JGeant4"
env | grep ROOT
export G4WORKDIR="/net/home/kyle/CLAS12/Sim12/workDIR"
export G4INSTALL="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01"
export G4INCLUDE="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/include"
export G4LIB="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/lib"


  1. Set env variables with env.sh: 'source ...../env.sh'
  2. cd to Sim12 directory, make

Success!


Running

Make sure LD_LIBRARY_PATH is up to date.

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$G4LIB/$G4SYSTEM:$CLHEP_LIB_DIR:$HDDSROOT/tmp/$G4SYSTEM/hdds:$JGEANT4ROOT/tmp/$G4SYSTEM/JGeant4:$XERCESROOT/lib:$EVIOROOT"

My whole path:

LD_LIBRARY_PATH=/net/home/kyle/CLAS12/Sim12/GEANT4/lib/geant4/Linux-g++:/net/home/kyle/CLAS12/Sim12/CLHEP/lib:
/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/lib/Linux-g++:/net/home/kyle/CLAS12/Sim12/CLHEP/lib:
/net/home/kyle/CLAS12/Sim12/HDDS/tmp/Linux-g++/hdds:/net/home/kyle/CLAS12/Sim12/JGeant4/tmp/Linux-g++/JGeant4:
/lib:/net/home/kyle/CLAS12/Sim12/evio:/net/home/kyle/CLAS12/Sim12/XERCESC/xerces-c-src_2_8_0/lib


You want to be in the directory with clas12.xml...your Sim12 directory. IE on my station it's in /net/home/kyle/CLAS12/Sim12/Sim12


Now simply run $G4WORKDIR/bin/Linux-g++/Sim12


Now your sciencing!!!


Daniel's Build Notes

The Official Sim12 Offsite wiki has you leaving stuff where you compile it, while some of the directions assume that you do not. This is extremely confusing. Because many of the packages need the source of the others laying around, I will simply try to make things as orderly as possible, with every major package in its own subdirectory under ~/Sim12. This leads to a few purely cosmetic steps in my directions.

NOTE: DO NOT USE PATH NAMES WITH ~ for HOME DIRECTORY! USE ABSOLUTE PATHS!

Replace any mentions of "/Users/daniel" with whatever path you want your Sim12 directory to sit in. I have not used a shortcut like "~" because then people will copy-and-paste it, and it will cause problems.

Preliminaries:

mkdir -p /Users/daniel/Sim12
mkdir -p /Users/daniel/Sim12/source

CLHEP

cd /Users/daniel/Sim12/source
wget http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/distributions/clhep-2.0.3.2-src.tgz
cd /Users/daniel/Sim12
tar -zxvf /Users/daniel/Sim12/source/clhep-2.0.3.2.tgz
mv 2.0.3.2/CLHEP ./
rmdir 2.0.3.2
cd CLHEP
./configure --prefix=/Users/daniel/Sim12/CLHEP
make
make install
export CLHEPROOT="/Users/daniel/Sim12/CLHEP"

XERCESC

cd /Users/daniel/Sim12
tar -zxvf /Users/daniel/Sim12/source/xerces-c-src_2_8_0.tar.gz
mv xerces-c-src_2_8_0 XERCESC
cd XERCESC/src/xercesc
export XERCESCROOT="/Users/daniel/Sim12/XERCESC"
./runConfigure -p linux -c gcc -x g++    # on a Mac, "./runConfigure -p macosx -c gcc -x g++"
make

Building XERCESC fails if using ~/blah for XERCESCROOT!

DAWN

cd /Users/daniel/Sim12
tar -zxvf /Users/daniel/Sim12/source/dawn_3_88a.taz 
mv dawn_3_88a DAWN
cd DAWN
make

GEANT4

cd /Users/daniel/Sim12
tar -zxvf /Users/daniel/Sim12/source/geant4.9.0.p01.gtar.gz
mv geant4.9.0.p01 GEANT4
cd GEANT4
mkdir data
cd data
tar -zxvf /Users/daniel/Sim12/source/G4EMLOW.4.3.tar.gz
tar -zxvf /Users/daniel/Sim12/source/G4NDL.3.11.tar.gz
tar -zxvf /Users/daniel/Sim12/source/G4RadioactiveDecay.3.2.tar.gz
tar -zxvf /Users/daniel/Sim12/source/PhotonEvaporation.2.0.tar.gz
cd ..
./Configure -build

Here is most of the output of the script, with my answers.

====GEANT4 Questions:====
Definition of G4SYSTEM variable is Linux-g++.
That stands for:

1) OS           : Linux

2) Compiler     : g++

To modify default settings, select number above (e.g. 2) 
[Press [Enter] for default settings] 
 
I can set things up so that your shell scripts and binaries are more portable,
at what may be a noticable cost in performance.  In particular, if you
ask to be portable, the following happens:

     1) Shell scripts will rely on the PATH variable rather than using
        the paths derived above.
     2) ~username interpretations will be done at run time rather than
        by Configure.

Do you expect to run these scripts and binaries on multiple machines? [n] y

Where is Geant4 source installed?  [/net/home/dan/Sim12/GEANT4]

Specify the path where Geant4 libraries and source files should be
installed. 
[/net/home/dan/Sim12/GEANT4] 

Do you want to copy all Geant4 headers 
in one directory? [n] y
 
Please, specify default directory where ALL the Geant4 data is installed:

 G4LEVELGAMMADATA:              /net/home/dan/Sim12/GEANT4/data/PhotonEvaporation2.0

 G4RADIOACTIVEDATA:             /net/home/dan/Sim12/GEANT4/data/RadioactiveDecay3.2

 G4LEDATA:                      /net/home/dan/Sim12/GEANT4/data/G4EMLOW4.3

 G4NEUTRONHPDATA:               /net/home/dan/Sim12/GEANT4/data/G4NDL3.11

You will be asked about customizing these next. 
[/net/home/dan/Sim12/GEANT4/data] 

Please, specify default directory where the Geant4 data is installed:

1) G4LEVELGAMMADATA:            /net/home/dan/Sim12/GEANT4/data/PhotonEvaporation2.0
2) G4RADIOACTIVEDATA:           /net/home/dan/Sim12/GEANT4/data/RadioactiveDecay3.2
3) G4LEDATA:                    /net/home/dan/Sim12/GEANT4/data/G4EMLOW4.3
4) G4NEUTRONHPDATA:             /net/home/dan/Sim12/GEANT4/data/G4NDL3.11

To modify default settings, select number above (e.g. 2) 
[Press [Enter] for default settings] 

Could not find CLHEP installed on this system!
Please, specify where CLHEP is installed:

CLHEP_BASE_DIR:                   /net/home/dan/Sim12/CLHEP

You can customize paths and library name of you CLHEP installation:

1) CLHEP_INCLUDE_DIR:           /net/home/dan/Sim12/CLHEP/include
2) CLHEP_LIB_DIR:               /net/home/dan/Sim12/CLHEP/lib
3) CLHEP_LIB:                   CLHEP
To modify default settings, select number above (e.g. 2)
[Press [Enter] for default settings] 

By default 'static' (.a) libraries are built.
Do you want to build 'shared' (.so) libraries?
[n] y

You selected to build 'shared' (.so) libraries. 
Do you want to build 'static' (.a) libraries too?
[n] y

Do you want to build 'global' compound libraries? [n] n

Do you want to compile libraries in DEBUG mode (-g)? [n] n

  G4UI_NONE

If this variable is set, no UI sessions nor any UI libraries are built. 
This can be useful when running a pure batch job or in a user framework 
having its own UI system.
Do you want to set this variable ?
[n] 

  G4UI_BUILD_XAW_SESSION
  G4UI_USE_XAW

  Specifies to include and use the XAW interfaces in the
  application to be built.
  The XAW (X11 Athena Widget set) extensions are required to activate 
  and build this driver.
[n] y

You have selected to use the XAW based user interfaces.
Specify the correct path where XAW is installed in your system.
It was found in /usr/X11R6. Press [Enter] to set this path or type the correct one.

You can set '-' (without quotation) to CANCEL the XAW flag at all: 
[/usr/X11R6] 

  G4UI_BUILD_XM_SESSION
  G4UI_USE_XM

  Specifies to include and use the XM Motif based user interfaces.
  The XM Motif extensions are required to activate and build this
  driver.
[n] y

You have selected to use the XM Motif based user interfaces.
Specify the correct path where Xm is installed in your system.
It was found in /sw. Press [Enter] to set this path or type the correct one.

You can set '-' (without quotation) to CANCEL the XM flag at all: 
[/sw] 

  G4VIS_NONE

If this variable is set, no visualization drivers will be built or used.
Do you want to set this variable ?
[n] 

  G4VIS_BUILD_OPENGLX_DRIVER
  G4VIS_USE_OPENGLX

It is an interface to the de facto standard 3D graphics library,
OpenGL. It is well suited for real-time fast visualization
and prototyping. The X11 version of the OpenGL libraries is
required.
[n] y

  G4VIS_BUILD_OPENGLXM_DRIVER
  G4VIS_USE_OPENGLXM

It is an interface to the de facto standard 3D graphics library,
OpenGL. It is well suited for real-time fast visualization
and prototyping. The X11 version of the OpenGL libraries and 
the Motif Xm extension is required.
[n] y

  G4VIS_BUILD_DAWN_DRIVER
  G4VIS_USE_DAWN

DAWN drivers are interfaces to the Fukui Renderer DAWN. DAWN is
a vectorized 3D PostScript processor suited to prepare technical
high quality outputs for presentation and/or documentation.
[n] y

  G4VIS_BUILD_OIX_DRIVER
  G4VIS_USE_OIX

The OpenInventor driver is based on OpenInventor technology 
for scientific visualization.
The X11 version of OpenInventor is required.
[n] n

  G4VIS_BUILD_RAYTRACERX_DRIVER
  G4VIS_USE_RAYTRACERX

Allows for interactive ray-tracing graphics through X11.
The X11 package is required.
[n] y

  G4VIS_BUILD_VRML_DRIVER
  G4VIS_USE_VRML

These driver generate VRML files, which describe 3D scenes to be 
visualized with a proper VRML viewer.
[n] y

  OGLHOME/include
  OGLHOME/lib

You have selected to use OpenGL driver.
Specify the correct path (OGLHOME) where OpenGL is installed in your system.
It was found in /usr. Press [Enter] to set this path or type the correct one.

You can set '-' (without quotation) to CANCEL the OpenGL flag at all: 
[/usr] 
 
  G4LIB_BUILD_G3TOG4  

The utility module 'g3tog4' will be built by setting this
variable. NOTE: it requires a valid FORTRAN compiler to be
installed on your system and the 'cernlib' command in the
path, in order to build the ancillary tools!
Do you want to build 'g3tog4' ?
 
[n] y
 
  G4LIB_BUILD_ZLIB  

Do you want to activate compression for output files
generated by the HepRep visualization driver?
 
[n] y
 
  G4ANALYSIS_USE

Activates the configuration setup for allowing plugins to
analysis tools based on AIDA (Astract Interfaces for Data
Analysis). In order to use AIDA features and compliant analysis
tools, the proper environment for these tools will have to be
set (see documentation for the specific analysis tools).
[n] 
 
End of configuration phase.

Now if you hit ENTER it should go off and compile for a long time. Get a coffee. And a pizza.

source /Users/daniel/Sim12/GEANT4/.config/bin/Linux-g++/env.sh # >>  For Linux users
source /Users/daniel/Sim12/GEANT4/.config/bin/Darwin-g++/env.sh #>> For MacOS X users
cp /Users/daniel/Sim12/GEANT4/.config/bin/Darwin-g++/env.sh  /Users/daniel/Sim12/env.sh
mkdir /Users/daniel/Sim12/workDir
export G4WORKDIR="/Users/daniel/Sim12/workDir"
cd source/physics_lists
make

EVIO

I had to install expat in MacOSX before I could compile

cd /Users/daniel/Sim12
tar -zxvf /Users/daniel/Sim12/source/evio-2.0-source.tar.gz
mv evio EVIO
cd EVIO
make
export EVIOROOT="/Users/daniel/Sim12/EVIO"

HDDS

cd /Users/daniel/Sim12
svn checkout https://phys12svn.jlab.org/repos/trunk/src/HDDS
cd HDDS
export G4WORKDIR=`pwd`
make
export HDDSROOT="/Users/daniel/Sim12/HDDS"

JGeant4

cd /Users/daniel/Sim12
svn checkout https://phys12svn.jlab.org/repos/trunk/src/JGeant4/
mv JGeant4 JGEANT4  # Just for consistency
cd JGEANT4
export G4WORKDIR=`pwd`
make
export JGEANT4ROOT="/Users/daniel/Sim12/JGEANT4"

Sim12

export G4WORKDIR="/Users/daniel/Sim12/workDir"
export HDDSROOT="/Users/daniel/Sim12/HDDS"
export EVIOROOT="/Users/daniel/Sim12/EVIO"
export CLHEPROOT="/Users/daniel/Sim12/CLHEP"
export XERCESCROOT="/Users/daniel/Sim12/XERCESC"
cd /Users/daniel/Sim12
tar -jxvf source/Sim12.tar.bz2 
cd /Users/daniel/Sim12/Sim12
make clean
make