Difference between revisions of "Kyle and Dan Build Notes"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
Line 188: Line 188:
  
 
=Dan's Notes=
 
=Dan's Notes=
 +
 +
Professor Holtrop only had 64-bit binaries, so we had to build our own.
 +
 +
Currently stuck on compiling Sim12:
 +
 +
[dan@benfranklin Sim12]$ make Making dependency for file Sim12.cc ...
 +
Making dependency for file src/Sim12VisDetectorConstruction.cc ...
 +
Making dependency for file src/Sim12SteppingVerbose.cc ...
 +
Making dependency for file src/Sim12SteppingAction.cc ...
 +
Making dependency for file src/Sim12RunAction.cc ...
 +
Making dependency for file src/Sim12PrimaryGeneratorMessenger.cc ...
 +
Making dependency for file src/Sim12PrimaryGeneratorAction.cc ...
 +
Making dependency for file src/Sim12PhysicsListMessenger.cc ...
 +
Making dependency for file src/Sim12PhysicsList.cc ...
 +
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]$
 +
 +
/net/home/dan/Sandbox/Sim12/CLHEP/lib does in fact exist, and should be correct.

Revision as of 15:50, 17 October 2007

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

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()':

The wiki is incorrect. According to http://clasweb.jlab.org/wiki/index.php/UNH_Sim12_Setup :

  • export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/XERCESC"

This should read:

  • export XERCESCROOT="/net/home/kyle/CLAS12/Sim12/where_ever_you_untar_too"
  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

creating working directory:

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

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

  • 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


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


New 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

currently working on this error

...

Steps to make Sim12:

run env.sh generated by geant4

export these variables:

  • export CLHEP_BASE_DIR="/net/home/kyle/CLAS12/Sim12/CLHEP"
  • export CLHEPROOT="/net/home/kyle/CLAS12/Sim12/CLHEP"
  • export CLHEP_LIB="/net/home/kyle/CLAS12/Sim12/CLHEP/lib"
  • export CLHEP_LIB_DIR="/net/home/kyle/CLAS12/Sim12/CLHEP/lib"
  • 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"
  • 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"
  • export G4SYSTEM="Linux-g++"
  • export LD_LIBRARY_PATH="/net/home/kyle/CLAS12/Sim12/geant4.9.0.p01/lib/Linux-g++"

Some of these are already set by env.sh



Dan's Notes

Professor Holtrop only had 64-bit binaries, so we had to build our own.

Currently stuck on compiling Sim12:

[dan@benfranklin Sim12]$ make Making dependency for file Sim12.cc ... Making dependency for file src/Sim12VisDetectorConstruction.cc ... Making dependency for file src/Sim12SteppingVerbose.cc ... Making dependency for file src/Sim12SteppingAction.cc ... Making dependency for file src/Sim12RunAction.cc ... Making dependency for file src/Sim12PrimaryGeneratorMessenger.cc ... Making dependency for file src/Sim12PrimaryGeneratorAction.cc ... Making dependency for file src/Sim12PhysicsListMessenger.cc ... Making dependency for file src/Sim12PhysicsList.cc ... 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]$

/net/home/dan/Sandbox/Sim12/CLHEP/lib does in fact exist, and should be correct.