How to read this HowTo

The entrance point (the point with which to start) depends of course on your system installation which may already have the EPICS base installation.

Installation of the base package

1) Download EPICS base...
... from: EPICS Base download. I took: baseR3.14.7.tar.gz which was the newest one (06.07.2005).

General documentation of the EPICS base see R3-14 Base Documentation.
I used HowToPC104 as a guideline. BUT: this is based on an installation on a PC104.

2) Preperations for the first compilation

see first discussion in Paragraph 4!!!!!

Unpack baseR3.14.7.tar.gz. (tar -xvzf baseR3.14.7.tar.gz) in a directory wherever

Read under: wherever /base-3.14.7/documentation the README.1st.
In order to set the EPICS_HOST_ARCH enviroment variable use: wherever /base-3.14.7/startup/EpicsHostArch. This gives what needs to be set in this variable. On a GSI Linux groupserver this gives: linux-x86.

I used as wherever /usr/src/. Later checks will show whether this was a good choice...(-- MarcRStockmeier - 12 Jul 2005 now it's /usr/src/epics/)

setup_EPICS_GSI.sh will be used as the localisation of the GSI EPICS installations. Up to know the only entry is:
export EPICS_HOST_ARCH=linux-x86
a more sophisticated setup script will develop with time. In order to source the setup_GSI.sh file type:
 . ./setup_EPICS_GSI.sh (the DOT and the space are important!)

3) type make in wherever /base-3.14.7/ the compilation runs... (take a coffee)

In case of a compilation error like: lcurses not found: Just chance in wherever /configure/os/CONFIG.Common.linuxCommon the line:
#LDLIBS_READLINE = -lreadline -lcurses MS 02052006
LDLIBS_READLINE = -lreadline

The executables are stored in wherever /bin/linux-x86.

4) All tar.gz files I checked till now come with thar own directory. So best choice would be a structure like: wherever /epics/. In this directory untzar/unzip the stuff. List of tested epics parts:
tbc....

last modified -- MarcRStockmeier - 12 Jul 2005

Installation of the first example application

The setup of a test application is again based on:
HowToPC104. The application can be setup at any location of the filesystem i.e. the home directory of the user or the the experiment controls account.

Read the ExampleHistory for your amusement, or proceed to the next line;-)

Here the howto as it should be:

The setup was done together with Burkhard Kolb.

Make a directory, change to it and execute the makeBasseApp.pl script in the eEPICS installation. Step by Stel:

  cd (in order to get to the user home or wherever you want to build the example)
  mkdir testIOC
  cd testIOC
  $EPICS_BASE/bin/linux-x86/makeBaseApp.pl -t example example
  $EPICS_BASE/bin/linux-x86/makeBaseApp.pl -i -t example example
  make
  cd ../iocBoot/iocexample
  Start your IOC with ../../exampleApp/src/O.linux-x86/example st.cmd
  List the existing records using dbl

The difference to the original source is the first call off makeBaseApp.pl

After this the directory tree of the IOC with the corresponding Makefiles is available... The tree looks like CompleteExampleTree out put of: find . ;-).

last modified -- MarcRStockmeier - 13 Jul 2005

Installation of extensionsConfig/extensionsConfigure

In order to configure an extension you need to have these two extensions. (extensionsConfig_20040406.tar.gz and extensionsConfigure_20040406.tar.gz)

WhyTwoExtensions

Unpack the two "configuration" extensions to wherever (see above).
tar -xvzf extensionsConfig_20040406.tar.gz
tar -xvzf extensionsConfigure_20040406.tar.gz

In addition to tha base directory an extension direcory shows up. In there the config and confidguration directory are located. It depends on the extension one wants to install which directory, config or configure, will be used. medm needs the config style for configuration.

Note The medm extension used, wanted to have the config version. The makefile in my directory structure just uses stuff which is in the config directory. It needs to be claryfied what is really in use!

Don't forget to set the EPICS_EXTENSIONS environment variable to the appropriate location i.e. /usr/src/epics/extensions
export EPICS_EXTENSIONS=/usr/src/epics/extensions

Both configurations do have a RELEASE file. Check the EPICS_BASE setting there!!!!!! For some reason there is something set which does not necessarily fit to your needs!!!! (Actually this can be a real pain in the ass to find all positions where the EPICS_BASE is overwritten by someone/something...)

last modified -- MarcRStockmeier - 25 Oct 2005

ConfigUREProblemsWhich are NOT a problem!

