Compile error on vxWorks
When I try to build the master branch (or 2-4-10) on vxWorks 6.9.4.1 I get the following error:
make[3]: Entering directory `/home/epics/devel/pmac-2-5-13/pmacApp/pmacAsynVMEPortSrc/O.vxWorks-ppc32'
/usr/local/vw/vxWorks-6.9.4/gnu/4.3.3-vxworks-6.9/x86-linux2/bin/ccppc -DCPU=PPC32 -DvxWorks=vxWorks -include /usr/local/vw/vxWorks-6.9.4/vxworks-6.9/target/h/vxWorks.h -O2 -Wall -Werror-implicit-function-declaration -DSTATUS_RECORD -mstrict-align -mlongcall -fno-builtin -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/vxWorks -I../../../include -I/corvette/usr/local/epics-devel/base-7.0.5/include/compiler/gcc -I/corvette/usr/local/epics-devel/base-7.0.5/include/os/vxWorks -I/corvette/usr/local/epics-devel/base-7.0.5/include -I/corvette/home/epics/devel/asyn-4-42/include -I/corvette/home/epics/devel/calc-3-7-3/include -I/corvette/home/epics/devel/motor-7-0/include -I/corvette/home/epics/devel/busy-1-7-2/include -I/usr/local/vw/vxWorks-6.9.4/vxworks-6.9/target/h -I/usr/local/vw/vxWorks-6.9.4/vxworks-6.9/target/h/wrn/coreip -c ../devPmacRam.c
In file included from /corvette/usr/local/epics-devel/base-7.0.5/include/dbAccess.h:20,
from ../devPmacRam.c:89:
/corvette/usr/local/epics-devel/base-7.0.5/include/dbBase.h:164: warning: 'rset' is deprecated
In file included from /corvette/usr/local/epics-devel/base-7.0.5/include/dbAccess.h:24,
from ../devPmacRam.c:89:
/corvette/usr/local/epics-devel/base-7.0.5/include/dbAccessDefs.h:211: warning: 'rset' is deprecated
../devPmacRam.c: In function 'devPmacRamEvent_read':
../devPmacRam.c:1075: error: incompatible types in assignment
make[3]: *** [devPmacRam.o] Error 1
make[3]: Leaving directory `/home/epics/devel/pmac-2-5-13/pmacApp/pmacAsynVMEPortSrc/O.vxWorks-ppc32'
This error appears to be because this source file has not been made compatible with recent versions of base, where the VAL field of the eventRecord changed from epicsUInt16 to char[40].
I had to make the following changes to pmacAsynVMEPortSrc/Makefile to compile on base 7.0.5 with vxWorks 6.9.4.1.
# The following are compiled and added to the Support library
OBJLIB_SRCS += devPmacMbx.c
-OBJLIB_SRCS += devPmacRam.c
+#OBJLIB_SRCS += devPmacRam.c
OBJLIB_SRCS += drvPmac.c
OBJLIB_SRCS += pmacVme.c
OBJLIB_SRCS += pmacSerial.c
@@ -30,7 +30,7 @@ OBJLIB_SRCS += pmacDriver.c
OBJLIB_SRCS += asynUploadFile.c
OBJLIB_SRCS += statusRecord.c
OBJLIB_SRCS += devStatusSoft.c
-OBJLIB_SRCS += tsubRecord.c
+#OBJLIB_SRCS += tsubRecord.c
@MarkRivers Thanks for this.
I don't think DLS can build this module for EPICS7 against our version of VxWorks. We are on VxWorks 5.5.1 which has compiler C99, C++03.
I'm pretty sure that the module will work without tsubRecord but I thought that devPmacRam is required. Did you manage to make this run?
@JimboMonkey are your beamlines now using this driver in production on VME? Can you comment on Mark's changes please?
I'm pretty sure that the module will work without tsubRecord but I thought that devPmacRam is required. Did you manage to make this run?
I have not tried to run it on vxWorks, only to get it to compile the pmac and motorSymetry modules. When I build for linux-x86_64 it also cross-compiles for vxWorks-ppc32, and that was failing.
So it turns out that we are not using this driver on any of our VME motion controllers. It's widely used on geobricks (turbo pmac 2) at DLS.
So we could perhaps drop the requirement for C++03. However I have no way of testing such a change.
It seems like it should be pretty easy to fix devPmacRam.c to work with recent versions of base.
Sure, I'll push a change to make it compile.
@peteleicester, would you say that these changes are still valid after the PR https://github.com/DiamondLightSource/pmac/pull/129
My changes are for RTEMS only. There is really no point in building it for vxVworks, it will not work as it stands. The pmac module has never worked with vxWorks and Diamond does not have an up to date version of VxWorks to even try developing it to do so. I guess someone else in the community may develop a VxWorks branch at some stage. @LeandroMartinsdS I did remove the vxWorks build from pmacApp/pmacAsynVMESrc/Makefile so I dont think the changes are required.
Sure, I'll push a change to make it compile.
I encountered a similar error when building the branch 2-6-2b1 with EPICS base version 'base-7.0.8.1-DEV' on vxWorks 6.9.4. What is the compatible version of EPICS base for this branch?
/s15dserv/APSshare/vw/vxWorks-6.9.4/gnu/4.3.3-vxworks-6.9.4/x86-linux2/bin/ccppc -DCPU=PPC32 -DvxWorks=vxWorks -include /s15dserv/APSshare/vw/vxWorks-6.9.4/vxworks-6.9.4/target/h/vxWorks.h -O2 -Wall -Werror-implicit-function-declaration -DSTATUS_RECORD -mstrict-align -mlongcall -fno-builtin -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/vxWorks -I../../../include -I/usr/local/epics/base/include/compiler/gcc -I/usr/local/epics/base/include/os/vxWorks -I/usr/local/epics/base/include -I/home/chem_epics/chemmatCARS/synApps/support/alive-R1-4-1/include -I/home/chem_epics/chemmatCARS/synApps/support/asyn-R4-44-2/include -I/home/chem_epics/chemmatCARS/synApps/support/autosave-R5-11/include/os/vxWorks -I/home/chem_epics/chemmatCARS/synApps/support/autosave-R5-11/include -I/home/chem_epics/chemmatCARS/synApps/support/busy-R1-7-4/include -I/home/chem_epics/chemmatCARS/synApps/support/calc-R3-7-5/include -I/home/chem_epics/chemmatCARS/synApps/support/iocStats-3-1-16/include/os/vxWorks -I/home/chem_epics/chemmatCARS/synApps/support/iocStats-3-1-16/include -I/home/chem_epics/chemmatCARS/synApps/support/ether_ip-ether_ip-3-3/include -I/home/chem_epics/chemmatCARS/synApps/support/ip330-R2-10/include -I/home/chem_epics/chemmatCARS/synApps/support/ipac-2-16/include -I/home/chem_epics/chemmatCARS/synApps/support/LabJack-R3-0/include -I/home/chem_epics/chemmatCARS/synApps/support/lua-R3-1/include -I/home/chem_epics/chemmatCARS/synApps/support/mca-R7-10/include/os/vxWorks -I/home/chem_epics/chemmatCARS/synApps/support/mca-R7-10/include -I/home/chem_epics/chemmatCARS/synApps/support/measComp-R4-2/include -I/home/chem_epics/chemmatCARS/synApps/support/modbus-R3-3/include -I/home/chem_epics/chemmatCARS/synApps/support/motor-R7-3-1/include -I/home/chem_epics/chemmatCARS/synApps/support/optics-R2-14/include -I/home/chem_epics/chemmatCARS/synApps/support/pmac-2-6-1/include -I/home/chem_epics/chemmatCARS/synApps/support/quadEM-R9-5/include -I/home/chem_epics/chemmatCARS/synApps/support/scaler-4-1/include -I/home/chem_epics/chemmatCARS/synApps/support/sequencer-mirror-R2-2-9/include -I/home/chem_epics/chemmatCARS/synApps/support/softGlue-R2-8-4/include -I/home/chem_epics/chemmatCARS/synApps/support/sscan-R2-11-6/include -I/home/chem_epics/chemmatCARS/synApps/support/std-R3-6-4/include -I/home/chem_epics/chemmatCARS/synApps/support/StreamDevice-2-8-24/include -I/home/chem_epics/chemmatCARS/synApps/support/vac-R1-9-2/include -I/home/chem_epics/chemmatCARS/synApps/support/vme-R2-9-5/include -I/home/chem_epics/chemmatCARS/synApps/support/allenBradley-2-3/include -I/home/chem_epics/chemmatCARS/synApps/support/areaDetector-R3-12-1/ADCore/include -I/home/chem_epics/chemmatCARS/synApps/support/areaDetector-R3-12-1/ADSupport/include/os/vxWorks -I/home/chem_epics/chemmatCARS/synApps/support/areaDetector-R3-12-1/ADSupport/include -I/home/chem_epics/chemmatCARS/synApps/support/PyDevice/include -I/home/chem_epics/chemmatCARS/synApps/support/ChemMat/include -I/s15dserv/APSshare/vw/vxWorks-6.9.4/vxworks-6.9.4/target/h -I/s15dserv/APSshare/vw/vxWorks-6.9.4/vxworks-6.9.4/target/h/wrn/coreip -c ../devPmacRam.c
In file included from /usr/local/epics/base/include/dbAccess.h:20,
from ../devPmacRam.c:89:
/usr/local/epics/base/include/dbBase.h:168: warning: 'rset' is deprecated
In file included from /usr/local/epics/base/include/dbAccess.h:24,
from ../devPmacRam.c:89:
/usr/local/epics/base/include/dbAccessDefs.h:210: warning: 'rset' is deprecated
../devPmacRam.c: In function 'devPmacRamEvent_read':
../devPmacRam.c:1075: error: incompatible types in assignment
make[3]: *** [/usr/local/epics/base/configure/RULES_BUILD:259: devPmacRam.o] Error 1
make[3]: Leaving directory '/home/chem_epics/chemmatCARS/synApps/support/pmac-2-6-1/pmacApp/pmacAsynVMEPortSrc/O.vxWorks-ppc32'