Skip to content

Building TRACE from source

Eric Flumerfelt edited this page Jun 17, 2022 · 2 revisions

Building TRACE from source

To build the TRACE package, follow the steps for any CET-enabled package. Alternatively, you can build TRACE using MRB, by following the instructions here: Adding TRACE to a MRB development area.

1. Check out TRACE from either the static release repository (trace-git) or the SVN development repository:

Release versions of TRACE:

cd /working/dir  
git clone https://github.com/art-daq/trace.git trace

Or, if you’re a developer on the project (with kerberos access):

cd /working/dir  
git clone https://github.com/art-daq/trace.git trace

Development versions of TRACE

cd /working/dir  
svn co svn+ssh://p-trace@cdcvs.fnal.gov/cvs/projects/trace-svn/trunk
trace

2. Build your checked-out version of TRACE

LATEST (via cetmodules):

mkdir build_trace
cd build_trace
# cmake version 3.11 is the current min cmake version
source <source-dir>/ups/setup_for_development
buildtool -iI<install dir>

Example:

cd ~/work/tracePrj
mkdir build_trace; cd $_
source ../trace/ups/setup_for_development
buildtool
buildtool -iI$HOME/p
# buildtool -piI$HOME/p # -p makes a tar package, must have -I specified as well

e.g.

rm -fr *; cmake -DCMAKE_INSTALL_PREFIX=$HOME/p -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWANT_UPS:BOOL=ON ../trace && make install

PREVIOUSLY/OLD/OBSOLETE:

mkdir build_trace
cd build_trace
source ../trace/ups/setup_for_development
setup gcc v6_3_0  # not needed on d14. Note: gcc v6_3_0 has bin/cc which is needed b/c buildtools forces non-qualified products to use cc
buildtool -cpv -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_C_FLAGS='"-std=c11 -DDO_THREADS -pthread"' 2>&1 | tee build.out
# buildtool -iI /path/to/ups/product/directory # To install TRACE in UPS product area

Sometimes you may need to tweak the tar file.

3. Upload to scisoft (i.e. for (latest) Release version)

Use copyToSciSoft script, available at http://scisoft.fnal.gov/scisoft/bundles/tools/copyToSciSoft.

From bash, continuing in build directory from above:

ssh scisoftportal.fnal.gov hostname || echo 'You need a FermiCloud account and permission to access ScisoftPortal!'
perl <(curl -s http://scisoft.fnal.gov/scisoft/bundles/tools/copyToSciSoft) TRACE-3.*.bz2

Note: On scisoftportal.fnal.gov, the path to the packages is /nasroot/SciSoft/packages/TRACE

Building on Jenkins

Set up artdaq_dependencies project

  1. Check out the artdaq-utilities repository - git clone https://github.com/art-daq/artdaq_utilities.git
  2. Edit for_jenkins/artdaq_dependencies-cfg-3.00.03, updating TRACE and cetmodules versions to match those declared in TRACE’s CMakeLists.txt
  3. Comment out any other packages
  4. Commit and push changes - release=v3_15_02; git commit -am"TRACE release $release"; git push

Build on Jenkins

  1. Make sure you’re CILogon’d via https://cilogon.org
  2. Go to https://buildmaster.fnal.gov/buildmaster/job/artdaq_dependencies/ and click “Configure”
  3. Ensure that all approriate OSes are selected under “label2” -> “Labels” (Check art-release-build to see which ones are necessary)
  4. Click “Build Now”
  5. to see the log: click on a red or green bubble (not the menu pull-down), then click on the run number on the left -> this should present you a link to the .log file (e.g. build_TRACE-v3_15_00-Darwin64bit+17.log)
  6. If all builds are successful, use copyFromJeckings and copyToScisoft to upload built products to SciSoft, as described artdaq:Building_artdaq_with_Jenkins_and_distributing_it_with_SciSoft
    1. For TRACE, the packages are built redundantly for each qualifier; only one qualifier need be given: mkdir fromJenkins cd fromJenkings ../copyFromJenkins -q e19 artdaq_dependencies ../copyToSciSoft TRACE-3.*.bz2

      To remove files from a version from scisoft: ssh scisoftportal.fnal.gov "rm -f /nasroot/SciSoft/packages/TRACE/<underscore_version>/*"

Clone this wiki locally