EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Notes on building EDM for Linux Mint 17
From: <[email protected]>
To: <[email protected]>
Date: Thu, 16 Feb 2017 15:28:04 +0000
As I found building EDM from source was not a particularly simple task I have listed here the most important steps I took, many of which I collected together from several other tech talk posts.  In future perhaps it would be possible to adjust the makefiles to eliminate some to the extra steps I describe below?

The system I built EDM on is an Acer Travel Mate 8371G running 64 bit Linux Mint 17.3 (Rosa) 

My installation used the following EPICS versions
baseR3.14.12.6.tar.gz
extensionsTop_20120904.tar.gz
edm-1-12-105.tgz 

EDM version 105 contains the extra NULL argument in calls to DGifOpenFileName( name ) and DGifCloseFile( gif ) in gif.cc.  If an older version of EDM is to be built then there is a patch provided with version 105 that can be applied to earlier versions.

baseR3.14.12.6.tar.gz and extensionsTop_20120904.tar.gz are unzipped into ~/epics and edm-1-12-105.tgz is unzipped into ~/epics/extensions/src

I recommend initiating a git project in ~/epics to keep track of any modifications you try in your make and config files. You will need to add the object and binary folders generated by the build processes to your .gitignore file to enable you to just track the changes that you initiate and not track the many files and folders created by make. I also recommend the use of remake rather than make to run all the source builds as remake provides more detail on any make file problems and also allows full debug facilities in the make process if any problems are encountered.  However these are just my personal preferences and not essential for the following steps.

The Linux Mint distribution will require several development libraries to be installed to avoid one or more missing header file messages causing the make process to fail.  I believe I have listed all those required with the relevant build steps below.

A build of EDM requires EPICS base to be built first. Base requires the following development libraries to be installed on Mint 17 before initiating the make file:
libreadline-dev libgif-dev 

Using remake and keeping a record of all the build messages in a log file bild1, I then issued the following command to build base from my working directory in ~/epics/base-3.14.12.6

sudo remake  2>&1 | tee build1

No errors were encountered and in  ~/epics/base-3.14.12.6/bin/linux-x86_64 a total of 49 executable and perl files were created indicating a successful build.

I then created a soft link to /base using

ln -s ~/epics/base-3.14.12.6 ~/epics/base

Before building EDM the following additional libraries must be installed:
libxtst-dev libmotif-dev libxt-dev libxmu-dev libpng-dev libxp-dev libgif-dev

Some library file locations must also be adjusted in 
 ~/epics/extensions/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 as follows:

by default the following library file locations are referenced
X11_LIB=/usr/lib64
MOTIF_LIB=/usr/lib64

edit these as follows:
X11_LIB=/usr/lib/x86_64-linux-gnu
MOTIF_LIB=/usr/lib/x86_64-linux-gnu 

Further changes to the libraries referenced by ~/epics/extensions/src/edm/giflib are also required, edit references to ungif in Makefile.Host and Makefile to refer instead to gif

Finally the Makefile in ~/epics/extensions/src/edm/src/edmMain needs a small edit, locate the line
    edm_LIBS_Linux += Xm Xmu Xt Xp Xtst X11
and add the extra line
    USR_LDFLAGS_Linux += -Wl,--no-as-needed
    
Not doing this last edit will cause edm to crash with the following error messages after it is built and launched:
X error: code=3, msg: BadWindow (invalid Window parameter)
X error: code=3, msg: BadWindow (invalid Window parameter)
X error: code=3, msg: BadWindow (invalid Window parameter)
Error: No realize class procedure defined


Now it should be possible to run the build of edm without any fatal errors, move your working directory to 
~/epics/extensions/src/edm and build edm using 
sudo remake EPICS_HOST_ARCH=linux-x86_64 2>&1 | tee build2

Again I suggest the use of remake for more information and keeping the makefile log as build2.  You should now find a newly built edm binary in  ~/epics/extensions/bin/linux-x86_64

It is now necessary to build the edmObjects and edmPvObjects lists using the setup.sh script in ~/epics/extensions/src/edm/setup/

Move your working directory to 
~/epics/extensions/src/edm/setup/
then enter the commands
export HOST_ARCH=linux-x86_64
sh setup.sh

This should generate the required files, now have a look at the default fonts.list in the /setup directory, it will probably not list any of the fonts available by default in Mint Mate.  I found instead that the following list was sufficient to get started:

