DiamondLightSource / pmac

Driver for the Delta Tau PMAC motion controller family.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error on vxWorks

MarkRivers opened this issue · comments

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.