<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Folks,<br>
    <br>
    As promised at one of the offline meetings, I wrote some brief
    instruction on how to set up the GlueX environment. Find it below
    and at<br>
    <br>
     
<a class="moz-txt-link-freetext" href="https://halldweb.jlab.org/wiki/index.php/Setting_Up_the_GlueX_Environment">https://halldweb.jlab.org/wiki/index.php/Setting_Up_the_GlueX_Environment</a><br>
    <br>
    It is also linked from the Offline Software page at<br>
    <br>
     
<a class="moz-txt-link-freetext" href="https://halldweb.jlab.org/wiki/index.php/GlueX_Offline_Software#GlueX_Software">https://halldweb.jlab.org/wiki/index.php/GlueX_Offline_Software#GlueX_Software</a><br>
    <br>
    Let me know if you find errors or mis-statements (or go ahead and
    correct them yourselves).<br>
    <br>
      -- Mark<br>
    __________________________________________________<br>
    <div id="globalWrapper">
      <div id="column-content">
        <div id="content" class="mw-body" role="main"> <br>
          <span dir="auto">Setting Up the GlueX Environment</span><br>
          <div id="bodyContent" class="mw-body-content">
            <div id="siteSub"><br>
            </div>
            <div id="mw-content-text" dir="ltr" class="mw-content-ltr"
              lang="en">We have two methods for setting up the
              environment for GlueX software. They are complementary;
              depending on what you want to do one will be more
              appropriate than the other. Let's call them "setenv" and
              "build_scripts".
              <br>
              <br>
              <span class="mw-headline" id="setenv">setenv</span><br>
              <br>
              For every complete build of sim-recon, a setenv.csh and a
              setenv.sh file is produced. Sourcing the appropriate file
              will reproduce the GlueX-related environment that was used
              to build that version of sim-recon exactly. Find the files
              under the BMS_OSNAME directory (directory that looks like
              Linux_RHEL7-x86_64-gcc4.8.3 for example, pick the one
              appropriate for your platform) of HALLD_HOME.
              <br>
              If you need custom settings of the environment, make a
              copy of the appropriate file and edit it. The file is
              nicely formatted and the changes you need are not hard to
              figure out.
              <br>
              <ul>
                <li> <b>Advantages</b>: nothing to change, guaranteed
                  consistency</li>
                <li> <b>Disadvantages</b>: customization by direct
                  editing of script, need pre-existing successful build
                  to start</li>
              </ul>
              <br>
              <span class="mw-headline" id="build_scripts">build_scripts</span><br>
              <br>
              There is a set of scripts to help you set-up your
              environment from scratch. Even if one is not starting from
              scratch, they can be used to set-up pre-existing sets of
              software. At JLab they are in
              /group/halld/Software/scripts/build_scripts . They can be
              checked out at <a rel="nofollow" class="external free"
                href="https://halldsvn.jlab.org/repos/trunk/scripts/build_scripts">https://halldsvn.jlab.org/repos/trunk/scripts/build_scripts</a>.
              <br>
              <ul>
                <li> <b>Advantages</b>: do not need a pre-existing
                  build, can customize configuration without re-writing
                  scripts.</li>
                <li> <b>Disadvantages</b>: more complicated,
                  consistency of packages not guaranteed</li>
              </ul>
              <br>
              <span class="mw-headline" id="Default_build_at_JLab"> 
                Default build at JLab</span><br>
              <br>
              Sourcing the script gluex_env_jlab.(c)sh will set-up the
              default environment at JLab.
              <br>
              <br>
              <span class="mw-headline" id="Nightly_build_at_JLab"> 
                Nightly build at JLab</span><br>
              <br>
              Source the file gluex_env_nightly.(c)sh with a date
              argument in YYYY-MM-DD format, e. g.
              <br>
              <code>source $BUILD_SCRIPTS/gluex_env_nightly.csh
                2015-07-15</code>
              <br>
              <br>
              <span class="mw-headline" id="Using_a_version.xml">  Using
                a version.xml</span><br>
              <br>
              If you are using the standard GlueX Version Managment
              System (GVMS) directory structure, you can use a
              version-specifying xml file to set up your environment.
              Version xml files are kept in
              /group/halld/www/halldweb/html/dist.
              <br>
              <ol>
                <li> Define GLUEX_TOP and BUILD_SCRIPTS</li>
                <li> Identify a version.xml, e. g., /path/to/version.xml</li>
                <li> <code>source
                    $BUILD_SCRIPTS/gluex_env_version.(c)sh
                    /path/to/version.xml</code></li>
              </ol>
              <br>
              At JLab, there is a GLUEX_TOP for each supported platform
              in /group/halld/Software/builds.
              <br>
              <br>
              <span class="mw-headline"
                id="Using_version.xml_and_a_custom_build_of_sim-recon">Using
                version.xml and a custom build of sim-recon</span><br>
              <ol>
                <li> Define GLUEX_TOP, BUILD_SCRIPTS</li>
                <li> Identify a version.xml, /path/to/version.xml</li>
                <li> <code>eval `$BUILD_SCRIPTS/version.pl
                    $version_file`</code></li>
                <li> <code>setenv HALLD_HOME /path/to/custom/sim-recon</code>
                  (or <code>export HALLD_HOME=/path/to/custom/sim-recon</code>)</li>
                <li> <code>source $BUILD_SCRIPTS/gluex_env.(c)sh</code></li>
              </ol>
            </div>
            <div class="printfooter">
              Retrieved from "<a dir="ltr"
href="https://halldweb.jlab.org/wiki/index.php?title=Setting_Up_the_GlueX_Environment&oldid=68688">https://halldweb.jlab.org/wiki/index.php?title=Setting_Up_the_GlueX_Environment</a>"</div>
          </div>
        </div>
      </div>
    </div>
    <br>
  </body>
</html>