Epics@GSI Webhome

step-by-step - EPICS installations at GSI


... on user account epics on Linux sarge system

On the Linux system at GSI there are:
  • an user account epics to provide the space to store this installation, a login is practically '_never_' foreseen. (I meanwhile even forgot the password)
  • two groups:
    1. epicsadm for general installations
    2. epicsusr for user specific installations

GSI Prerequisites

Things you have to prepare and conditions you have to fulfill before being able to start any installation for the general GSI installations ... more.


GSI Directory Setup

Here you can find a sketch of how the directories are related with each other

  • Nomenclature
  file
  link to a file
  directory
  link to a directory

  • /usr/local/bin
    • contains (soft) links to <GSI's EPICS Installation Top Directory>/bin/
      • where at the moment:
        • <GSI's EPICS Installation Top Directory> is ~epics
      • but will be:
        • /usr/local/pub
    • linked files
      • epics

  • <GSI's EPICS Installation Top Directory>
  <GSI's EPICS Installation Top Directory>
  bin/
  epics
  epicslogin.sh
  fcn_addtopath.bash
  uniqpaths
  EPICS-<Version A.BB.CC>[_<optional Suffix>] (old structure, supported until new structure has established)
  ...
  EPICS-<Version X.YY.ZZ> (old structure, supported until new structure has established)
  EPICS
  ${GSI_OS_FLAVOR}${GSI_OS_VERSION}/$(uname -m)/${GSI_COMPILER_CC}
  (same sub structure as for EPICS directory in the local installation, see below)

  • <All local EPICS top directory>
  <All local EPICS top directory>
  .profile / .bashrc
  ( could contain settings for EPICS_LOCAL_... settings for epics script:
  EPICS_LOCAL_HOME_DIR=EPICS/${GSI_OS_FLAVOR}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\(.\..\)\../\1/g')/$(uname -m)/${GSI_COMPILER_CC} )
  bin
  (should be included in the lookup path PATH)
  epics
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  epicslogin.sh
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  fcn_addtopath.bash
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  uniqpaths
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  programs
  pro/dev (optionally)
  ${GSI_OS_FLAVOR}${GSI_OS_VERSION}/$(uname -m)/${GSI_COMPILER_CC}
  bin
  (should be included in the lookup path PATH)
  lib
  (if necessary should be included in the lookup e.g. path LD_LIBRARY_PATH)
  include
  <Installation directory 1> (e.g. axis, missing libraries, tweaks)
  ...
  <Installation directory N>
  EPICS
  ${GSI_OS_FLAVOR}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\(.\..\)\../\1/g')/$(uname -m)/${GSI_COMPILER_CC}
  EPICS-<Version A.BB.CC>[_<optional Suffix>][_dev]
  (w/  suffix: _dev: development versions, place for first installation of new/changed code, may not be working)
  (w/o suffix: _dev: production versions, only changed, if changes work in _dev)
  ...
  EPICS-<Version X.YY.ZZ>
  myepicslogin.sh
  (This setup file myepicslogin.sh is the only recommended place to change/tweak/modify settings for this local installation)
  <other setup files> (optional: called by myepicslogin.sh)
  epicslogin.sh
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  fcn_addtopath.bash
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  uniqpaths
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  base ((soft) link auf base-<Version X.YY.ZZ>
  base-<Version X.YY.ZZ>
  configure
  RELEASE : EPICS_BASE=$(EPICS_HOME)/base
  CONFIG_SITE : =CROSS_COMPILE_TARGET_ARCH ... ==
  startup
  Site.profile
  Site.profile.org.base.<DDYYMM>
  extensions
  (in case of problems, probably (soft) links to other ${GSI_COMPILER_CC} version directory)
  configure (q.v. "base")
  src
  Makefile (master Makefile, edited during installation)
  <Installation directory 1>
  ...
  <Installation directory N>
  modules
  (in case of problems, probably (soft) links to other ${GSI_COMPILER_CC} version directory)
  __bus__/...
  configure (q.v. "base")
  ...
  __soft__/...
  configure (q.v. "base")

-- PeterZumbruch - 23 Jun 2009


GSI Installations Status

Linux x86/x86_64

~epics (Debian Sarge 3.1)

base

  EPICS-3.14.11 EPICS-3.14.11_cris EPICS-3.14.10 EPICS-3.14.10_cris EPICS-3.14.9 EPICS-3.14.9_cris EPICS-3.14.8.2
base --- --- --- --- DONE --- --- DONE DONE DONE
- patches  
  --- --- --- --- subRecord --- --- --- --- --- --- --- ---

Extensions

  EPICS-3.14.11 EPICS-3.14.11_cris EPICS-3.14.10 EPICS-3.14.10_cris EPICS-3.14.9 EPICS-3.14.9_cris EPICS-3.14.8.2
ALH - Alarm Handler -- Version: 1.2.24 --- --- --- --- DONE --- --- DONE --- --- --- ---
Archive Viewer - Java-based archive data viewer (SNS) --- --- --- --- --- --- --- --- --- --- --- --- --- ---
Burt - Backup and Restore Tool --- --- --- --- DONE --- --- DONE --- --- --- ---
CaOctave - CA interface for Octave --- --- --- --- --- --- --- --- --- --- --- --- --- ---
CaSnooper - Version: 2.1.2.1 --- --- --- --- DONE --- --- DONE --- --- DONE
CASR - Host-based Save/Restore --- --- --- --- DONE --- --- DONE --- --- --- ---
Channel Archiver -- Version: 2.9.2 --- --- --- --- DONE --- --- DONE --- --- --- ---
EDM - Extensible Display Manager --- --- --- --- --- --- --- --- --- --- --- --- --- ---
MEDM - Motif Editor and Display Manager -- Version: 3.1.4 --- --- --- --- DONE --- --- DONE --- --- DONE
MSI - Macro Substitution and Include Tool -- Version: 1.5 --- --- --- --- DONE --- --- DONE DONE --- ---
Probe - Motif Channel Monitoring program --- --- --- --- --- --- --- --- --- --- --- --- --- ---
SDDS - The Self-Describing data sets analysis package --- --- --- --- (DONE) (libs) --- --- DONE --- --- DONE
SDDSepics - EPICS specific --- --- --- --- (DONE) (libs) --- --- DONE --- --- DONE
Strip Tool - Strip-chart plotting tool --- --- --- --- --- --- --- --- --- --- --- --- DONE
VDCT - Visual Database Construction Tool --- --- --- --- DONE --- --- DONE DONE DONE
WebCA - Channel Access web browser plug-in (CosyLab) --- --- --- --- --- --- --- --- --- --- --- --- --- ---

Modules

  EPICS-3.14.11 EPICS-3.14.11_cris EPICS-3.14.10 EPICS-3.14.10_cris EPICS-3.14.9 EPICS-3.14.9_cris EPICS-3.14.8.2
EPICS Sequencer - Version: 2.0.12 --- --- --- --- DONE --- --- DONE --- --- DONE
IPAC Module -- Version: 2.9 --- --- --- --- --- --- --- --- DONE --- --- DONE
Ipac (SynApps) --- --- --- --- --- --- --- --- DONE --- --- --- ---
asynDriver: Asynchronous Driver Support -- Version: 4.11a --- --- --- --- --- --- --- --- DONE --- --- DONE
StreamDevice 2 -- Version: 2.4 --- --- --- --- --- --- --- --- DONE --- --- --- ---
genSub --- --- --- --- --- --- --- --- --- --- --- --- --- ---
genSub (synApps) --- --- --- --- --- --- --- --- DONE --- --- --- ---
allenBradley --- --- --- --- --- --- --- --- --- --- --- --- --- ---
allenBradley (synApps) --- --- --- --- --- --- --- --- DONE --- --- --- ---
vxStats --- --- --- --- --- --- --- --- --- --- --- --- --- ---
vxStats (synApps) --- --- --- --- --- --- --- --- DONE --- --- --- ---
calc --- --- --- --- --- --- --- --- --- --- --- --- --- ---
calc (synApps) --- --- --- --- --- --- --- --- DONE --- --- --- ---
caPutLog --- --- --- --- --- --- --- --- --- --- --- --- --- ---
imCaLib --- --- --- --- --- --- --- --- --- --- --- --- --- ---
DLI Ethernet Power Controller II --- --- --- --- --- --- --- --- --- --- --- --- --- ---
PV List Server --- --- --- --- --- --- --- --- --- --- --- --- --- ---

Packages / Distributions

  EPICS-3.14.11 EPICS-3.14.11_cris EPICS-3.14.10 EPICS-3.14.10_cris EPICS-3.14.9 EPICS-3.14.9_cris EPICS-3.14.8.2
synApps (valid for R3.14.10 and higher) -- Version: 5.4.1 --- --- --- --- --- --- --- --- --- --- --- --- --- ---
synApps (valid for R3.14.8.2 and higher) -- Version: 5.3 --- --- --- --- --- --- --- --- DONE --- --- --- ---

Other Tools or Libraries

procServ - Process Server with Telnet Console and Log Access -- Version: 2.4.0 DONE
procServ - Process Server with Telnet Console and Log Access -- Version: 2.4.1 --- ---

Waiting Extensions
... (Click to expand) Click to expand


~scs/EPICS

* ~scs/EPICS/%GSI_EPICS_OS_DIR_TREE% (Debian Etch 4.0)

base

  EPICS-3.14.11 EPICS-3.14.11_cris EPICS-3.14.10 EPICS-3.14.10_cris
  Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0
base --- --- DONE --- --- DONE --- --- DONE --- --- DONE
- patches
  --- --- --- --- --- --- --- --- --- --- subRecord --- --- subRecord

Extensions

  EPICS-3.14.11 EPICS-3.14.11_cris EPICS-3.14.10 EPICS-3.14.10_cris
  Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0
ALH - Alarm Handler -- Version: 1.2.24 --- --- --- --- --- --- --- --- --- --- DONE --- --- DONE
Archive Viewer - Java-based archive data viewer (SNS) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
Burt - Backup and Restore Tool --- --- --- --- --- --- --- --- --- --- DONE --- --- DONE
CaOctave - CA interface for Octave --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
CaSnooper - Channel Access Broadcast Monitoring Tool -- Version: 2.1.2.1 --- --- --- --- --- --- --- --- --- --- DONE --- --- DONE
CASR - Host-based Save/Restore --- --- --- --- --- --- --- --- --- --- DONE --- --- DONE
Channel Archiver -- Version: 2.9.2 --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
EDM - Extensible Display Manager --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
MEDM - Motif Editor and Display Manager -- Version: 3.1.4 --- --- --- --- --- --- --- --- --- --- DONE --- --- DONE
MSI - Macro Substitution and Include Tool -- Version: 1.5 --- --- --- --- --- --- --- --- --- --- DONE --- --- DONE
Probe - Motif Channel Monitoring program --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
SDDS - The Self-Describing data sets analysis package --- --- --- --- --- --- --- --- --- --- (DONE)? --- --- (DONE?)
SDDSepics - The Self-Describing data sets analysis package EPICS specific --- --- --- --- --- --- --- --- --- --- (DONE)? --- --- (DONE?)
Strip Tool - Strip-chart plotting tool --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
VDCT - Visual Database Construction Tool --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
WebCA - Channel Access web browser plug-in (CosyLab) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---

Modules

  EPICS-3.14.11 EPICS-3.14.11_cris EPICS-3.14.10 EPICS-3.14.10_cris
  Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0
EPICS Sequencer -- Version: 2.0.12 --- --- --- --- --- --- --- --- --- --- --- --- --- --- (DONE)
IPAC Module -- Version: 2.9 --- --- --- --- --- --- --- --- --- --- DONE --- --- (DONE)
Ipac (SynApps) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
asynDriver: Asynchronous Driver Support -- Version: 4.11a --- --- --- --- --- --- --- --- --- --- DONE --- --- (DONE)
StreamDevice 2 -- Version: 2.4 --- --- --- --- --- --- --- --- --- --- DONE --- --- (DONE)
genSub --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
genSub (synApps) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
allenBradley --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
allenBradley (synApps) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
vxStats --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
vxStats (synApps) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
calc --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
calc (synApps) --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
caPutLog --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
imCaLib --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
DLI Ethernet Power Controller II --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
PV List Server --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---

Packages / Distributions

  EPICS-3.14.11 EPICS-3.14.11_cris EPICS-3.14.10 EPICS-3.14.10_cris
  Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0 Sarge 3.1 Etch 4.0
synApps (valid for R3.14.10 and higher) -- Version: 5.4.1 --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
synApps (valid for R3.14.8.2 and higher) -- Version: 5.3 --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---

Other Tools or Libraries

  Sarge 3.1 Etch 4.0
procServ - Process Server with Telnet Console and Log Access -- Version: 2.4.0 --- --- DONE
procServ - Process Server with Telnet Console and Log Access -- Version: 2.4.1 --- --- --- ---

Waiting Extensions
... (Click to expand) Click to expand

__new GSI structure

* <GSI>/EPICS/%GSI_EPICS_OS_DIR_TREE%

Not yet active

... (Click to expand) Click to expand

Linux-Arm


Raspberry Pi
 

Dreamplug
 

Installation

Base

Base
3.14.12.3 linux-arm

Extensions
Extension Version Comment
ALH - Alarm Handler 1.2.33  
BURT - Backup and Restore Tool 20130124  
CaSnooper - Channel Access Broadcast Monitoring Tool 2.1.2.3  
CASR - Channel Access Save and Restore 20091027  
EZCA - E-Z (Easy) Channel Access 20111019  
MEDM - Motif Editor and Display Manager 3.1.7  
MSI - Macro Substitution and Include Tool 1.6  
Probe 1.1.7.1  
SDDS - Self-Describing Data Sets analysis package Tools 3.1 SDDSaps/sdds... excluded
originally architecture linux-arm not supported in $EPICS_EXTENSIONS/src/SDDS/lzma/Makefile
copied linux-x86 section into new linux-arm
SDDSepics - SDDS Compliant EPICS tools 3.1  
StripTool - Strip-char plotting Tool 2.5.10.0  

Modules & Support

Module Version Comment
asyn - asynDriver: Asynchronous Driver Support 4.18  
busy - busy record 1.6  
calc - calc module 3.2  
ipac - IndustryPack Driver for EPICS 2.12  
seq - EPICS Sequencer - State Notation Language
Compiler (snc) and run-time (seq) support module
2.1.13  
sscan 2.9  
StreamDevice 2 2.6  
GTR Generic Transient Recorder 2.3  
IOC Status and Control (devIocStats) 3.1.11  
Motor Record and Device/Driver support 6.8  
ASYN support for USB TMC (Test & Measurement Class) 00.14  
USB mouse (ASYN) 0.3  
modbus (ASYN) 2.5  

Tar Ball

Installation

Base

Base
3.14.12.3 linux-arm

Extensions
Extension Version Comment
ALH - Alarm Handler 1.2.33  
BURT - Backup and Restore Tool 20130124  
CaSnooper - Channel Access Broadcast Monitoring Tool 2.1.2.3  
CASR - Channel Access Save and Restore 20091027  
EZCA - E-Z (Easy) Channel Access 20111019  
MEDM - Motif Editor and Display Manager 3.1.7  
MSI - Macro Substitution and Include Tool 1.6  
Probe 1.1.7.1  
SDDS - Self-Describing Data Sets analysis package Tools 3.1 SDDSaps/sdds... excluded
originally architecture linux-arm not supported in $EPICS_EXTENSIONS/src/SDDS/lzma/Makefile
copied linux-x86 section into new linux-arm
SDDSepics - SDDS Compliant EPICS tools 3.1  
StripTool - Strip-char plotting Tool 2.5.10.0  

Modules & Support

Module Version Comment
asyn - asynDriver: Asynchronous Driver Support 4.18  
busy - busy record 1.6  
calc - calc module 3.2  
ipac - IndustryPack Driver for EPICS 2.12  
seq - EPICS Sequencer - State Notation Language
Compiler (snc) and run-time (seq) support module
2.1.13  
sscan 2.9  
StreamDevice 2 2.6  
GTR Generic Transient Recorder 2.3  
IOC Status and Control (devIocStats) 3.1.11  
Motor Record and Device/Driver support 6.8  
ASYN support for USB TMC (Test & Measurement Class) 00.14  
USB mouse (ASYN) 0.3  
modbus (ASYN) 2.5  

Tar Ball

-- PeterZumbruch - 01 Jul 2009


EPICS base

Installation of the EPICS base distribution:


1 Preface

1.1 Scripts: #!/bin/bash


Up-to-now
All tools rely on bash shell scripting.


1.2 some global environment variables during installation

During installation those environment variables are used to define a common setup environment

%EPICS_ALL_EPICS_TOP_DIR_NAME%
top directory which holds different EPICS versions and whose bin directory is included in $PATH (e.g. ~epics, /usr/local/pub)
%EPICS_DOWNLOAD_DIR_NAME%
directory where you store your downloads
%EPICS_HOME_DIR_NAME%
directory where your current installation should be (installed)
%EPICS_VERSION_NAME%
version to be installed

therefore do the export here:
%COMMENT_CMD% Global installation settings

echo -n "%EPICS_ALL_EPICS_TOP_DIR_DUMMY%: && %READ_CMD% %EPICS_ALL_EPICS_TOP_DIR_NAME% && export %EPICS_ALL_EPICS_TOP_DIR_NAME%
echo -n "%EPICS_HOME_DIR_DUMMY%: && %READ_CMD% %EPICS_HOME_DIR_NAME% && export %EPICS_HOME_DIR_NAME%
echo -n "%EPICS_DOWNLOAD_DIR_DUMMY%: && %READ_CMD% %EPICS_DOWNLOAD_DIR_NAME% && export %EPICS_DOWNLOAD_DIR_NAME%
echo -n "%EPICS_VERSION_DUMMY%: && %READ_CMD% %EPICS_VERSION_NAME% && export %EPICS_VERSION_NAME%



2 General Preparations

Following the corresponding %EPICSBASE_DOCS%/README.html (local copy) section Building EPICS base (Unix and Win32) provided in the download area, which is titled Installation Instruction, do the following:


2.1 Checks

  • Check the supported compilers
  • Check the software requirements
*Software requirements of version %EPICSBASE_VERSION%*

GNU make
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.


2.2 Create Directory and Download Sources


2.2.1 Preface - GSI: Facing different versions flavors of OS, architectures and compilers


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_EPICS_OS_DIR_TREE%

At the moment /u/epics/ holds all EPICS versions without considering this scheme, but will be in future:
  • /u/epics/EPICS/%GSI_EPICS_OS_DIR_TREE%/EPICS-X.YY.ZZ

...and a little bit later:
  • /usr/local/pub/%GSI_EPICS_OS_DIR_TREE%/EPICS-X.YY.ZZ

By using the epics script ( see below) every user is directed to the corresponding set of versions.


2.2.1.1 Directory Setup

Here you can find a sketch of how the directories are related with each other

  • Nomenclature
  file
  link to a file
  directory
  link to a directory

  • /usr/local/bin
    • contains (soft) links to <GSI's EPICS Installation Top Directory>/bin/
      • where at the moment:
        • <GSI's EPICS Installation Top Directory> is ~epics
      • but will be:
        • /usr/local/pub
    • linked files
      • epics

  • <GSI's EPICS Installation Top Directory>
  <GSI's EPICS Installation Top Directory>
  bin/
  epics
  epicslogin.sh
  fcn_addtopath.bash
  uniqpaths
  EPICS-<Version A.BB.CC>[_<optional Suffix>] (old structure, supported until new structure has established)
  ...
  EPICS-<Version X.YY.ZZ> (old structure, supported until new structure has established)
  EPICS
  ${GSI_OS_FLAVOR}${GSI_OS_VERSION}/$(uname -m)/${GSI_COMPILER_CC}
  (same sub structure as for EPICS directory in the local installation, see below)

  • <All local EPICS top directory>
  <All local EPICS top directory>
  .profile / .bashrc
  ( could contain settings for EPICS_LOCAL_... settings for epics script:
  EPICS_LOCAL_HOME_DIR=EPICS/${GSI_OS_FLAVOR}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\(.\..\)\../\1/g')/$(uname -m)/${GSI_COMPILER_CC} )
  bin
  (should be included in the lookup path PATH)
  epics
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  epicslogin.sh
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  fcn_addtopath.bash
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  uniqpaths
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  programs
  pro/dev (optionally)
  ${GSI_OS_FLAVOR}${GSI_OS_VERSION}/$(uname -m)/${GSI_COMPILER_CC}
  bin
  (should be included in the lookup path PATH)
  lib
  (if necessary should be included in the lookup e.g. path LD_LIBRARY_PATH)
  include
  <Installation directory 1> (e.g. axis, missing libraries, tweaks)
  ...
  <Installation directory N>
  EPICS
  ${GSI_OS_FLAVOR}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\(.\..\)\../\1/g')/$(uname -m)/${GSI_COMPILER_CC}
  EPICS-<Version A.BB.CC>[_<optional Suffix>][_dev]
  (w/  suffix: _dev: development versions, place for first installation of new/changed code, may not be working)
  (w/o suffix: _dev: production versions, only changed, if changes work in _dev)
  ...
  EPICS-<Version X.YY.ZZ>
  myepicslogin.sh
  (This setup file myepicslogin.sh is the only recommended place to change/tweak/modify settings for this local installation)
  <other setup files> (optional: called by myepicslogin.sh)
  epicslogin.sh
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  fcn_addtopath.bash
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  uniqpaths
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  base ((soft) link auf base-<Version X.YY.ZZ>
  base-<Version X.YY.ZZ>
  configure
  RELEASE : EPICS_BASE=$(EPICS_HOME)/base
  CONFIG_SITE : =CROSS_COMPILE_TARGET_ARCH ... ==
  startup
  Site.profile
  Site.profile.org.base.<DDYYMM>
  extensions
  (in case of problems, probably (soft) links to other ${GSI_COMPILER_CC} version directory)
  configure (q.v. "base")
  src
  Makefile (master Makefile, edited during installation)
  <Installation directory 1>
  ...
  <Installation directory N>
  modules
  (in case of problems, probably (soft) links to other ${GSI_COMPILER_CC} version directory)
  __bus__/...
  configure (q.v. "base")
  ...
  __soft__/...
  configure (q.v. "base")



2.2.2 Download EPICS base

Version %EPICSBASE_VERSION% (as of %EPICSBASE_VERSIONDATE%)
from: %EPICSBASE_DOWNLOADADRESS%

  1. %CREATE_EPICSMYHOME_EXPORTPART1%s
    • %EPICS_VERSION_NAME% (assuming %EPICSBASE_VERSION% to be set)
    • %EPICS_HOME_DIR_NAME% %CREATE_EPICSMYHOME_EXPORTPART2%
      $> export %EPICS_VERSION_NAME%=%EPICSBASE_VERSION%
      $> export %EPICS_HOME_DIR_NAME%=%EPICS_HOME_DIR_DUMMY%
  2. %CREATE_EPICSMYHOME_DIR%
    $> mkdir -p ${%EPICS_HOME_DIR_NAME%:?undefined}
  3. Depending whether (Bazaar - bzr) is available two alternatives open up:
    • Bazaar
      1. Download the latest version of %EPICSBASE_SRCNAME% (version as of %EPICSBASE_VERSIONDATE% is %EPICSBASE_VERSION%)

        from: %EPICSBASE_DOWNLOADADRESS% using Bazaar
        to the directory %EPICS_HOME_DIR_NAME%
        $> cd %EPICSBASE_INSTALLDIR% &&
        %WHICH_CMD% %BZR_CMD% >/dev/null 2>&1 && %BZR_CMD% checkout --lightweight -r tag:R${%EPICSBASE_VERSION_NAME:?undefined}% lp:%EPICSBASE_LAUNCHPAD% base-%EPICSBASE_VERSION% "
    • tar ball
      1. To make things easier, first export the environment variable %EPICS_DOWNLOAD_DIR% containing the path to the download directory:
        $> [ -z "%EPICS_DOWNLOAD_DIR%" ] && export %EPICS_DOWNLOAD_DIR_NAME%=%EPICS_DOWNLOAD_DIR_DUMMY%
        Then create download directory, if not yet existing:
        $> mkdir -p %EPICSBASE_DOWNLOADPATH%
      2. Download the latest version of %EPICSBASE_SRCNAME% (version as of %EPICSBASE_VERSIONDATE% is %EPICSBASE_VERSION%)
        from: %EPICSBASE_DIRECTDOWNLOADADRESS%
        to the directory %EPICSBASE_DOWNLOADPATH%
        $> cd %EPICSBASE_DOWNLOADPATH% &&
        wget -N %EPICSBASE_DIRECTDOWNLOADADRESS%/%EPICSBASE_TARFILENAME%
      3. Untar and unpack the file to %EPICSBASE_INSTALLDIR%
        $> cd %EPICSBASE_INSTALLDIR% && tar axvf %EPICSBASE_DOWNLOADPATH%/%EPICSBASE_TARFILENAME%
  4. To avoid further problems, set the correct group (if you are a member of it (GSI specific)): epicsadm and also set the correct rights:
    cd %EPICSBASE_INSTALLDIR% &&
    groups | grep -q -w epicsadm && chgrp -R epicsadm %EPICSBASE_INSTALLDIR% &&
    find %EPICSBASE_INSTALLDIR% -user $(id -n -u) -exec chmod ug+rw {} \;
  5. To make future settings easier:
    $> cd %EPICSBASE_INSTALLDIR% && ln -s base-* base

2.2.3 Download patches EPICS base

Starting from the page %EPICSBASE_DOCS%/KnownProblems.html for each version may list several patches to be applied.

2.2.4 Compact - Directories & Download of Base Sources

%COMMENT_CMD% Global installation settings

echo -n "%EPICS_ALL_EPICS_TOP_DIR_DUMMY%: && %READ_CMD% %EPICS_ALL_EPICS_TOP_DIR_NAME% && export %EPICS_ALL_EPICS_TOP_DIR_NAME%
echo -n "%EPICS_HOME_DIR_DUMMY%: && %READ_CMD% %EPICS_HOME_DIR_NAME% && export %EPICS_HOME_DIR_NAME%
echo -n "%EPICS_DOWNLOAD_DIR_DUMMY%: && %READ_CMD% %EPICS_DOWNLOAD_DIR_NAME% && export %EPICS_DOWNLOAD_DIR_NAME%
echo -n "%EPICS_VERSION_DUMMY%: && %READ_CMD% %EPICS_VERSION_NAME% && export %EPICS_VERSION_NAME%

download_epicsBase()
{
mkdir -p ${%EPICS_HOME_DIR_NAME%:?undefined} &&
cd %EPICSBASE_INSTALLDIR% &&
%WHICH_CMD% %BZR_CMD% >/dev/null 2>&1 && %BZR_CMD% checkout --lightweight -r tag:R${%EPICSBASE_VERSION_NAME:?undefined}% lp:%EPICSBASE_LAUNCHPAD% base-%EPICSBASE_VERSION% "

%IF_CMD%[ $? -ne 0 ];
then
mkdir -p %EPICSBASE_DOWNLOADPATH% &&
cd %EPICSBASE_DOWNLOADPATH% &&
wget -N %EPICSBASE_DIRECTDOWNLOADADRESS%/%EPICSBASE_TARFILENAME%
&&
cd %EPICSBASE_INSTALLDIR% && tar axvf %EPICSBASE_DOWNLOADPATH%/%EPICSBASE_TARFILENAME%
%FI_CMD% &&
cd %EPICSBASE_INSTALLDIR% &&
groups | grep -q -w epicsadm && chgrp -R epicsadm %EPICSBASE_INSTALLDIR% &&
find %EPICSBASE_INSTALLDIR% -user $(id -n -u) -exec chmod ug+rw {} \;
&&
cd %EPICSBASE_INSTALLDIR% && ln -s base-* base
}


download_epicsBase


2.3 Setting environment variables

There are at least two major possiblities:


2.3.1 epics set of scripts


2.3.1.1 epics

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.
$> . epics

For more details use the help option: -h
$> . epics -h


2.3.1.1.1 Usage: epics script

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'

   


2.3.1.1.2 epics invocation scheme

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
  default :
  "<epicsHome>/<epicsDirPrefix><version>/myepicslogin.sh"
  overwritten by environment variable:
  EPICS_LOCAL_LOGIN_SCRIPT
  overwritten by option :
  -L <Path><bash script>
   
  2.1. optional <other local pre scripts> within <loginScript>:
  source <other local pre scripts>
   
  2.2. epicslogin.sh :
  source <epicsHome>/<epicsDirPrefix><version>/epicslogin.sh
  epicslogin.sh :
  usually a (soft) link to %MY_ALL_EPICS_TOP_DIRECTORY_VAR%/bin
  or to %GSI_EPICS_INSTALLATIONS_TOP_DIRECTORY_VAR%/bin
   
  2.2.1 source <epicsHome>/<epicsDirPrefix><version>/epicslogin.sh
  in case it has been extended/changed to be wrapper this is a symbolic link to
  $EPICS_HOME/base-<version>/startup/Site.profile.wrapper calling itself:
   
  2.2.1.1 source $EPICS_HOME/base-<version>/startup/Site.profile.pre
  most of the local default definitions before calling the former, but modified Site.profile
   
  2.2.1.2 source $EPICS_HOME/base-<version>/startup/Site.profile.main
  former Site.profile modified to be able to be more verbose
   
  2.2.1.3 source $EPICS_HOME/base-<version>/startup/Site.profile.post
  post jobs after calling Site.profile.main
   
  2.3. optional: source <other local scripts, e.g. setting of PATHs, init of cross-compilers>
   
  3. optional: source <after script>
  (set by environment variable: EPICS_LOCAL_AFTER_SCRIPT, or overwritten by option -A <Path><bash script> )

  • Variables:
    • <epicsHome>
      • default: ~epics
        (to become /usr/local/pub/%GSI_EPICS_OS_DIR_TREE%)
      • override by environment variable: EPICS_LOCAL_HOME
      • overwritten by option: -H <Path>
    • <epicsDirPrefix>
      • default: "EPICS-"
      • override by environment variable: EPICS_LOCAL_DIR_PREFIX
      • overwritten by option: -P <Prefix>
    • <version>
      • default: 3.14.9
      • override by environment variable: EPICS_LOCAL_DEFAULT_VERSION
      • overwritten by argument: <Version>
    • <loginScript>
      • default: "./myepicslogin.sh"
      • override by environment variable: EPICS_LOCAL_LOGIN_SCRIPT
      • overwritten by option -L <Path><bash script>
    • <beforeScript>
      • default: [ not set ]
      • override by environment variable: EPICS_LOCAL_BEFORE_SCRIPT
      • overwritten by option -B <Path><bash script>
    • <afterScript>
      • default: [ not set ]
      • override by environment variable: EPICS_LOCAL_AFTER_SCRIPT
      • overwritten by option -A <Path><bash script>


2.3.1.1.2.1 To install the epics script...
  • Only needed on non GSI cluster systems.

  1. Set %EPICS_ALL_EPICS_TOP_DIR_NAME% to the top home directory of all epics installations (e.g. ~epics/EPICS)
    $> export %EPICS_ALL_EPICS_TOP_DIR_NAME%=%EPICS_ALL_EPICS_TOP_DIR_DUMMY%
  2. If not yet existing create a bin directory ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin
    [ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"} ] && mkdir -p ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin
  3. Change to the directory $%EPICS_ALL_EPICS_TOP_DIR_NAME%/bin and download (or check available links for) at least the epics script.
    mkdir -p ${%EPICS_DOWNLOAD_DIR_NAME%:?"undefined"}/bin &&
    cd %EPICS_DOWNLOAD_DIR%/bin &&
    wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics &&
    cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
    cp -i %EPICS_DOWNLOAD_DIR%/bin/epics ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
  4. make epics script available
    • As superuser root you could create a soft link from /usr/local/bin to your epics script.
      #> [ "$(id -u root)" - eq 0 ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/bin/epics /usr/local/bin
    • or add $%EPICS_ALL_EPICS_TOP_DIR_NAME%/bin to the PATH variable.
      [ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin ] && export PATH=%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin:${PATH}

2.3.1.1.2.2 Compact - Epics Script Installation
install_epicsScript()
{
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"} ] && mkdir -p ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin &&
mkdir -p ${%EPICS_DOWNLOAD_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/epics ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
&&
[ "$(id -u root)" - eq 0 ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/bin/epics /usr/local/bin
%IF_CMD%[ $? -ne 0 ];
%THEN_CMD%
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin ] && export PATH=%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin:${PATH}
%FI_CMD%
}

install_epicsScript


2.3.1.2 epicslogin.sh (fcn_addtopath.bash, uniqpaths, Site.profile set)

The recommended way is to use epicslogin.sh (bash script).
  • epicslogin.sh
    which itself sources the script from %EPICS_BASE_DIRECTORY_DUMMY%/startup/Site.profile
    • uses those helper scripts to be put in a <Fcn Helper Bin Directory>
      (e.g. to the directory ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:-~epics}/bin)


2.3.1.2.1 Usage: epicslogin.sh

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_DIR_DUMMY% -B %EPICS_BASE_DIRECTORY_DUMMY% -A %EPICS_HOME_DIR_DUMMY% %EPICS_VERSION_DUMMY%
gives
   sourcing %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/base-%EPICS_VERSION_DUMMY%/startup/Site.profile
   EPICS_HOME               set to %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%
   EPICS_BASE               set to %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/base-%EPICS_VERSION_DUMMY%
   EPICS_EXTENSIONS         set to %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/extensions
   EPICS_MODULES            set to %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/modules
   PSPRINTER                set to lp
   EPICS_DISPLAY_PATH       set to %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/extensions/medm/adl
   ORBITSCREENHOME          set to %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/extensions
   EPICS_AR_PORT            set to 7002
   added %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/extensions/javalib behind CLASSPATH
   EPICS_SNCSEQ_HOME        set to %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/modules/seq
   EPICS_HOST_ARCH          set to linux-x86
   added %EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/extensions/bin/linux-x86 in front of PATH
   added /u/epics/bin:%EPICS_HOME_DIR_DUMMY%/EPICS-%EPICS_VERSION_DUMMY%/base-%EPICS_VERSION_DUMMY%/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) ...
  • Only needed on non GSI cluster systems.

  1. Set %EPICS_ALL_EPICS_TOP_DIR_NAME% to the top home directory of all epics installations (e.g. ~epics/EPICS)
    $> export %EPICS_ALL_EPICS_TOP_DIR_NAME%=%EPICS_ALL_EPICS_TOP_DIR_DUMMY%
  2. If not yet existing create a bin directory ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin
    [ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"} ] && mkdir -p -p ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin || %DIE_CMD%
  3. Change to the directory $%EPICS_ALL_EPICS_TOP_DIR_NAME%/bin and download (or check available links for) at least the epics script.
    mkdir -p ${%EPICS_DOWNLOAD_DIR_NAME%:?"undefined"}/bin &&
    cd %EPICS_DOWNLOAD_DIR%/bin &&
    wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epicslogin.sh &&
    cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
    cp -i %EPICS_DOWNLOAD_DIR%/bin/epicslogin.sh ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
    cd %EPICS_DOWNLOAD_DIR%/bin &&
    wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/fcn_addtopath.bash &&
    cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
    cp -i %EPICS_DOWNLOAD_DIR%/bin/fcn_addtopath.bash ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
    cd %EPICS_DOWNLOAD_DIR%/bin &&
    wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/uniqpaths &&
    cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
    cp -i %EPICS_DOWNLOAD_DIR%/bin/uniqpaths ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&

2.3.1.2.2 Site.profile set of files
  • Only needed on non GSI cluster systems.
  • ... and optionally those set of file to <EPICS Base Directory>/startupproviding more verbosity.
    • Site.profile.wrapper, wrapper script calling (modified) Site.profile script now named Site.profile.main, before Site.profile.pre and after Site.profile.post
    • Site.profile.pre, most of additional settings done here
    • Site.profile.post, cleaning up, if neccessary
    • modify.Site.profile.pl.txt: file to modify/extend Site.profile for additional verbosity and path check
    • Strategy:
      1. backup orignal Site.profile
        • if already existing
          1. replace current by original
          2. backup original with new date to follow-up last changes
      2. download files, cosmetic renaming
      3. rename Site.profile to Site.profile.main
      4. apply perl script to Site.profile.main
      5. soft link Site.profile.wrapper to Site.profile

2.3.1.2.2.1 To install Site.profile


2.3.1.2.3 Mandatory soft links - (epicslogin.sh, fcn_addtopath.bash, uniqpaths)
Finally you need to set soft links for the scripts in your %EPICS_HOME_DIR_DUMMY%:
cd $%EPICS_HOME_DIR_NAME% &&
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/epicslogin.sh ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/epicslogin.sh . || echo "epicslogin.sh" not available 1>&2
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/fcn_addToPath.bash ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/fcn_addToPath.bash . || echo "fcn_addToPath.bash" not available 1>&2
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/uniqpaths ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/uniqpaths . || echo "uniqpaths" not available 1>&2


2.3.1.2.4 Compact - epicslogin.sh (fcn_addtopath.bash, uniqpaths, Site.profile set)

install_epicsloginSh()
{
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"} ] && mkdir -p -p ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin || %DIE_CMD% &&
mkdir -p ${%EPICS_DOWNLOAD_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epicslogin.sh &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/epicslogin.sh ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/fcn_addtopath.bash &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/fcn_addtopath.bash ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/uniqpaths &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/uniqpaths ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
}

install_SiteProfile()
{
cd $%EPICS_HOME_DIR_NAME%/base/startup &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/modify.Site.profile.sh &&
%CHMOD_CMD% u+x ./modify.Site.profile.sh && ./modify.Site.profile.sh
}

install_MandatorySoftLinks()
{
cd $%EPICS_HOME_DIR_NAME% &&
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/epicslogin.sh ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/epicslogin.sh . || echo "epicslogin.sh" not available 1>&2
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/fcn_addToPath.bash ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/fcn_addToPath.bash . || echo "fcn_addToPath.bash" not available 1>&2
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/uniqpaths ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/uniqpaths . || echo "uniqpaths" not available 1>&2
}


install_epicsloginSh && install_SiteProfile && install_MandatorySoftLinks


2.3.1.3 myepicslogin.sh

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
   

2.3.1.3.1 To install myepicslogin.sh
Direct Download:
$> cd %EPICSBASE_MYHOMEDIR% && wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/myepicslogin.sh
Replace command line by your own
cd %EPICSBASE_MYHOMEDIR% &&
perl -pi -e 's/^.*epicslogin\.sh -v.*$//g' myepicslogin.sh &&
cd %EPICSBASE_MYHOMEDIR% &&
echo -n -e "myepics_home=$%EPICS_HOME_DIR_NAME% \n" >> myepicslogin.sh&&
echo -n -e " . \$myepics_home/epicslogin.sh -v -H \$myepics_home -B \$myepics_home/base -A \$myepics_home/fcn_addtopath.bash $(basename $%EPICS_HOME_DIR_NAME%) \$* \n\n" >> myepicslogin.sh &&
echo -n -e "unset myepics_home \n" >> myepicslogin.sh&&
cd %EPICSBASE_MYHOMEDIR% && . ./myepicslogin.sh



2.3.2 by hand

At least EPICS_HOST_ARCH has to be defined, which can be done via:
$> echo -n "Enter <Your Host's Architecture>: " && %READ_CMD% EPICS_HOST_ARCH && export EPICS_HOST_ARCH
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.

2.3.3 Compact - environment

install_epicsScript()
{
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"} ] && mkdir -p ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin &&
mkdir -p ${%EPICS_DOWNLOAD_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/epics ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
&&
[ "$(id -u root)" - eq 0 ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/bin/epics /usr/local/bin
%IF_CMD%[ $? -ne 0 ];
%THEN_CMD%
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin ] && export PATH=%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin:${PATH}
%FI_CMD%
}


install_epicsloginSh()
{
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"} ] && mkdir -p -p ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin || %DIE_CMD% &&
mkdir -p ${%EPICS_DOWNLOAD_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epicslogin.sh &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/epicslogin.sh ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/fcn_addtopath.bash &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/fcn_addtopath.bash ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/uniqpaths &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/uniqpaths ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
}

install_SiteProfile()
{
cd $%EPICS_HOME_DIR_NAME%/base/startup &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/modify.Site.profile.sh &&
%CHMOD_CMD% u+x ./modify.Site.profile.sh && ./modify.Site.profile.sh
}

install_MandatorySoftLinks()
{
cd $%EPICS_HOME_DIR_NAME% &&
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/epicslogin.sh ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/epicslogin.sh . || echo "epicslogin.sh" not available 1>&2
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/fcn_addToPath.bash ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/fcn_addToPath.bash . || echo "fcn_addToPath.bash" not available 1>&2
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/uniqpaths ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/uniqpaths . || echo "uniqpaths" not available 1>&2
}

install_myepicslogins.sh()
{
cd %EPICSBASE_MYHOMEDIR% && wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/myepicslogin.sh &&
cd %EPICSBASE_MYHOMEDIR% &&
perl -pi -e 's/^.*epicslogin\.sh -v.*$//g' myepicslogin.sh &&
cd %EPICSBASE_MYHOMEDIR% &&
echo -n -e "myepics_home=$%EPICS_HOME_DIR_NAME% \n" >> myepicslogin.sh&&
echo -n -e " . \$myepics_home/epicslogin.sh -v -H \$myepics_home -B \$myepics_home/base -A \$myepics_home/fcn_addtopath.bash $(basename $%EPICS_HOME_DIR_NAME%) \$* \n\n" >> myepicslogin.sh &&
echo -n -e "unset myepics_home \n" >> myepicslogin.sh&&
cd %EPICSBASE_MYHOMEDIR% && . ./myepicslogin.sh
}

install_epicsScript && install_epicsloginSh && install_SiteProfile && install_MandatorySoftLinks && install_myepicslogins.sh

2.3.4 additional variables PVT (see Site.profile)


The following private variables ("PVTs") can be set and are if existent included in the search paths by the script Site.profile:
  • # Allow private versions of extensions with or without a bin subdirectory
    • EPICS_EXTENSIONS_PVT
      • optionally requires existing: ${EPICS_EXTENSIONS_PVT}/bin/${EPICS_HOST_ARCH}
  • # Allow private versions of base
    • EPICS_BASE_PVT
      • requieres existing: ${EPICS_BASE_PVT}/bin/${EPICS_HOST_ARCH} Via those variables private/local versions can be supported


2.4 Compiler settings

If you are using different compilers, CC and CCC have to be modified in the corresponding ${EPICS_BASE}/configure/os directories.
This is triggered by setting %EPICS_GCC_VERSION_GSI_NAME%.
  1. Set %EPICS_VERSION_NAME% (assuming %EPICSBASE_VERSION% to be set)
    export %EPICS_VERSION_NAME%=%EPICSBASE_VERSION%
  2. %CREATE_EPICSMYHOME_EXPORTPART1% %EPICS_HOME_DIR_NAME% %CREATE_EPICSMYHOME_EXPORTPART2%
    $> echo -n "Enter %EPICS_HOME_DIR_DUMMY%: " && %READ_CMD% %EPICS_HOME_DIR_NAME% && export %EPICS_HOME_DIR_NAME%
    (e.g. ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?undefined}/<GSI EPICS OS DIR TREE>/EPICS-<Version> (e.g. EPICS-%EPICSBASE_VERSION%))
  3. $> cd %EPICS_HOME_DIR_NAME% && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
  4. Set GSI-Site specific gcc settings:
    $> [ ! -z ${%EPICS_GCC_VERSION_GSI_NAME%} ] &&
    echo 'CC=$(GNU_BIN)/gcc-'${%EPICS_GCC_VERSION_GSI_NAME%} >> ${EPICS_BASE}/configure/os/CONFIG_SITE.${EPICS_HOST_ARCH}.${EPICS_HOST_ARCH}
    $> [ ! -z ${%EPICS_GCC_VERSION_GSI_NAME%} ] &&
    echo 'CCC=$(GNU_BIN)/g++-'${%EPICS_GCC_VERSION_GSI_NAME%} >> ${EPICS_BASE}/configure/os/CONFIG_SITE.${EPICS_HOST_ARCH}.${EPICS_HOST_ARCH}



3 Additional Configuration settings


4 Compile

Setting up the environment
$> cd %EPICSBASE_MYHOMEDIR% && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
Following the instruction the README file, but using GSI make (which is GNU make) type: (+ multicore parallel build)
$> cd $EPICS_BASE && make distclean && make - j 8
Finally to add new paths to PATH etc.
$> cd %EPICSBASE_MYHOMEDIR% && . epics -H $(dirname $PWD) -P "" $(basename $PWD)

4.1 Obstacles


4.2 Compact - Compile

make_epics()
{
cd %EPICSBASE_MYHOMEDIR% && . epics -H $(dirname $PWD) -P "" $(basename $PWD) &&
cd $EPICS_BASE && make distclean && make - j 8 &&
cd %EPICSBASE_MYHOMEDIR% && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
}

make_epics



5 All Compact

download_epicsBase()
{
mkdir -p ${%EPICS_HOME_DIR_NAME%:?undefined} &&
cd %EPICSBASE_INSTALLDIR% &&
%WHICH_CMD% %BZR_CMD% >/dev/null 2>&1 && %BZR_CMD% checkout --lightweight -r tag:R${%EPICSBASE_VERSION_NAME:?undefined}% lp:%EPICSBASE_LAUNCHPAD% base-%EPICSBASE_VERSION% "

%IF_CMD%[ $? -ne 0 ];
then
mkdir -p %EPICSBASE_DOWNLOADPATH% &&
cd %EPICSBASE_DOWNLOADPATH% &&
wget -N %EPICSBASE_DIRECTDOWNLOADADRESS%/%EPICSBASE_TARFILENAME%
&&
cd %EPICSBASE_INSTALLDIR% && tar axvf %EPICSBASE_DOWNLOADPATH%/%EPICSBASE_TARFILENAME%
%FI_CMD% &&
cd %EPICSBASE_INSTALLDIR% &&
groups | grep -q -w epicsadm && chgrp -R epicsadm %EPICSBASE_INSTALLDIR% &&
find %EPICSBASE_INSTALLDIR% -user $(id -n -u) -exec chmod ug+rw {} \;
&&
cd %EPICSBASE_INSTALLDIR% && ln -s base-* base
}


install_epicsScript()
{
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"} ] && mkdir -p ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin &&
mkdir -p ${%EPICS_DOWNLOAD_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/epics ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
&&
[ "$(id -u root)" - eq 0 ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/bin/epics /usr/local/bin
%IF_CMD%[ $? -ne 0 ];
%THEN_CMD%
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin ] && export PATH=%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin:${PATH}
%FI_CMD%
}


install_epicsloginSh()
{
[ -d ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"} ] && mkdir -p -p ${%EPICS_ALL_EPICS_TOP_DIR_NAME%}/bin || %DIE_CMD% &&
mkdir -p ${%EPICS_DOWNLOAD_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epicslogin.sh &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/epicslogin.sh ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/fcn_addtopath.bash &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/fcn_addtopath.bash ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cd %EPICS_DOWNLOAD_DIR%/bin &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/uniqpaths &&
cd ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
cp -i %EPICS_DOWNLOAD_DIR%/bin/uniqpaths ${%EPICS_ALL_EPICS_TOP_DIR_NAME%:?"undefined"}/bin &&
}

install_SiteProfile()
{
cd $%EPICS_HOME_DIR_NAME%/base/startup &&
wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/modify.Site.profile.sh &&
%CHMOD_CMD% u+x ./modify.Site.profile.sh && ./modify.Site.profile.sh
}

install_MandatorySoftLinks()
{
cd $%EPICS_HOME_DIR_NAME% &&
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/epicslogin.sh ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/epicslogin.sh . || echo "epicslogin.sh" not available 1>&2
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/fcn_addToPath.bash ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/fcn_addToPath.bash . || echo "fcn_addToPath.bash" not available 1>&2
[ - f ${%EPICS_ALL_EPICS_TOP_DIR_NAME%?:"undefined"}/uniqpaths ] && ln -s $%EPICS_ALL_EPICS_TOP_DIR_NAME%/uniqpaths . || echo "uniqpaths" not available 1>&2
}

install_myepicslogins.sh()
{
cd %EPICSBASE_MYHOMEDIR% && wget -N --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/myepicslogin.sh &&
cd %EPICSBASE_MYHOMEDIR% &&
perl -pi -e 's/^.*epicslogin\.sh -v.*$//g' myepicslogin.sh &&
cd %EPICSBASE_MYHOMEDIR% &&
echo -n -e "myepics_home=$%EPICS_HOME_DIR_NAME% \n" >> myepicslogin.sh&&
echo -n -e " . \$myepics_home/epicslogin.sh -v -H \$myepics_home -B \$myepics_home/base -A \$myepics_home/fcn_addtopath.bash $(basename $%EPICS_HOME_DIR_NAME%) \$* \n\n" >> myepicslogin.sh &&
echo -n -e "unset myepics_home \n" >> myepicslogin.sh&&
cd %EPICSBASE_MYHOMEDIR% && . ./myepicslogin.sh
}


make_epics()
{
cd %EPICSBASE_MYHOMEDIR% && . epics -H $(dirname $PWD) -P "" $(basename $PWD) &&
cd $EPICS_BASE && make distclean && make - j 8 &&
cd %EPICSBASE_MYHOMEDIR% && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
}


download_epicsBase && install_epicsScript && install_epicsloginSh && install_SiteProfile && install_MandatorySoftLinks && install_myepicslogins.sh && make_epics


r109 - 23 Apr 2014 - 10:02:48 - PeterZumbruch


Testing of base installation with makeBaseApp.pl

Example Application

Following the example given in chapter 2 section 2.2 of the EPICS IOC Application Developer's Guide:
  1. Creation of a new IOC Application named <My Example Application>:
    $> mkdir <top>
    $> cd <top>
    $> $EPICS_BASE/bin/${EPICS_HOST_ARCH}/makeBaseApp.pl -t example <My Example Application>
    $> $EPICS_BASE/bin/${EPICS_HOST_ARCH}/makeBaseApp.pl -i -t example <My Example Application>
    $> make
    $> cd iocBoot/ioc<My Example Application>
  2. Starting the IOC:
    (<Target> (e.g.: linux-x86, or ${EPICS_HOST_ARCH}), <My Example Application>, <Top>, <Epics Base Directory> and <User> have been replaced in the output )
    $> ../../bin/<Target>/<My Example Application> st.cmd
        #!../../bin/<target>/<My Example Application>
        ## You may have to change <My Example Application> to something else
        ## everywhere it appears in this file
        < envPaths
        epicsEnvSet(ARCH,"<Target>")
        epicsEnvSet(IOC,"ioc<My Example Application>")
        epicsEnvSet(TOP,"<top>")
        epicsEnvSet(EPICS_BASE,"<Epics Base Directory>")
        cd <top>
        ## Register all support components
        dbLoadDatabase("dbd/<My Example Application>.dbd")
        <My Example Application>_registerRecordDeviceDriver(pdbbase)
        ## Load record instances
        dbLoadTemplate "db/userHost.substitutions"
        dbLoadRecords("db/dbSubExample.db","user=<user>Host")
        ## Set this to see messages from mySub
        #var mySubDebug 1
        cd <top>/iocBoot/ioc<My Example Application>
        iocInit()
        Starting iocInit
        ############################################################################
        ## EPICS R3.14.9 $R3-14-9$ $2007/02/05 16:31:45$
        ## EPICS Base built Aug  6 2007
        ############################################################################
        iocInit: All initialization complete
        ## Start any sequence programs
        #seq sncExample,"user=<user>Host"
        epics>
        
  3. Listing the available PVs:
    epics> dbl
       <user>Host:aiExample
       <user>Host:aiExample1
       ...
       <user>Host:xxxExample
       
  4. Any EPICS client should be able to see those PVs, e.g.:
    $> camonitor <User>Host:aiExample1
       <user>Host:aiExample1        2007-08-09 10:42:00.037941 4 LOW MINOR
       <user>Host:aiExample1        2007-08-09 10:42:01.039624 5
       <user>Host:aiExample1        2007-08-09 10:42:02.041629 6 HIGH MINOR
       

r0 - 01 Jan 1970 - 00:00:00 - WikiGuest

Extensions

Installation Status

  versions (starting from 3.14.12.3)
EPICS-3.14.12.3
debian5.0 debian6.0
x86 x86_64
lenny32 lenny64 squeeze64
gcc432-11 gcc432-11 gcc445-8
Extensions Top (04 Sep 2012) + + +
MSI - Macro Substitution and Include Tool 1.6 (11 Mar 2013) + + +
ALH - Alarm Handler 1.2.33 (26 Aug 2013) + + +
EZCA - E-Z (Easy) Channel Access 20111019 (11 Mar 2013) + + +
EDM Extensible Display Manager 1-12-85 (13 Mar 2013) + + +
MEDM - Motif Editor and Display Manager 3.1.7 (13 Mar 2013) + + -
VDCT - Visual Database Construction Tool (14 Mar 2013) / / /
Channel Archiver 2.9.2 (12 September 2008) + + +
Probe 1_1_7_1 (14 Mar 2013) + + +
SDDS Toolkit - Self-Describing Data Sets analysis package 3.1 (23 Sep 2013) - - -
SDDSepics 3.1 (26 Aug 2013) - - -
Burt - Backup and Restore Tool 20130124 (24 Sep 2013) - - -
CASR - Channel Access Save Restore 20091027 (13 Mar 2013) - - -
Strip Tool - Strip-chart plotting tool 2.5.15.0 (23 Sep 2013) - - -

Prerequisites for Extensions

Extensions directory structure

Before installing any kind of extension/application
  • you have to install extensionsTop_YYYYMMDD.tar.gz for version 3.14 and higher

Extensions Top -- (04 Sep 2012)
The extensionsTop_YYYYMMDD.tar.gz gnuzipped tar file contains the extensions/configure directory, top level Makefile, the src directory and src/Makefile.

The src/Makefile knows all the standard EPICS extensions directory names and can build any that are present in the correct order for dependency resolution. To use an extension with a specific version number in its directory name, edit the assignment statement so the right hand side of the assignment exactly matches the name of the subdirectory containing that extension. For example:

  • ALH = alh1_2_31

Edit the DIRS definition in the Makefile to change the order of building (the wildcard at the bottom removes any directories that don't exist from the list).

  1. Set EPICS variables, if not yet done:
    (e.g. assuming the to be ~epics/EPICS-3.14.12.4, and running version 3.14.12.4)
    $> cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
  2. To make things easier, first export the environment variable EPICS_DOWNLOAD_DIR containing the path to the download directory:
    $> [ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=~/EPICS/Download
    Then create download directory, if not yet existing:
    $> mkdir -p $EPICS_DOWNLOAD_DIR/extensions
  3. Download the latest version of extensionsTop_YYYYMMDD.tar.gz for EPICS version 3.14 and higher from http://www.aps.anl.gov/epics/extensions/configure/index.php (extensionsTop_20120904.tar.gz)
    (versions as of July 3rd, 2007)
    to the directory $EPICS_DOWNLOAD_DIR/extensions
  4. To avoid further problems, set the correct group (if you are a member of it (GSI specific)): epicsadm
    $> groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_DOWNLOAD_DIR/extensions
  5. and also set the correct rights:
    $> find $EPICS_DOWNLOAD_DIR/extensions -user $(id -n -u) -exec chmod ug+rw {} \;
  6. Untar and unpack the file to $EPICS_HOME
    (assuming that $EPICS_EXTENSIONS is a sub directory of $EPICS_HOME)
    $> cd $EPICS_HOME && tar axvf $EPICS_DOWNLOAD_DIR/extensions/extensionsTop_20120904.tar.gz
  7. $> cd $EPICS_EXTENSIONS
  8. now edit the file(s) configure/RELEASE and set the paths to a valid $EPICS_BASE on your site:
    • either absolutely to EPICS_BASE=
    • or relatively to EPICS_BASE=$(TOP)/../base-3.14.12.4
    perl -pi -e "s|(^(EPICS_BASE=).*$)|#\1\n\2${EPICS_HOME}/base\n|g" configure/RELEASE
  9. Initial make
    $> cd $EPICS_EXTENSIONS && make realclean uninstall && make && make install

  • Compact Download address: http://www.aps.anl.gov/epics/extensions/configure/index.php
    cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)

    [ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=~/EPICS/Download
    mkdir -p $EPICS_DOWNLOAD_DIR/extensions
    cd $EPICS_DOWNLOAD_DIR/extensions &&
    wget -N http://www.aps.anl.gov/epics/download/extensions/extensionsTop_20120904.tar.gz
    groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_DOWNLOAD_DIR/extensions
    find $EPICS_DOWNLOAD_DIR/extensions -user $(id -n -u) -exec chmod ug+rw {} \;
    cd $EPICS_HOME &&
    tar axvf $EPICS_DOWNLOAD_DIR/extensions/extensionsTop_20120904.tar.gz
    cd $EPICS_EXTENSIONS
    perl -pi -e "s|(^(EPICS_BASE=).*$)|#\1\n\2${EPICS_HOME}/base\n|g" configure/RELEASE
    cd $EPICS_EXTENSIONS &&
    make realclean uninstall && make && make install
-- PeterZumbruch - 04 Sep 2012


optional Alternatives to gcc @ GSI

You might want to set the environment variable EPICS_GCC_VERSION_GSI one of the available versions:
$> export EPICS_GCC_VERSION_GSI=3.4
$> [ ! -z ${EPICS_GCC_VERSION_GSI} ] && echo 'CC = $(GNU_BIN)/gcc-'${EPICS_GCC_VERSION_GSI} >> ${EPICS_EXTENSIONS}/configure/os/CONFIG_SITE.$(${EPICS_BASE}/startup/EpicsHostArch.pl).linux-x86
$> [ ! -z ${EPICS_GCC_VERSION_GSI} ] && echo 'CCC = $(GNU_BIN)/g++-'${EPICS_GCC_VERSION_GSI} >> ${EPICS_EXTENSIONS}/configure/os/CONFIG_SITE.$(${EPICS_BASE}/startup/EpicsHostArch.pl).linux-x86

Compact
export EPICS_GCC_VERSION_GSI=3.4
[ ! -z ${EPICS_GCC_VERSION_GSI} ] && echo 'CC = $(GNU_BIN)/gcc-'${EPICS_GCC_VERSION_GSI} >> ${EPICS_EXTENSIONS}/configure/os/CONFIG_SITE.$(${EPICS_BASE}/startup/EpicsHostArch.pl).linux-x86

[ ! -z ${EPICS_GCC_VERSION_GSI} ] && echo 'CCC = $(GNU_BIN)/g++-'${EPICS_GCC_VERSION_GSI} >> ${EPICS_EXTENSIONS}/configure/os/CONFIG_SITE.$(${EPICS_BASE}/startup/EpicsHostArch.pl).linux-x86
-- PeterZumbruch - 05 Nov 2013


optional XMOTIF - X-Motif Settings (05 Nov 2013)

XMotif based applications, like MEDM, ..., the following changes, or something similar MIGHT have to be applied:

Set EPICS variables, if not yet done:
(e.g. assuming the to be ~epics/EPICS-3.14.12.4, and running version 3.14.12.4)
$> cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)

now edit the file(s)$EPICS_EXTENSIONS/configure/os/CONFIG_SITE.${EPICS_HOST_ARCH}.${T_A}
|
X11_LIB=/usr/lib 
X11_INC=/usr/include/X11
MOTIF_LIB=/usr/lib
MOTIF_INC=/usr/include | into | %CODE{"makefile"}%  
#X11_LIB=/usr/lib
#X11_INC=/usr/include/X11
#MOTIF_LIB=/usr/lib
#MOTIF_INC=/usr/include |
<br />

T

A


if [ ! -z $EDITOR ];
then
    $EDITOR$EPICS_EXTENSIONS/configure/os/CONFIG_SITE.${EPICS_HOST_ARCH}.${T_A}
else
    echo '$EDITOR' undefined ... exiting;
fi

-- PeterZumbruch - 05 Nov 2013


MSI - Macro Substitution and Include Tool -- Version: 1.6 (11 Mar 2013)

Installation

  1. Set EPICS variables, if not yet done:
    (e.g. assuming the to be ~epics/EPICS-3.14.12.4, and running version 3.14.12.4)
    $> cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
  2. To make things easier, first export the environment variable EPICS_DOWNLOAD_DIR containing the path to the download directory:
    $> [ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=~/EPICS/Download
    Then create download directory, if not yet existing:
    $> mkdir -p $EPICS_DOWNLOAD_DIR/extensions/msi
  3. Download the latest version of MSI - Macro Substitution and Include Tool (version as of 24 Jan 2013 is 1.6)
    from: http://www.aps.anl.gov/epics/extensions/msi/index.php
    to the directory $EPICS_DOWNLOAD_DIR/extensions/msi
    $> cd $EPICS_DOWNLOAD_DIR/extensions/msi &&
    wget -N http://www.aps.anl.gov/epics/download/extensions/msi1-6.tar.gz
  4. To avoid further problems, set the correct group (if you are a member of it (GSI specific)): epicsadm
    $> groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_DOWNLOAD_DIR/extensions/msi
  5. and also set the correct rights:
    $> find $EPICS_DOWNLOAD_DIR/extensions/msi -user $(id -n -u) -exec chmod ug+rw {} \;
  6. Having followed the instructions for the Prerequisites for Extensions you should have in your (= $EPICS_EXTENSIONS) a subdirectory src.
  7. Untar and unpack the file to $EPICS_EXTENSIONS/src
    $> cd $EPICS_EXTENSIONS/src && tar axvf $EPICS_DOWNLOAD_DIR/extensions/msi/msi1-6.tar.gz
  8. Adopt make settings in $EPICS_EXTENSIONS/src/Makefile :
      Edit the assignment statement so the right hand side of the assignment exactly matches the name of the subdirectory containing that extension.
        Change EXTENSION_MSI = msi to EXTENSION_MSI = msi1-6
    perl -pi -e "s&^EXTENSION_MSI = msi.*$&EXTENSION_MSI = msi1-6&" $EPICS_EXTENSIONS/src/Makefile
  9. Run make in the top-level directory:
    $> cd $EPICS_EXTENSIONS/src && make

Compact

Download address: http://www.aps.anl.gov/epics/extensions/msi/index.php
[ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=~/EPICS/Download

cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)

mkdir -p $EPICS_DOWNLOAD_DIR/extensions/msi
cd $EPICS_DOWNLOAD_DIR/extensions/msi &&
wget -N http://www.aps.anl.gov/epics/download/extensions/msi1-6.tar.gz
groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_DOWNLOAD_DIR/extensions/msi
find $EPICS_DOWNLOAD_DIR/extensions/msi -user $(id -n -u) -exec chmod ug+rw {} \;
cd $EPICS_EXTENSIONS/src && tar axvf $EPICS_DOWNLOAD_DIR/extensions/msi/msi1-6.tar.gz
perl -pi -e "s&^EXTENSION_MSI = msi.*$&EXTENSION_MSI = msi1-6&" $EPICS_EXTENSIONS/src/Makefile
cd $EPICS_EXTENSIONS/src && make

Documentation

TIP MSI: Macro Substitution and Include Tool .

-- PeterZumbruch - 11 Mar 2013


ALH - Alarm Handler -- Version: 1.2.33 (26 Aug 2013)

Installation

  1. Set EPICS variables, if not yet done:
    (e.g. assuming the to be ~epics/EPICS-3.14.12.4, and running version 3.14.12.4)
    $> cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
  2. To make things easier, first export the environment variable EPICS_DOWNLOAD_DIR containing the path to the download directory:
    $> [ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=~/EPICS/Download
    Then create download directory, if not yet existing:
    $> mkdir -p $EPICS_DOWNLOAD_DIR/extensions/alh
  3. Download the latest version of alh (version as of 21 May 2013 is 1.2.33)
    from: http://www.aps.anl.gov/epics/extensions/alh/index.php
    to the directory $EPICS_DOWNLOAD_DIR/extensions/alh
    $> cd $EPICS_DOWNLOAD_DIR/extensions/alh &&
    wget -N http://www.aps.anl.gov/epics/download/extensions/alh1_2_33.tar.gz
  4. To avoid further problems, set the correct group (if you are a member of it (GSI specific)): epicsadm
    $> groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_DOWNLOAD_DIR/extensions/alh
  5. and also set the correct rights:
    $> find $EPICS_DOWNLOAD_DIR/extensions/alh -user $(id -n -u) -exec chmod ug+rw {} \;
  6. Having followed the instructions for the Prerequisites for Extensions you should have in your (= $EPICS_EXTENSIONS) a subdirectory src.
  7. Untar and unpack the file to $EPICS_EXTENSIONS/src
    $> cd $EPICS_EXTENSIONS/src && tar axvf $EPICS_DOWNLOAD_DIR/extensions/alh/alh1_2_33.tar.gz
  8. Adopt make settings in $EPICS_EXTENSIONS/src/Makefile :
      Edit the assignment statement so the right hand side of the assignment exactly matches the name of the subdirectory containing that extension.
        Change ALH = alh to ALH = alh1_2_33
    perl -pi -e "s&^ALH = alh.*$&ALH = alh1_2_33&" $EPICS_EXTENSIONS/src/Makefile
  9. Run make in the top-level directory:
    $> cd $EPICS_EXTENSIONS/src && make

Compact
Download address: http://www.aps.anl.gov/epics/extensions/alh/index.php
[ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=~/EPICS/Download

cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)

mkdir -p $EPICS_DOWNLOAD_DIR/extensions/alh
cd $EPICS_DOWNLOAD_DIR/extensions/alh &&
wget -N http://www.aps.anl.gov/epics/download/extensions/alh1_2_33.tar.gz
groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_DOWNLOAD_DIR/extensions/alh
find $EPICS_DOWNLOAD_DIR/extensions/alh -user $(id -n -u) -exec chmod ug+rw {} \;
cd $EPICS_EXTENSIONS/src && tar axvf $EPICS_DOWNLOAD_DIR/extensions/alh/alh1_2_33.tar.gz
perl -pi -e "s&^ALH = alh.*$&ALH = alh1_2_33&" $EPICS_EXTENSIONS/src/Makefile
cd $EPICS_EXTENSIONS/src && make

Documentation

TIP ALH Users Guide - alh1.2.15 through alh1.2.31 .

-- PeterZumbruch - 26 Aug 2013


CaSnooper - Channel Access Broadcast Monitoring Tool -- Version: 2.1.2.3 (26 Aug 2013)

Installation

  1. Set EPICS variables, if not yet done:
    (e.g. assuming the to be ~epics/EPICS-3.14.12.4, and running version 3.14.12.4)
    $> cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
  2. To make things easier, first export the environment variable EPICS_DOWNLOAD_DIR containing the path to the download directory:
    $> [ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=~/EPICS/Download
    Then create download directory, if not yet existing:
    $> mkdir -p $EPICS_DOWNLOAD_DIR/extensions/caSnooper
  3. Download the latest version of caSnooper (version as of 03 Jul 2013 is 2.1.2.3)
    from: http://www.aps.anl.gov/epics/extensions/caSnooper/index.php
    to the directory $EPICS_DOWNLOAD_DIR/extensions/caSnooper
    $> cd $EPICS_DOWNLOAD_DIR/extensions/caSnooper &&
    wget -N http://www.aps.anl.gov/epics/download/extensions/caSnooper2_1_2_3.tar.gz
  4. To avoid further problems, set the correct group (if you are a member of it (GSI specific)): epicsadm
    $> groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_DOWNLOAD_DIR/extensions/caSnooper
  5. and also set the correct rights:
    $> find $EPICS_DOWNLOAD_DIR/extensions/caSnooper -user $(id -n -u) -exec chmod ug+rw {} \;
  6. Having followed the instructions for the Prerequisites for Extensions you should have in your (= $EPICS_EXTENSIONS) a subdirectory src.
  7. Untar and unpack the file to $EPICS_EXTENSIONS/src
    $> cd $EPICS_EXTENSIONS/src && tar axvf $EPICS_DOWNLOAD_DIR/extensions/caSnooper/caSnooper2_1_2_3.tar.gz
  8. Adopt make settings in $EPICS_EXTENSIONS/src/Makefile :
      Edit the assignment statement so the right hand side of the assignment exactly matches the name of the subdirectory containing that extension.
        Change CASNOOPER = caSnooper to CASNOOPER = caSnooper2_1_2_3
    perl -pi -e "s&^CASNOOPER = caSnooper.*$&CASNOOPER = caSnooper2_1_2_3&" $EPICS_EXTENSIONS/src/Makefile
  9. Run make in the top-level directory:
    $> cd $EPICS_EXTENSIONS/src && make

Compact

Download address: http://www.aps.anl.gov/epics/extensions/caSnooper/index.php
[ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=~/EPICS/Download

cd $EPICS_MYHOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)

mkdir -p $EPICS_DOWNLOAD_DIR/extensions/caSnooper
cd $EPICS_DOWNLOAD_DIR/extensions/caSnooper &&
wget -N http://www.aps.anl.gov/epics/download/extensions/caSnooper2_1_2_3.tar.gz
groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_DOWNLOAD_DIR/extensions/caSnooper
find $EPICS_DOWNLOAD_DIR/extensions/caSnooper -user $(id -n -u) -exec chmod ug+rw {} \;
cd $EPICS_EXTENSIONS/src && tar axvf $EPICS_DOWNLOAD_DIR/extensions/caSnooper/caSnooper2_1_2_3.tar.gz
perl -pi -e "s&^CASNOOPER = caSnooper.*$&CASNOOPER = caSnooper2_1_2_3&" $EPICS_EXTENSIONS/src/Makefile
cd