EPICS: EDM compilation and configuration: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== MCC EDM configuration ==
By '''Anthony Cuffe'''
MCC EDM screens are accessible via command
ssh hlbl00 opsmenu
Here we should use:
EOS Menu -> EDM(OPS)
EDM configuration on this server is located under '''''/cs/opshome/edm'''''
== Links ==
== Links ==


Line 9: Line 23:
MCC EDM screens: http://opweb.acc.jlab.org/internal/edm/
MCC EDM screens: http://opweb.acc.jlab.org/internal/edm/


MCC RSYNC URI of EDM configurations:
RSYNC URI: hlbl00:/cs/opshome/edm/colors.list


== Compilation & Configuration ==
RSYNC of the EDM configuration could be done using the following script:
cd $EPICS_EXTENSIONS/src/edm/setup
cp colors.list colors.list.`date +%Y%m%d`
rsync -e ssh hlbl00:/cs/opshome/edm/colors.list .
diff colors.list colors.list.20101012 > /dev/null && rm -f colors.list.`date +%Y%m%d`


=== Directory ===
== Directory Configuration ==


Downloaded the EDM version 1-12-37 and unpacked into $EPICS_EXTENSIONS/src
Downloaded the EDM version 1-12-37 and unpacked into $EPICS_EXTENSIONS/src
Line 25: Line 43:
  -rw-rw-r--  1 nerses  clas    2701933 Jul  1  2009 /usr/local/clas/devel/R3.14.8.2/extensions/src/edm-1-12-37.tar.gz
  -rw-rw-r--  1 nerses  clas    2701933 Jul  1  2009 /usr/local/clas/devel/R3.14.8.2/extensions/src/edm-1-12-37.tar.gz


=== Compilation ===
== Compilation ==


'''NOTE:''' curl
'''NOTE:''' Compilation on linux runs without a problem. But, on both solaris-x86 and solaris-sparc modifications should be done.
Compilation on linux runs without a problem. But, on both solaris-x86 and solaris-sparc modifications should be done.


==== Required packages for solaris ====
=== Required packages for solaris ===


;libgif :download from sourcefourge.net
;libgif :download from sourcefourge.net
Line 36: Line 53:
;libcurl :available at /opt/sfw/{include,lib}
;libcurl :available at /opt/sfw/{include,lib}


==== Summary of modifications ====
=== Summary of modifications ===