3 0 0
courier-medium-r-12.0
arial-medium-r-18.0
arial=-*-bitstream-(medium,bold)-(r,i)-normal--*-(120)-*-*-*-*-*-*
courier=-misc-fixed*-(medium,bold)-(r,o)-normal--*-(120,140,200)-*-*-*-*-*-*	

Note you can extend this list with the help of the xfontsel utility, launch this and explore the fonts that are available by selecting one of the options under -fndry- then select fonts that have both a regular and italic or oblique variant under -slant and also a medium and bold weight under -wght- Once you have found a suitable font family to add follow the structure listed in the example above including the two font weights in brackets and the slant options in brackets and finally the point size -ptSz- in brackets. 

For initial testing it is advisable to launch edm from a shell script that also exports the key environment variables needed by EDM, the following is an example of a script that I used for initial testing:

EPICS_HOST_ARCH=linux-x86_64
export EPICS_HOST_ARCH
#
# EPICS Environment
#
EPICS_BASE=/home/epics/base
EPICS_EXTENSIONS=/home/epics/extensions
EPICS_CA_AUTO_ADDR_LIST=NO
EPICS_CA_ADDR_LIST="130.246.50.203"  #  <- <- change this line to the IP address of your IOC if you have one running
export EPICS_BASE EPICS_EXTENSIONS 
export EPICS_CA_ADDR_LIST EPICS_CA_AUTO_ADDR_LIST
echo "EPICS_BASE=$EPICS_BASE EPICS_EXTENSIONS=$EPICS_EXTENSIONS "
echo "EPICS_CA_ADDR_LIST=$EPICS_CA_ADDR_LIST EPICS_CA_AUTO_ADDR_LIST=$EPICS_CA_AUTO_ADDR_LIST"

#
# EDM Environment
#
EDMPVOBJECTS=$EPICS_EXTENSIONS/src/edm/setup
EDMOBJECTS=$EPICS_EXTENSIONS/src/edm/setup
EDMHELPFILES=$EPICS_EXTENSIONS/src/edm/helpFiles  # Location of the help files. helpMain.edl in there is opened.
EDMFILES=$EPICS_EXTENSIONS/edmobjects  # Location of fonts.list and colors.list. 
EDMDATAFILES=/home/epics  # Location of display files given as a search path similar to the PATH variable. Example
EDMLIBS=$EPICS_EXTENSIONS/lib/$EPICS_HOST_ARCH
export EDMOBJECTS EDMPVOBJECTS EDMHELPFILES EDMFILES EDMDATAFILES
echo "EDMPVOBJECTS=$EDMPVOBJECTS EDMOBJECTS=$EDMOBJECTS EDMHELPFILES=$EDMHELPFILES EDMFILES=$EDMFILES EDMDATAFILES=$EDMDATAFILES"
echo "EDMLIBS=$EDMLIBS"
PATH=$EPICS_BASE/bin/$EPICS_HOST_ARCH:$EPICS_EXTENSIONS/bin/$EPICS_HOST_ARCH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LD_LIBRARY_PATH=$EDMLIBS:$EPICS_BASE/lib/$EPICS_HOST_ARCH # location of the edm shared library files *.so
export PATH LD_LIBRARY_PATH
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo "PATH =$PATH "
edm -m user=$USER &

Finally, before running the test script to launch edm, if you have a edmPrintDef printer definition file copy it to =$EPICS_EXTENSIONS/src/edm/setup alternatively copy the one provided in $EPICS_EXTENSIONS/src/edm/edmMain

It should now be possible to launch edm from the shell script with few if any font warning messages and begin live testing.

Bob Anderson, ISIS LINAC RF Section
STFC Rutherford Appleton Laboratory
Building R12, Room 15B
Harwell Science and Innovation Campus
DIDCOT
OX11 0QX
Telephone (Direct dial) 01235-567112
RAL Mobile 0779-504-6410
[email protected]




Navigate by Date:
Prev: Re: IOC Connecting Problem Rod Nussbaumer
Next: Re: How access to an array value from a process variable using ca_array_get()? J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EDM compiling problems Mike Westfall
Next: EDM install on fedora20-64 bit system problem: "lib605432d2-f29d-11d2-973b-00104b8742df.so: cannot open shared object file: No such file or directory" lzf neu
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024