Setting up EDM
Getting EDM working can be a bit of a headache. Two approaches are possible: building EDM or using the portable edm package.
Portable EDM
Download the file above and untar to a sensible location. This package is intended to be as self contained as possible and with luck will run on any compatible linux system. Simply ensure that the enclosed edm
script is on the path and run.
Note that the portable_edm.tgz file above is more up to date than the equivalent file which can be found at http://controls.diamond.ac.uk/downloads/other/files/alba_tmbf.
Building EDM
Building EDM from scratch is moderately tricky, as it depends on openmotif, which may be difficult to locate. The following instructions were prepared in 2014 for Alba to work on Open SuSE:
# To build epics base: sudo zypper install gcc gcc-c++ readline-devel wget http://www.aps.anl.gov/epics/download/base/baseR3.14.12.4.tar.gz make -C base-3.14.12.4 # To build edm # Add following repo source (or equivalent): # http://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/11.1/repo/oss/suse/ # to install the following packages sudo zypper install xorg-x11-Xt-devel openmotif-devel giflib-devel # Prepare sources: # wget http://controls.diamond.ac.uk/downloads/other/files/alba_tmbf/extensions.tgz tar xzf extensions.tgz # Edit extensions/configure/RELEASE and extensions/config/RELEASE and edit to # point EPICS_BASE to the absolute path to epics-base as built above. make -C extensions
The extensions.tgz file is attached below:
Coping with error "No realize class procedure defined"
It seems that more recent versions of the linker can result in discarded symbols. There is a documented fix, which is to add the following line to edmMain/Makefile
:
USR_LDFLAGS_Linux += -Wl,--no-as-needed
This is described on the EDM web page here (archive.org link), message copied below:
From Jason Abernathy:
I have found that running EDM will yield the error
Error: No realize class procedure defined
after an (apparantly) successful build on an Ubuntu 11.10 system.
This can be solved modifying the edmMain/Makefile
edm_LIBS_Linux += Xm Xmu Xt Xp Xtst X11 USR_LDFLAGS_Linux += -Wl,--no-as-needed<--- add this line edm_SYS_LIBS_Linux += pthread dl
The problem was noticed after upgrading a development machine from Ubuntu 11.04 to 11.10. It was debugged by executing the same linker command, verbosely, on a pair of computers which differed only in their Ubuntu version.
There was a change to implicit link behaviour in Ubuntu 11.10. Shared libraries dependencies which don't share symbols with the current target are now culled from the dynamic link table. This behaviour isn't desired for programs which use pluggable libraries (such as EDM).
Adding the "--no-as-needed" flag restores the behaviour to that of earlier versions of Ubuntu (<= 11.04). More information about the change can be found here (original link is here).