# Under Solaris '''''__STDC__''''' have to be defined in order to use the correct calls to regex functions.
# Under Solaris '''''__STDC__''''' have to be defined in order to use the correct calls to regex functions.
Line 46: Line 63:
# '''''pvFactory/textupdate.cc''''' has a call to the '''''int finite(double dsrc);''''' function which under solaris requires inclusion of '''''ieeefp.h''''' as opposite to linux which requires math.h and included from other header files. To overcome the predefined macro '''''__SUNPRO_CC''''' was used to identify Sun's compiler.
# '''''pvFactory/textupdate.cc''''' has a call to the '''''int finite(double dsrc);''''' function which under solaris requires inclusion of '''''ieeefp.h''''' as opposite to linux which requires math.h and included from other header files. To overcome the predefined macro '''''__SUNPRO_CC''''' was used to identify Sun's compiler.
# For '''''slaclib''''' compilation the shared libraries  '''''X11 Xt 114135a4-6f6c-11d3-95bc-00104b8742df cfcaa62e-8199-11d3-a77f-00104b8742df''''' should be added.
# For '''''slaclib''''' compilation the shared libraries  '''''X11 Xt 114135a4-6f6c-11d3-95bc-00104b8742df cfcaa62e-8199-11d3-a77f-00104b8742df''''' should be added.
'''NOTE: The detailed summary of changes is in the''' [[#Essential diff of original and modified sources]]
== Configuration ==
=== Environment and run configuration ===
* An edm startup ''tcsh'' script ''$EPICS_SCRIPTS/edm'' script was created based on edm/setup.sh
** It supports generation of architecture depended configuration files in respective subdirectories under edm/setup. The directories edm/setup{linux-x86,solaris-x86,solaris-sparc} are actual configuration directories for respective compiled edm flavours.
** colors.list, fonts.list and calc.list are in the edm/setup directory and links are created from architecture depended directories to them.
* In the clas_epics.adl the command to run edm is:
/bin/tcsh -f $EPICS_SCRIPTS/edm -x monticello.edl
Odd things noticed while was trying to run from medm:
# It is strange but medm calls scripts with same environment but differently.
# tcsh instead of csh is must. At least under solaris, otherwise will not work.
=== Colour configuration ===


==== Essential diff of original and modified sources ====
* The colour configuration used by MCC is backward compatible with MEDM and is different from default more sensible EDM colour configuration.
To have a normal contrast colours we are using colors.list from MCC
MCC is changing this file from time to time. Usually, by adding a new colour rules.
This restricts us from migrating to EDM, because we will have to have different colour configurations for MCC and Hall-B screens.
 
To synchronize colour configuration file from MCC server we should use ssh or rsync.
 
== Essential diff of original and modified sources ==


  diff -r -bB edm-1-12-37/baselib/Makefile edm-1-12-37.orig/baselib/Makefile
  diff -r -bB edm-1-12-37/baselib/Makefile edm-1-12-37.orig/baselib/Makefile
Line 161: Line 201:
  <  USR_LDFLAGS_solaris += -L/opt/sfw/lib
  <  USR_LDFLAGS_solaris += -L/opt/sfw/lib
  <
  <
== adl2edl ==
The adl2edl is downloaded from the same place as edm.
Installed under $EPICS_EXTENSIONS/src
By default adl2edl didn't have a architecture depended build. I've modified it, now it supports current EPICS build rules.
EDM was configured via
setenv EDMFILTERS $EDM/setup/$EPICS_HOST_ARCH
edmFilters files are linked to $EDM/setup/edmFilters and contains line for converting adl files of MEDM
.adl adl2edl %f
== Conversion of Hall-B MEDM screens to EDM ones ==
Here are 2 options:
# Convert once all medm screens and start using edm only.
# Use edmFilters feature to convert adl files on-the-fly.

Latest revision as of 10:27, 12 October 2010

MCC EDM configuration

By Anthony Cuffe

MCC EDM screens are accessible via command

ssh hlbl00 opsmenu

Here we should use:

EOS Menu -> EDM(OPS)

EDM configuration on this server is located under /cs/opshome/edm

Links

Web page: http://ics-web.sns.ornl.gov/edm/

Download: http://ics-web.sns.ornl.gov/edm/log/getLatest.php

User Guide: http://ics-web.sns.ornl.gov/edm/edmUserManual/index.html

MCC EDM screens: http://opweb.acc.jlab.org/internal/edm/

RSYNC URI: hlbl00:/cs/opshome/edm/colors.list

RSYNC of the EDM configuration could be done using the following script:

cd $EPICS_EXTENSIONS/src/edm/setup
cp colors.list colors.list.`date +%Y%m%d`
rsync -e ssh hlbl00:/cs/opshome/edm/colors.list .
diff colors.list colors.list.20101012 > /dev/null && rm -f colors.list.`date +%Y%m%d`

Directory Configuration

Downloaded the EDM version 1-12-37 and unpacked into $EPICS_EXTENSIONS/src The default directory containing EDM is edm, which is soft link to version directory.

nerses@clon01:src> ls -ld $EPICS_EXTENSIONS/src/edm*
lrwxrwxrwx   1 epics    clas          11 Oct  5 12:42 /usr/local/clas/devel/R3.14.8.2/extensions/src/edm -> edm-1-12-37/
drwxrwxr-x  27 nerses   clas        4096 Oct  5 02:17 /usr/local/clas/devel/R3.14.8.2/extensions/src/edm-1-11-1v/
-rw-rw----   1 nerses   clas     2631404 Dec  4  2008 /usr/local/clas/devel/R3.14.8.2/extensions/src/edm-1-11-1v.tgz
drwxrwxr-x  29 nerses   clas        4096 Oct  5 15:25 /usr/local/clas/devel/R3.14.8.2/extensions/src/edm-1-12-37/
-rw-rw-r--   1 nerses   clas     2701933 Jul  1  2009 /usr/local/clas/devel/R3.14.8.2/extensions/src/edm-1-12-37.tar.gz

Compilation

NOTE: Compilation on linux runs without a problem. But, on both solaris-x86 and solaris-sparc modifications should be done.

Required packages for solaris

libgif
download from sourcefourge.net
libungif
available at /opt/sfw/{include,lib}
libcurl
available at /opt/sfw/{include,lib}

Summary of modifications

  1. Under Solaris __STDC__ have to be defined in order to use the correct calls to regex functions.
    1. To have network capability of EDM one should change to USE_CURL=YES in lib/Makefile and add libcurl in the list of libraries to be linked.
    2. And since libcurl is in /opt/sfw/lib directory, that directory should be added into list of the lookup directories.
    3. Also the /opt/sfw/include should be added into list of include directories.
  2. In some of the EDM subdirectories the libCom and libca from $EPICS_BASE/lib/$EPICS_HOST_ARCH should be added.
  3. In the giflib/Makefile the loopkup directory for libraries of /opt/sfw/lib should be added for libungif
  4. pvFactory/textupdate.cc has a call to the int finite(double dsrc); function which under solaris requires inclusion of ieeefp.h as opposite to linux which requires math.h and included from other header files. To overcome the predefined macro __SUNPRO_CC was used to identify Sun's compiler.
  5. For slaclib compilation the shared libraries X11 Xt 114135a4-6f6c-11d3-95bc-00104b8742df cfcaa62e-8199-11d3-a77f-00104b8742df should be added.

NOTE: The detailed summary of changes is in the #Essential diff of original and modified sources

Configuration

Environment and run configuration

  • An edm startup tcsh script $EPICS_SCRIPTS/edm script was created based on edm/setup.sh
    • It supports generation of architecture depended configuration files in respective subdirectories under edm/setup. The directories edm/setup{linux-x86,solaris-x86,solaris-sparc} are actual configuration directories for respective compiled edm flavours.
    • colors.list, fonts.list and calc.list are in the edm/setup directory and links are created from architecture depended directories to them.
  • In the clas_epics.adl the command to run edm is:
/bin/tcsh -f $EPICS_SCRIPTS/edm -x monticello.edl

Odd things noticed while was trying to run from medm:

  1. It is strange but medm calls scripts with same environment but differently.
  2. tcsh instead of csh is must. At least under solaris, otherwise will not work.

Colour configuration

  • The colour configuration used by MCC is backward compatible with MEDM and is different from default more sensible EDM colour configuration.

To have a normal contrast colours we are using colors.list from MCC MCC is changing this file from time to time. Usually, by adding a new colour rules. This restricts us from migrating to EDM, because we will have to have different colour configurations for MCC and Hall-B screens.

To synchronize colour configuration file from MCC server we should use ssh or rsync.

Essential diff of original and modified sources

diff -r -bB edm-1-12-37/baselib/Makefile edm-1-12-37.orig/baselib/Makefile
11c11
<    USR_CXXFLAGS_solaris += -D__solaris__ -DSINGLE_THREADED=1 -D__epics__=1 -D__STDC__
---
>    USR_CXXFLAGS_solaris += -D__solaris__ -DSINGLE_THREADED=1 -D__epics__=1
27,29d26
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/calcPv/Makefile edm-1-12-37.orig/calcPv/Makefile
31,33d30
<    USR_LIBS_solaris += Com
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
diff -r -bB edm-1-12-37/choiceButton/Makefile edm-1-12-37.orig/choiceButton/Makefile
24,26d23
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/diamondlib/Makefile edm-1-12-37.orig/diamondlib/Makefile
28,30d27
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/edmMain/Makefile edm-1-12-37.orig/edmMain/Makefile
28,30d27
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/epicsPv/Makefile edm-1-12-37.orig/epicsPv/Makefile
31,33c31
<    USR_LIBS_solaris += ca Com
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
---
>    USR_LIBS += ca Com
diff -r -bB edm-1-12-37/giflib/Makefile edm-1-12-37.orig/giflib/Makefile
42c42
<    USR_LDFLAGS_solaris += -L$(GIF_LIB) -L/opt/sfw/lib
---
>    USR_LDFLAGS_solaris += -L$(GIF_LIB)
diff -r -bB edm-1-12-37/indicator/Makefile edm-1-12-37.orig/indicator/Makefile
24,26d23
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/lib/Makefile edm-1-12-37.orig/lib/Makefile
7,8c7
<   #USE_CURL=NO
<   USE_CURL=YES
---
>   USE_CURL=NO
38,39d36
<  USR_INCLUDES_solaris += -I/opt/sfw/include
<  USR_LDFLAGS_solaris += -L/opt/sfw/lib
diff -r -bB edm-1-12-37/locPv/Makefile edm-1-12-37.orig/locPv/Makefile
23,24d22
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
diff -r -bB edm-1-12-37/logPv/Makefile edm-1-12-37.orig/logPv/Makefile
31,34d30
<    USR_LIBS_solaris += Com ca
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/multiSegRampButton/Makefile edm-1-12-37.orig/multiSegRampButton/Makefile
24,26d23
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/pnglib/Makefile edm-1-12-37.orig/pnglib/Makefile
36,38d35
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/pvFactory/Makefile edm-1-12-37.orig/pvFactory/Makefile
14c14
<    USR_CXXFLAGS_solaris += -DSINGLE_THREADED=1 -D__epics__=1 -D__STDC__
---
>    USR_CXXFLAGS_solaris += -DSINGLE_THREADED=1 -D__epics__=1
22,24d21
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/pvFactory/textupdate.cc edm-1-12-37.orig/pvFactory/textupdate.cc
10,13d9
< #ifdef __SUNPRO_CC
< #include <ieeefp.h>
< #endif
<
Only in edm-1-12-37/setup: colors.list.orig
Only in edm-1-12-37/setup: setup.csh
Only in edm-1-12-37/setup: linux-x86
Only in edm-1-12-37/setup: solaris-sparc
Only in edm-1-12-37/setup: solaris-x86
diff -r -bB edm-1-12-37/slaclib/Makefile edm-1-12-37.orig/slaclib/Makefile
24,28d23
<    ifneq ($(findstring solaris,$(EPICS_HOST_ARCH)),)
<  LDLIBS += -lX11 -lXt
<  LDLIBS += -l114135a4-6f6c-11d3-95bc-00104b8742df
<  LDLIBS += -lcfcaa62e-8199-11d3-a77f-00104b8742df
<    endif
diff -r -bB edm-1-12-37/triumflib/Makefile edm-1-12-37.orig/triumflib/Makefile
28,30d27
<    USR_SYS_LIBS_solaris += curl
<    USR_LDFLAGS_solaris += -L/opt/sfw/lib
<
diff -r -bB edm-1-12-37/videowidget/Makefile edm-1-12-37.orig/videowidget/Makefile
29,31d28
<   USR_SYS_LIBS_solaris += curl
<   USR_LDFLAGS_solaris += -L/opt/sfw/lib
<

adl2edl

The adl2edl is downloaded from the same place as edm.

Installed under $EPICS_EXTENSIONS/src

By default adl2edl didn't have a architecture depended build. I've modified it, now it supports current EPICS build rules.

EDM was configured via

setenv EDMFILTERS $EDM/setup/$EPICS_HOST_ARCH

edmFilters files are linked to $EDM/setup/edmFilters and contains line for converting adl files of MEDM

.adl adl2edl %f

Conversion of Hall-B MEDM screens to EDM ones

Here are 2 options:

  1. Convert once all medm screens and start using edm only.
  2. Use edmFilters feature to convert adl files on-the-fly.