4.1. Base
We begin be setting up the environment to build the Base package.
export EPICS_BASE="${HOME}/myepics/base" export EPICS_HOST_ARCH=`${EPICS_BASE}/startup/EpicsHostArch` export PATH="${PATH}:${EPICS_BASE}/bin/${EPICS_HOST_ARCH}" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${EPICS_BASE}/lib/${EPICS_HOST_ARCH}"
Before starting the compile it is worth mentioning that there are several files which contain user options which effect the build process.CONFIG_SITE andRELEASE in $EPICS_BASE/configure. In particularCONFIG_SITE is where the cross-build targets would be specified.
Now simply switch to the base directory and issue the make command.
cd $EPICS_BASE make
More infomation on compiling EPICS Base can be found in base/documentation/README.htmlor online athttp://www.aps.anl.gov/epics/base/R3-14/12-docs/README.html.
4.2. ALH
ALH requires the presence of a Motif installation (OpenMotif or LessTif). Linux users check to see if your distribution provides one or more of these. Also install the development headers (-dev or -devel as appropriate). Others should consult available documentationhttp://www.motifzone.net/. Also see the ALH user guide [ALHman].
Now build the Alarm Handler.
export EPICS_EXTENSIONS="${HOME}/myepics/extensions" cd ${EPICS_EXTENSIONS}/src/alh1_2_26 make
Include the resulting executable in the system path.
export PATH="${PATH}:${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH}" alh
ALH will not actually do anything useful without a configuration file. This will be described later.
4.3. EDM
Building the EDM display manager can be complicated. It has many dependencies in addition to Motif including libgif, libpng, and many X11 libraries (X11, Xm, Xau, etc.). These are assumed to be present and the build system does not check that they are. If a compile or link fails look for messages indicating missing headers or libraries and install the appropriate package. More infomation of building EDM can be found in the EDM User Manual[EDMman].
cd ${EPICS_EXTENSIONS}/src/edm make
The GIF plugin needs to link against the ungif library which may not be available. In this case the solution is not to build the gif plugin. A plugin for png images is available.
sed -i -e 's|giflib||g' Makefile make
4.3.1. Generate Plugin Config Files
EDM depends on several configuration files. The two files which list the locations of various plugins must be generated.
The following is a simpleminded way to do this which takes advantage of the fact that EDM can recognize if a library is a valid plugin and which type it is. It will only add valid plugins to the list files.
cd ${EPICS_EXTENSIONS}/lib/${EPICS_HOST_ARCH} export EDMOBJECTS=$PWD export EDMPVOBJECTS=$PWD export EDM=${EPICS_EXTENSIONS}/bin/${EPICS_HOST_ARCH}/edm for pv in Epics Calc Log Loc;do $EDM -addpv $PWD/lib$pv.so;done for ff in lib*.so;do ${EDM} -add $PWD/$ff; done sed -i -e "s|$PWD|"'$(EDMLIBS)|' edmObjects edmPvObjects rm edmObjects~ edmPvObjects~ unset EDMOBJECTS EDMPVOBJECTS EDM install -d ${EPICS_EXTENSIONS}/etc mv edmObjects edmPvObjects ${EPICS_EXTENSIONS}/etc/
The additional step of replacing the absolute paths with $(EDMLIBS) is taken to allow the built tree to be relocated without requiring modifications to these files.
4.3.2. Additional Environment
Several more environment variables are required to run EDM.
export EDMOBJECTS=$EPICS_EXTENSIONS/etc export EDMPVOBJECTS=$EPICS_EXTENSIONS/etc export EDMFILES=$EPICS_EXTENSIONS/src/edm/edmMain export EDMHELPFILES=$EPICS_EXTENSIONS/src/edm/helpFiles export EDMLIBS=$EPICS_EXTENSIONS/lib/$EPICS_HOST_ARCH
EDM can now be executed, but it can’t show anything interesting, yet.
edm