last modified -- MarcRStockmeier - 25 Oct 2005

Installation of medm (Motif Editor and Display Manager)

note medm is one of many standalone CA-clients. See here for more informations.

In order to connect to the exampleIOC the best thing is the use of medm, which is a graphical userinterface. Guis can be made rather easyly with this tool. Installation copy medm3_0_3.tar.gz to the installation directory wherever and unpack the tar.gz.
tar -xvzf medm3_0_3.tar.gz
Run make at wherever /extensions/src/medm. After this medm can be used by any user.

In uptodate Linux installations are some motif header files missing. Install:
/usr/X11R6/include/X11/Xm/XmP.h
/usr/X11R6/include/X11/Xm/Xm.h 
/usr/X11R6/include/X11/Xm/Label.h 
and all the stuff from openmotif... SuSE 10.0 these files are available on the DVD or CD 4. (may be BUT: not checked MS: 03.05.2006)

On GSI debian machines medm just works... (In other words: they are old enough...)

-- MarcRStockmeier - 02 May 2006

last modified -- BurkhardKolb - 08 Aug 2005

Installation of ChannelArchiver

Download the ChannelArchiver here (25.10.2005). Unpack the arrchiver.tgz on the installation directory wherever /extensions/src. (on lxgs02 the location wherever is: /usr/src/epics). In other words: The ChannelArchiver needs to be installed in the extensions/src directory. The manusl of the ChannelArchiver is located in the manual subdirectory. Chapter 8 deals with the installation and compilation. This script is based on that manual!
tar -xvzf archiver.tgz
Before running make using the make file in the top directory the third party software. Refer to the ReadMe in the ThirdParty directory.
tar -xvzf xerces-c-current.tar.gz
cd xerces-c-src2_4_0
export XERCESCROOT=`pwd`
cd $XERCESCROOT/src/xercesc
autoconf
./runConfigure -plinux -cgcc -xg++ -minmem -nsocket -tnative -rpthread -P/usr/share
make   (please don't forget to take a coffee)
su (only if you are not root;-))
make install
XERCESCROOT=`pwd` gives in this example: /usr/src/epics/extensions/src/ChannelArchiver/ThirdParty/xerces-c-src2_4_0

FirstProblem20051026 . GSI specific: /usr/local is a remotly mounted directory mounted with root_squash (good idea...). /usr/share should be fine. Change the ./runConfigure call accordingly. (forget about all this and use the adopted call given above...)

Now the compilation of ChannelArchiver is still not working... (because of the /usr/share thing.... Now searching for the location of this setting...)

In extensions/src/ChannelArchiver/ edit the location of XMLRPCBASE in make.cfg:
XMLRPCBASE=/usr/share
more Thirdparty stuff fis needed...

installation of w3c-libwww
tar -xvzf w3c-libwww-5.4.0.tgz
cd w3c-libwww-5.4.0
./configure --prefix=/usr/share
edit the Makefile in order to change the PREFIX to /usr/share (is NOT working!!!! --prefix IS THE solution!!!!!) 
make
make install

