Closed kasemir closed 5 years ago
Thanks for the heads up. The separate of pcas library is indeed a confusion. Currently my simple workaround is to still build the pcas together with epics base, and that is supported by the build system.
$ cd /home/scratch/base-7.0.1.1/modules/
$ git clone git@github.com:epics-modules/pcas.git
$ echo EPICS_BASE = /home/scratch/base-7.0.1.1 > RELEASE.local
$ echo -e "SUBMODULES += pcas\npcas_DEPEND_DIRS = libcom" > Makefile.local
$ cd /home/scratch/base-7.0.1.1
$ make
Maybe a separate PCAS environment variable could be used to locate the library?
As for running with EPICS 7 and the unbundled pcas-4.13.2, all seems to work except the 'asyn' mode results in a warning.
For example, running python pysh.py
and then
caput -S -c -w 10 MTEST:COMMAND whoami
works OK, the MTEST:OUTPUT
is updated, the completion callback is performed, but there's this additional message in the python terminal:
('DEBUG: Run ', 'whoami')
Application returned 34340869 from casChannel::write() - expected S_casApp_asyncCompletion
('DEBUG: Finish ', 'whoami')
Building pcas inside the base/modules is reasonable, I hadn't thought about that. Maybe mention that on the installation page. Certainly a lot easier than updating setup.py to handle a potentially separate location for gdd & pcas.
After a brief check the error related to asynchronous write is related to the change of status code definition. (PCASpy)https://github.com/paulscherrerinstitute/pcaspy/blob/master/pcaspy/errMdef.i (EPICS7) https://github.com/epics-base/epics-base/blob/7.0/modules/libcom/src/error/errMdef.h (EPICS3) https://github.com/epics-base/epics-base/blob/3.16/src/libCom/error/errMdef.h
Because pcaspy copies these constants to python file, in EPICS 7, they would have totally different meanings. That confuses the pcas library. I will check whether feasible not to copy the constants definition.
Addressed in 0.7.2 release.
Should the build setup be reconsidered? PCAS remains unbundled, to be built outside of the EPICS 7 source tree. Might be time to have a designated environment variable tell pcaspy where to find the PCAS library
I added the check of PCAS environment variable in case no bundled pcas is found. https://github.com/paulscherrerinstitute/pcaspy/commit/ae786ccb68bc08acdf505700755ceb2493de768c
Excellent, thank you!
pcaspy expects to find cas and gdd in the EPICSBASE directory. With EPICS 7, pcas has been unbundled as https://github.com/epics-modules/pcas. So when building, you end with for example this directory layout:
The original setup.py will fail to find the cas and gdd include and library files because it only checks for EPICSBASE:
One possible fix would be to not only require an EPICSBASE environment variable but also a new PCAS environment variable.
As a hack, below is a setup.py where I simply added the relative
../pcas-4.13.2/..
to the include and library paths to get it compiled on Linux.