[Lerftest-ctrls] pyepics setup?

Williams Jr., Ernest L. ernesto at slac.stanford.edu
Wed Nov 21 18:17:15 EST 2018


Hi Hugo,


I already confirmed that it is not in the official script for SLAC:

grep PYEPICS epicsenv*




We are now using the script that Bruce setup.

Cheers,
Ernest

________________________________
From: Slepicka, Hugo Henrique
Sent: Wednesday, November 21, 2018 12:52 PM
To: Williams Jr., Ernest L.
Cc: Wesley Moore; Hill, Bruce; lerftest-ctrls at jlab.org
Subject: Re: [Lerftest-ctrls] pyepics setup?

Hi Ernest,

The PYEPICS configuration is already present at SLAC’s environment scripts.
I don’t have my computer with me at this moment but you can grep the SETUP area for PYEPICS_LIBCA and you will find it.
If it is out of sync with the JLAB setup we can address that but at SLAC it is already there.

Cheers,
Hugo

Sent from my iPhone

On Nov 21, 2018, at 12:35 PM, Williams Jr., Ernest L. <ernesto at slac.stanford.edu<mailto:ernesto at slac.stanford.edu>> wrote:


The basic setup scripts aim to point to:

  1.  EPICS BASE  ENV variables
  2.  EPICS EXTENSIONS  ENV variables
  3.  EPICS CA runtime ENV variables

Since, PyEPICS is not in the EPICS EXTENSONS tree we probably need a different script to setup
Python-based EPICS client tools.
-- PyEPICS
-- PyDM
-- TimeChart
-- Any others?

On the other hand since, PyEPICS is becoming a more and more popular EPICS client you can consider adding it to
the basic EPICS SETUP scripts.
@Bruce, what do you think about this?
====================================================
epicsenv-<EPICS_BASE_VERS>.bash*
=====================================================

Cheers,
Ernest
________________________________
From: Lerftest-ctrls <lerftest-ctrls-bounces at jlab.org<mailto:lerftest-ctrls-bounces at jlab.org>> on behalf of Slepicka, Hugo Henrique <slepicka at slac.stanford.edu<mailto:slepicka at slac.stanford.edu>>
Sent: Wednesday, November 21, 2018 12:21 PM
To: Wesley Moore
Cc: lerftest-ctrls at jlab.org<mailto:lerftest-ctrls at jlab.org>
Subject: Re: [Lerftest-ctrls] pyepics setup?

Hi Wesley,

Yes, they should be set as part of the setup scripts.
I will take a look Monday when I am back at the lab.

Hugo

Sent from my iPhone

On Nov 21, 2018, at 11:06 AM, Wesley Moore <wmoore at jlab.org<mailto:wmoore at jlab.org>> wrote:


Ah.. I didn't remember getting a glibc error due to libca/libcom.  So EPICS_BASE_TOP doesn't exist.  But with the following it works.


export PYEPICS_LIBCA=$EPICS_BASE/lib/$EPICS_HOST_ARCH/libca.so

export PYEPICS_LIBCOM=$EPICS_BASE/lib/$EPICS_HOST_ARCH/libCom.so


Shouldn't these be set as part of the environment already?


Wesley

________________________________
From: Slepicka, Hugo Henrique <slepicka at slac.stanford.edu<mailto:slepicka at slac.stanford.edu>>
Sent: Wednesday, November 21, 2018 1:59:57 PM
To: Wesley Moore
Cc: lerftest-ctrls at jlab.org<mailto:lerftest-ctrls at jlab.org>
Subject: Re: [Lerftest-ctrls] pyepics setup?

This error happens when PyEPICS can’t find the proper libca and tries to do its best using the one shipped with it.
Do you mind to verify that the variables that I mentioned before are pointing to proper files?

They rely on other variables being defined so if the other variables are also not there it will fail in the same way.

Hugo

Sent from my iPhone

On Nov 21, 2018, at 10:57 AM, Wesley Moore <wmoore at jlab.org<mailto:wmoore at jlab.org>> wrote:


Nope, looks like a glibc issue.  This can get sorted next week.


/lib64/libc.so.6 -> libc-2.12.so


But python seems to want 2.14, if I read the error correctly.


Wesley

________________________________
From: Slepicka, Hugo Henrique <slepicka at slac.stanford.edu<mailto:slepicka at slac.stanford.edu>>
Sent: Wednesday, November 21, 2018 1:19:44 PM
To: Wesley Moore
Cc: lerftest-ctrls at jlab.org<mailto:lerftest-ctrls at jlab.org>
Subject: Re: [Lerftest-ctrls] pyepics setup?

Hi Wesley,

I am not in the office today but this should get you going:

export PYEPICS_LIBCA=$EPICS_BASE_TOP/$EPICS_BASE_VER/lib/$EPICS_HOST_ARCH/libca.so
export PYEPICS_LIBCOM=$EPICS_BASE_TOP/$EPICS_BASE_VER/lib/$EPICS_HOST_ARCH/libCom.so

The two variables that point PYEPICS to the proper libca should be defined by SLAC’s configuration scripts.

Please let me know if this works for you.

Cheers,
Hugo

Sent from my iPhone

On Nov 21, 2018, at 6:43 AM, Wesley Moore <wmoore at jlab.org<mailto:wmoore at jlab.org>> wrote:


Is PyEPICS supposed to be configured?  It doesn't seem to work, looking like it's missing lib links.

wmoore at lclsl01> python
Python 2.7.13 (default, Apr 27 2018, 17:48:07)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import epics
>>> epics.caget("RF:GLOBAL2:1:STATSUMYFP")

Traceback (most recent call last):
  File "/usr/local/lcls/package/python/current/lib/python2.7/site-packages/epics/ca.py", line 251, in initialize_libca
    load_dll(find_libCom())
  File "/usr/local/lcls/package/python/current/lib/python2.7/ctypes/__init__.py", line 440, in LoadLibrary
    return self._dlltype(name)
  File "/usr/local/lcls/package/python/current/lib/python2.7/ctypes/__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/lcls/package/python/current/lib/libCom.so)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lcls/package/python/current/lib/python2.7/site-packages/epics/__init__.py", line 82, in caget
    thispv = get_pv(pvname, timeout=timeout, connect=True)
  File "/usr/local/lcls/package/python/current/lib/python2.7/site-packages/epics/pv.py", line 39, in get_pv
    context = ca.current_context()
  File "/usr/local/lcls/package/python/current/lib/python2.7/site-packages/epics/ca.py", line 406, in wrapper
    initialize_libca()
  File "/usr/local/lcls/package/python/current/lib/python2.7/site-packages/epics/ca.py", line 254, in initialize_libca
    raise ChannelAccessException('loading Epics CA DLL failed: ' + str(exc))
epics.ca.ChannelAccessException: loading Epics CA DLL failed: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/lcls/package/python/current/lib/libCom.so)



_______________________________________________
Mailing List: Lerftest-ctrls at jlab.org<mailto:Lerftest-ctrls at jlab.org>
https://mailman.jlab.org/mailman/listinfo/lerftest-ctrls
Wiki: https://wiki.jlab.org/lerf/index.php/Network
_______________________________________________
Mailing List: Lerftest-ctrls at jlab.org<mailto:Lerftest-ctrls at jlab.org>
https://mailman.jlab.org/mailman/listinfo/lerftest-ctrls
Wiki: https://wiki.jlab.org/lerf/index.php/Network
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/lerftest-ctrls/attachments/20181121/9e22ddb7/attachment-0001.html>


More information about the Lerftest-ctrls mailing list