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 18
From: <[email protected]>
To: <[email protected]>
Date: Thu, 23 Mar 2017 14:58:35 +0000
My earlier post covered a build from source of EDM on Mint 17.  Things have moved on a bit with Mint 18 so there are additional "hurdles" to jump over in order to build and run EDM smoothly.  I have noted these additional steps here for future reference.

I made the following notes while building EDM on a VirtualBox virtual machine running 32 bit Linux Mint 18.1 Mate edition.  I had previously built EDM a 64 bit Linux Mint 18.1 (Serena) Mate edition, so I have noted below where the library naming is different between the 32 bit and 64 bit builds.  Refer to my earlier post for details about the source file archives I used and the necessary folder structure, these have not changed.

As before, builld EPICS base after installing the additional items from the Mint repository: 
libreadline-dev libgif-dev and g++ then issue
sudo make  2>&1 | tee build1

Create a soft link from ~/epics/base-3.14.12.6  to ~/epics/base

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

libxp-dev will also be needed but this is no longer available in the Mint 18 repository so must be built from source (this is not too difficult).  It will require the following additional library to be installed first:
x11proto-print-dev

Now install git then create a working directory for git projects, move into it and issue the command

git clone https://github.com/freedesktop/libXp.git 

This will create a local libxp-dev project, move into the newly cloned /libXp folder and run the autogen script
sudo ./autogen.sh
This creates the required configure and make files to build the libary so continue the process by issuing:
sudo ./configure
sudo make
sudo make install

You will see the message that the library files have been installed in /usr/local/lib however they need to be installed in /usr/lib/i386-linux-gnu so move yourself into the /libXp/src folder and re-run the libinstall command as follows:

sudo /bin/bash ../libtool   --mode=install /usr/bin/install -c   libXp.la '/usr/lib/i386-linux-gnu'
(or for the 64 bit version of Mint 18 the necessary target directory will instead be /usr/lib/x86_64-linux-gnu)

Some library file locations must also be adjusted in 
 ~/epics/extensions/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 (64 bit install)
~/epics/extensions/configure/os/CONFIG_SITE.linux-x86.linux-x86 (32 bit install)

by default the following library file locations are referenced as
X11_LIB=/usr/lib
MOTIF_LIB=/usr/lib
or for the 64 bit version:
X11_LIB=/usr/lib64
MOTIF_LIB=/usr/lib64

edit these as follows for the 32 bit version:

X11_LIB=/usr/lib/i386-linux-gnu
MOTIF_LIB=/usr/lib/i386-linux-gnu
or for the 64 bit version
X11_LIB=/usr/lib/x86_64-linux-gnu
MOTIF_LIB=/usr/lib/x86_64-linux-gnu 


gif.cc has been patched in edm-1-12-105.tgz,  this patch worked for me when I built EDM on Mint 17 but does not work for me on the 32 bit Mint 18 build of EDM, I got round this by removing the if statement from the patch in both (identical) copies of gif.cc in
~/epics/extensions/src/edm/giflib/gif.cc  and
~/epics/extensions/src/edm/imagelib/gif.cc

 by changing the lines containing

#if GIFLIB_MAJOR > 5 || GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1
  #define GIF_CLOSE_FILE(gif) DGifCloseFile(gif, NULL)
  #define GIF_OPEN_FILE(gif) DGifOpenFileName(gif, NULL)
#else
  #define GIF_CLOSE_FILE(gif) DGifCloseFile(gif)
  #define GIF_OPEN_FILE(gif) DGifOpenFileName(gif)
#endif

to 

  #define GIF_CLOSE_FILE(gif) DGifCloseFile(gif, NULL)
  #define GIF_OPEN_FILE(gif) DGifOpenFileName(gif, NULL)

As for Mint 17 it is again necessary to edit all references in Makefile.Host AND Makefile in ~/epics/extensions/src/edm/giflib to ungif.  Change all references from ungif 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
    
now it is safe to issue the make command from  ~/epics/extensions/src/edm 
for the 32 bit version use:
sudo make EPICS_HOST_ARCH=linux-x86 2>&1 | tee build2
or for the 64 bit version use:
sudo make EPICS_HOST_ARCH=linux-x86_64 2>&1 | tee build2

As before 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
sh setup.sh

or for the 64 bit version
export HOST_ARCH=linux-x86_64
sh setup.sh

As I described previously for the Mint17 EDM build you will need a printer definition file. 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.

I am grateful to Michael Davidsaver who sent me a link to his python script for sorting through the available fonts files to build a viable fonts.list file.  You can copy the source code for this script and run it on your machine from 
 https://github.com/epicsdeb/edm/blob/45c8dfccf736af77197a63f656eaad37c38ffe17/contrib/fontparse.py
Before you run this script add the additional fonts collection from the Mint repository called 
ttf-mscorefonts-installer and restart your machine.

You can now find all the suitable fonts available to you by running the following from you home directory:
xlsfonts -fn '-*-*-*-*-*-*-*-*-75-75-*-*-*-*' | ./fontparse.py > fonts.list
remove any unwanted languages from the generated list and paste the remainder below the following 3 lines 
3 0 0
courier-medium-r-12.0
helvetica-medium-r-18.0

to a new fonts.list in /home/llrf/epics/extensions/src/edm/setup

It should now be possible to launch EDM from the shell script I provided in my earlier post on Mint17 except for the 32 bit system you will need
EPICS_HOST_ARCH=linux-x86
or for the 64 bit system
EPICS_HOST_ARCH=linux-x86_64

I should also mention Michael Davidsaver's page at
http://mdavidsaver.github.io/epics-doc/epics-starting.html#_edm which provides further help on getting started with Epics and EDM.

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: EPICS IOC asynMotorController error Mark Rivers
Next: websocket device support Geoffrey Savage
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: ORNL / US ITER Directorate Is Recruiting for: Instrumentation and Controls Lead Software Engineer / NB50620602 Cherry, Steve J.
Next: websocket device support Geoffrey Savage
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