Changes necessary to compile the pyDevSup module for RHEL8 and EPICS 7.0.7

This commit is contained in:
2024-01-12 13:52:35 +01:00
parent 87d1a3999c
commit bcce0bbab2
5 changed files with 22 additions and 20 deletions

View File

@ -8,26 +8,28 @@ require does not know about python and its modules at all.
The good news is that it can be made to work but requires a few manual steps. The good news is that it can be made to work but requires a few manual steps.
1) Build the pyDevSup extension in the normal EPICS way. 1) Build the pyDevSup extension in the normal EPICS way in the master branch.
2) This generates a pythonXX/$(EPICS_ARCH)/devsup directory. Copy this directory to 2) This generates a pythonXX/$(EPICS_ARCH)/devsup directory. Copy this directory to
a safe place. a safe place.
3) Build the module using the GNUMakefile as normal and install it 3) Switch to the module branch and Build the module using the GNUMakefile as
normal and install it
4) Copy the saved devsup directory in some place into pyDevSup's module hierarchy. 4) Copy the saved devsup directory in some place into pyDevSup's module hierarchy.
For example: /ioc/modules/pyDevSup/koennecke/R3.14.12/lib/devsup For example: /ioc/modules/pyDevSup/1.2.sinq/R7.0.7/lib/RHEL8-x86_64/devsup
5) Copy the library /ioc/modules/pyDevSup/koennecke/R3.14.12/lib/${EPICS_HOST_ARCH}/libDevSup.so to
/ioc/modules/pyDevSup/koennecke/R3.14.12/lib/devsup/_dbapi.so
6) In order to successfuly load pyDevSup with require the directory underneath where ypu placed 6) In order to successfuly load pyDevSup with require the directory underneath where ypu placed
pydevsup needs to be on the python path. For example: pydevsup needs to be on the python path. For example:
/ioc/modules/pyDevSup/koennecke/R3.14.12/lib/ /ioc/modules/pyDevSup/1.2.sinq/R7.0.7/lib/RHEL8-x86_64
With this, one can at least run the testmodule.cmd script and it workd at least
for me.
Please use the module branch, I had to hack the initialisation of pyDevSup to make Please use the module branch, I had to hack the initialisation of pyDevSup to make
it work as a module. it work as a module.
For RHEL8, I had to remove a few static statements in dbdSet.c in order to solve a missing
symbols problem. I also had to modify the files in configure somewhat in order to point to
the proper python version and to suppress the many cross compilations attempted by the default
build.

View File

@ -23,11 +23,11 @@ PROD_DEPLIB_DIRS += $(PY_LIBDIRS)
INCLUDES += $(PY_INCDIRS:%=-I%) INCLUDES += $(PY_INCDIRS:%=-I%)
ifeq ($(HAVE_NUMPY),YES) #ifeq ($(HAVE_NUMPY),YES)
TARGET_CPPFLAGS += -DHAVE_NUMPY TARGET_CPPFLAGS += -DHAVE_NUMPY
else #else
$(error numpy required) #$(error numpy required)
endif #endif
#LIB_SYS_LIBS += python$(PY_LD_VER) #LIB_SYS_LIBS += python$(PY_LD_VER)
#PROD_SYS_LIBS += python$(PY_LD_VER) #PROD_SYS_LIBS += python$(PY_LD_VER)

View File

@ -19,7 +19,7 @@ CHECK_RELEASE = YES
# Set this when you only want to compile this application # Set this when you only want to compile this application
# for a subset of the cross-compiled target architectures # for a subset of the cross-compiled target architectures
# that Base is built for. # that Base is built for.
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 CROSS_COMPILER_TARGET_ARCHS = RHEL8-x86_64
# To install files into a location other than $(TOP) define # To install files into a location other than $(TOP) define
# INSTALL_LOCATION here. # INSTALL_LOCATION here.
@ -33,7 +33,7 @@ CHECK_RELEASE = YES
#IOCS_APPL_TOP = </IOC/path/to/application/top> #IOCS_APPL_TOP = </IOC/path/to/application/top>
# Default python version. # Default python version.
PY_VER=2.7 PY_VER=3.6.8
# Module will be build against this version of the # Module will be build against this version of the
# Python interpreter # Python interpreter

View File

@ -36,7 +36,7 @@ TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
## Required Modules ## ## Required Modules ##
# EPICS_BASE usually appears last so other apps can override stuff: # EPICS_BASE usually appears last so other apps can override stuff:
#EPICS_BASE=/usr/lib/epics EPICS_BASE=/usr/local/epics/base-7.0.7
-include $(TOP)/configure/RELEASE.local -include $(TOP)/configure/RELEASE.local
-include $(TOP)/../RELEASE.local -include $(TOP)/../RELEASE.local

View File

@ -373,15 +373,15 @@ typedef struct {
DEVSUPFUN linconv; DEVSUPFUN linconv;
} dset6; } dset6;
static dset6 pydevsupComSpec = {{6, (DEVSUPFUN)&report, (DEVSUPFUN)&init, dset6 pydevsupComSpec = {{6, (DEVSUPFUN)&report, (DEVSUPFUN)&init,
(DEVSUPFUN)&init_record, (DEVSUPFUN)&init_record,
(DEVSUPFUN)&get_iointr_info}, (DEVSUPFUN)&get_iointr_info},
(DEVSUPFUN)&process_record}; (DEVSUPFUN)&process_record};
static dset6 pydevsupComOut = {{6, (DEVSUPFUN)&report, (DEVSUPFUN)&init, dset6 pydevsupComOut = {{6, (DEVSUPFUN)&report, (DEVSUPFUN)&init,
(DEVSUPFUN)&init_record2, (DEVSUPFUN)&init_record2,
(DEVSUPFUN)&get_iointr_info}, (DEVSUPFUN)&get_iointr_info},
(DEVSUPFUN)&process_record}; (DEVSUPFUN)&process_record};
static dset6 pydevsupComIn = {{6, (DEVSUPFUN)&report, (DEVSUPFUN)&init, dset6 pydevsupComIn = {{6, (DEVSUPFUN)&report, (DEVSUPFUN)&init,
(DEVSUPFUN)&init_record, (DEVSUPFUN)&init_record,
(DEVSUPFUN)&get_iointr_info}, (DEVSUPFUN)&get_iointr_info},
(DEVSUPFUN)&process_record2}; (DEVSUPFUN)&process_record2};