You must use GNU make, gnumake, for any EPICS builds. Set your path so that a gnumake version 3.81 or later is available.
gcc
You must have gcc version 3.4.2 or later.
Perl
You must have perl version 5.8 or later installed. The configure files do not specify the perl full pathname. You need the perl executable in your search path.
Since releases and versions are evolving and to be able to follow this trend, the normal user logged in to Linux system at GSI can rely on having the following environment variables available:
GSI_OS_FLAVOR
GSI_OS_VERSION
GSI_COMPILER_CC
Based on this the installations of epics can be found in directories based on the following scheme:
${GSI_OS_FLAVOR:?undefined}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/g'/$(uname -m)/${GSI_COMPILER_CC:?undefined}
At the moment /u/epics/ holds all EPICS versions without considering this scheme, but will be in future:
/u/epics/EPICS/${GSI_OS_FLAVOR:?undefined}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/g'/$(uname -m)/${GSI_COMPILER_CC:?undefined}/EPICS-X.YY.ZZ
...and a little bit later:
/usr/local/pub/${GSI_OS_FLAVOR:?undefined}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/g'/$(uname -m)/${GSI_COMPILER_CC:?undefined}/EPICS-X.YY.ZZ
By using the epics script ( see below) every user is directed to the corresponding set of versions.
Download the version of Base (version as of 2020 May 28 is 7.0.4) from https://epics-controls.org/download/base to the directory ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION}
The epics script is a global script (used at GSI) to set the EPICS settings.
It relies on having ((symbolic) links to) myepicslogin.sh and epicslogin.sh in the EPICS versions home directories (installation, see below).
Usually it is only installed once for all EPICS distributions and is told (by default values, environment variables, options) where to look for the installations.
By just typing/sourcing epics (which is at GSI included in the default path) practical all settings are done.
<div style="text-align:right"><a style="font-size:smaller" href="/edit/Epics/UsageOfEpicsScript">edit</a></div>
epics has to be sourced as is, i.e. called with a leading dot
$> . epics -h
gives all information on options:
epics [Options] [version]
sets environment variables for EPICS
* changes to corresponding EPICS HOME directory:
[<HOME>/<PREFIX><VERSION>, default: /u/epics/EPICS-3.14.9]
* and calls the (local) login script for this version
* relies on having a (local) login script ( default: ./myepicslogin.sh )
in the home directory of the corresponding EPICS installation
* optionally might execute (source) scripts before and after the call to the login script
* defaults:
* before script: [ not set ]
* after script: [ not set ]
arguments:
version: EPICS version (default: "3.14.9")
options:
-h : prints this Help
-l : list all available versions in home directory /u/epics
-s : stay at $EPICS_HOME directory
-q : quiet no output, but error messages
-v : verbose mode
-d : debug mode, just echo no action
-H argument : home directory of several EPICS versions
(default: "/u/epics")
-P argument : version prefix for PREFIXversion
(default: "EPICS-")
-L argument : login script looked for in $EPICS_HOME
(default: "./myepicslogin.sh")
-B argument : script to be sourced before calling login script
(default: "[ not set ]")
-A argument : script to be sourced after calling login script
(default: "[ not set ]")
LOCAL environment variables:
EPICS_LOCAL_HOME:
the default home directory of the several EPICS versions can be modified
by setting the environment variable
EPICS_LOCAL_HOME [at the moment not set]
EPICS_LOCAL_DIR_PREFIX:
the default search prefix for directories in /u/epics can be modified
by setting the environment variable
EPICS_LOCAL_DIR_PREFIX [at the moment not set]
EPICS_LOCAL_LOGIN_SCRIPT:
the default call to the (local) login script
in the epics installation directories can be modified
by setting the environment variable
EPICS_LOCAL_LOGIN_SCRIPT [at the moment not set]
EPICS_LOCAL_DEFAULT_VERSION:
the EPICS version can be modified
by setting the environment variable
EPICS_LOCAL_DEFAULT_VERSION [at the moment not set]
EPICS_LOCAL_SCRIPT_BEFORE_LOGIN:
the local script default for a script sourced befored login can be modified
by setting the environment variable
EPICS_LOCAL_SCRIPT_BEFORE_LOGIN [at the moment not set]
EPICS_LOCAL_SCRIPT_AFTER_LOGIN:
the local script default for a script sourced after login can be modified
by setting the environment variable
EPICS_LOCAL_SCRIPT_AFTER_LOGIN [at the moment not set]
you have to call this script with a leading '. ', i.e. source it
--> i.e.: '. epics'
The setup script epics relies on other scripts in the EPICS versions home directories.
Here you can see how those files are invoked:
Typically most of those files are just links to other places, except for myepicslogin.sh. Based on the basic setup (see below) an adminstrator can add / modify / tweak at this recommended place.
. epics [ -Options ] [ <version> ]
general login script, able to call several EPICS installations
1. optional: <before script>
source <before script>
(set by environment variable: EPICS_LOCAL_BEFORE_SCRIPT, or overwritten by option -B <Path><bash script> )
2. <loginScript>"myepicslogin.sh"
source <loginScript>
local, i.e. to the single EPICS installation, login script
1 Change to the directory ==$ALL_EPICS_TOP_DIR/bin and create symbolic links to ${ALL_EPICS_TOP_DIR}/tools for at least the ${ALL_EPICS_TOP_DIR}/tools/bin/epics script.
epicslogin.sh has to be sourced as is, i.e. called with a leading dot
$> . ./epicslogin.sh
The option ' -h ' or anything else gives a help with all information on options and syntax:
$> ./epicslogin.sh -h
epicslogin.sh [Options] [version]
-- sets environment variables for EPICS
-- calls the Site Profile: set via "-P" or default: "${baseDir}/startup/Site.profile"
--
-- version: EPICS version
-- (default: "3.14.10")
-- options:
----- -v : verbose mode
----- -h : prints this help
----- -H argument : sets $EPICS_HOME to argument
----- (default: "${homeofuser}/EPICS")
----- -B argument : sets $EPICS_BASE to argument or
----- if argument is a relative path it extends to $EPICS_HOME/argument
----- (default: "base-${epicsversion}")
----- -P argument : sets Site Profile to be sourced to argument
----- (default: "${baseDir}/startup/Site.profile"
----- where $basedir behaves like EPICS_BASE
----- as described for option "-B")
----- -A argument : sets path to necessary helper script "fcn_addtopath.bash":
----- (default: "/u/epics/bin/fcn_addtopath.bash")
-----
----- if MY_EPICS_BASE (="") is externally set as base directory:
----- case "option -B not used":
----- EPICS_BASE set to MY_EPICS_BASE
----- case "option -B used:
----- MY_EPICS_BASE set to EPICS_BASE
-----
----- version: version of EPICS
----- (used in the path <epicshome>/base-version)
-----
-- you have to call this script with a leading '. '
--> i.e.: '. epicslogin.sh'
thus, e.g.
. ./epicslogin.sh -v -H <EPICS Home Directory> -B <EPICS Base Directory> -A <EPICS Home Directory><EPICS Version>
gives
sourcing <EPICS Home Directory>/EPICS-<EPICS Version>/base-<EPICS Version>/startup/Site.profile
EPICS_HOME set to <EPICS Home Directory>/EPICS-<EPICS Version>
EPICS_BASE set to <EPICS Home Directory>/EPICS-<EPICS Version>/base-<EPICS Version>
EPICS_EXTENSIONS set to <EPICS Home Directory>/EPICS-<EPICS Version>/extensions
EPICS_MODULES set to <EPICS Home Directory>/EPICS-<EPICS Version>/modules
PSPRINTER set to lp
EPICS_DISPLAY_PATH set to <EPICS Home Directory>/EPICS-<EPICS Version>/extensions/medm/adl
ORBITSCREENHOME set to <EPICS Home Directory>/EPICS-<EPICS Version>/extensions
EPICS_AR_PORT set to 7002
added <EPICS Home Directory>/EPICS-<EPICS Version>/extensions/javalib behind CLASSPATH
EPICS_SNCSEQ_HOME set to <EPICS Home Directory>/EPICS-<EPICS Version>/modules/seq
EPICS_HOST_ARCH set to linux-x86
added <EPICS Home Directory>/EPICS-<EPICS Version>/extensions/bin/linux-x86 in front of PATH
added /u/epics/bin:<EPICS Home Directory>/EPICS-<EPICS Version>/base-<EPICS Version>/bin/linux-x86 in front of PATH
EPICS_CA_ADDR_LIST set to <hostname>
EPICS_CA_AUTO_ADDR_LIST set to NO
--> Created for each variable EPICS_* a copy EPICS_*_COPY
to be used in CONFIGURE scripts where EPICS_ variables might be overwritten
2.3.1.2.1.1 To install epicslogin.sh (fcn_addtopath.bash, uniqpaths) ...
To simplify it is recommended to create this short script in the <EPICS Home Directory> containing all settings, e.g. myepicslogin.sh and modify it for your needs:
#!/bin/bash
myepicslogin_scriptname=myepicslogin.sh
#set -x -v #uncomment for debugging
# make sure script is sourced
if [ ${0##*/} = $myepicslogin_scriptname ]
then
echo script \`${myepicslogin_scriptname}\' has to be sourced, i.e. called with a leading \`. $myepicslogin_scriptname\'
exit -1
fi
unset myepicslogin_scriptname
. ./epicslogin.sh -v -H <EPICS Home Directory> -B <EPICS Base Directory> -A <Fcn Helper Bin Directory>/fcn_addtobath.bash -P <EPICS Base Directory>/startup/<startup Script>
where <Your Host's Architecture> can be determined via the script Arch (sh script) or EpicsHostArch.pl (perl script) in the directory <EPICS Base Directory>/startup
so that you could also write:
$> export EPICS_HOST_ARCH=$(EpicsHostArch)
Note in addition the other variables mentionend in the README fimale's section Set environment variables.
On some system you might face the problem that the compiling stops, due to the missing library libcurses. For an (elegant) solution see the EPICS tech-talk threads:
script to automatically extract EPICS_BASE/HOME from RELEASE subdirectory configure/RELEASE and start [[https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics][epics]] based on the results