Installation of the xmlrpc stuff:
tar -xvzf xmlrpc-c-0.9.9.tar.gz
cd xmlrpc-c-0.9.9
./configure --prefix=/usr/share
FirstOutput for ./configure. configure: error: w3c-libwww not found; smile Forget about this. The Manual says after the explanation of the installation of the XMLRPC that that this library must be installed beforehand...:-( very loooooooooong and different tries to compile thisone. Solution was found by OlafHartmann by introducing /usr/share/bin to the PATH!!!!

-- MarcRStockmeier - 01 Nov 2005 -- MarcRStockmeier - 26 Oct 2005

Installation of Alarm Handler

Download of Alarm handler at: alh1_2_15.tar.gz (03.05.2006) Unpack the Alarm Handler in the extension directory tree. (./extension IS included in the tar file!)
tar -xvzf alh1_2_15.tar.gz
Change the ./configure/RELEASE file according to your needs

-- MarcRStockmeier - 03 May 2006

Installation of SNC

The SNC is needed for example for the virtual LINAC demo. SNC stands for State Notation Compiler/Sequencer. The leatest (03.05.2006) sequencer is located at: seq-2.0.11.tgz
The default modules directory of EPICS base is not included in the tar file. SNC was installed parallel to the base directory structure.

Change the ./configure/RELEASE file according to your needs

-- MarcRStockmeier - 03 May 2006

Installation of StripTool/SDDS

As a debugging tool for CA published data install the Strip Tool from: StripTool2_5_10_0.tar.gz.
tar -xvzf StripTool2_5_10_0.tar.gz
The Strip Tool requires SDDS.h which is NOT included in the tar archive. SDDS is an abreviation for Self-Describing Data Sets analysis package. The download is somewhat strange. It needs a ticket (downlad key). Download here. For an unknown reason this package is been tared with a different path. Unpack and move it to the correct extensions path.
tar -xvzf SDDS.1.32.tar.gz
-- MarcRStockmeier - 09 May 2006

Compilation of SDDS

Normal compiliation gives the following error:
/usr/bin/gcc -c   -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500        -D_X86_  -DUNIX  -D_BSD_SOURCE -Dlinux  -D_REENTRANT -ansi  -O3  -Wall     -I../../../include -I/usr/X11R6/include/X11 -DzLib      -g -fPIC -I. -I.. -I../../../../../include/os/Linux -I../../../../../include -I/misc/brand/EPICS/base-3.14.8.2/include/os/Linux -I/misc/brand/EPICS/base-3.14.8.2/include -I/misc/brand/EPICS/extensions/include/os/Linux -I/misc/brand/EPICS/extensions/include        ../multi_plot.c
/usr/bin/ar -rc   libmdbplt.a       arrows.o plot_data_sets.o make_scales.o graphics.o psymbol.o term.o multi_plot.o
/usr/bin/ranlib libmdbplt.a
Installing library ../../../../../lib/linux-x86/libmdbplt.a
/usr/bin/ranlib ../../../../../lib/linux-x86/libmdbplt.a
/usr/bin/g++ -o libmdbplt.so -shared          -Wl,-rpath,/misc/brand/EPICS/extensions/lib/linux-x86 -Wl,-rpath,/misc/brand/EPICS/base-3.14.8.2/lib/linux-x86 -Wl,-rpath,/misc/brand/EPICS/extensions/lib/linux-x86         arrows.o plot_data_sets.o make_scales.o graphics.o psymbol.o term.o multi_plot.o     -lpthread   -lXaw  -lgcc
/usr/bin/ld: cannot find -lXaw
collect2: ld returned 1 exit status
make[3]: *** [libmdbplt.so] Error 1
make[3]: Leaving directory `/misc/brand/EPICS/extensions/src/SDDS/SDDSaps/sddsplots/O.linux-x86'
make[2]: *** [buildInstall.linux-x86] Error 2
make[2]: Leaving directory `/misc/brand/EPICS/extensions/src/SDDS/SDDSaps/sddsplots'
make[1]: *** [SDDSaps/sddsplots.buildInstall] Error 2
make[1]: Leaving directory `/misc/brand/EPICS/extensions/src/SDDS'
make: *** [SDDS.buildInstall] Error 2
LD_LIBRARY_PATH is not used... (agrees with the -rpath option;-))
The dirty tricks (Thanks to JoernAdamczewski) are not working: A link from ,/misc/brand/EPICS/extensions/lib/linux-x86/libXaw.so and libXaw.a to /usr/X11R6/lib and the same from /usr/lib/ Now the real digging why the linker doesn't find the libXaw starts.

The following link tries to dig to the bottom of the Makefiles and include leading to the final ld call: SDDSMakeFileTree

-- MarcRStockmeier - 10 May 2006

user environment Variables

since I use bash I give the bash notation (copy and paste complient...;-)) There are automatic procedures to determine EPICS_HOST_ARCH but these are not working all the times... (depends on linux flavour...;-))
export EPICS_HOST_ARCH=linux-x86
export EPICS_BASE=/usr/src/epics/base-3.14.7
export EPICS_EXTENSIONS=/usr/src/epics/extensions

-- MarcRStockmeier - 12 Jul 2005

more user environment Variables

For medm to find the adl files (the ascii description language of the GUI) set
export EPICS_DISPLAY_PATH=/u/whoeveryouare/operator

For multicast instead of broadcast PV name resolutions set
export EPICS_CA_ADDR_LIST="lxi001 lxi002 ... lxi013" // a list of your IOCs the " are important spaces between different hosts
export EPICS_CA_AUTO_ADDR_LIST=NO // turn off broadcasting

last modified -- BurkhardKolb - 08 Aug 2005
Topic revision: r32 - 2018-01-08, PeterZumbruch
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)