epics-modules / motor

APS BCDA synApps module: motor
https://epics-modules.github.io/motor/
20 stars 47 forks source link

Add epics-modules ci-scripts for Travis CI #152

Closed BenBradnick closed 4 years ago

BenBradnick commented 4 years ago

There is currently an issue with the mingw 64 bit Windows build during the following:

/usr/bin/x86_64-w64-mingw32-g++              -D_MINGW -Wno-format     -O3   -Wall       -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL   -I. -I../O.Common -I. -I. -I.. -I/home/travis/build/BenBradnick/motor/include/compiler/gcc -I/home/travis/build/BenBradnick/motor/include/os/WIN32 -I/home/travis/build/BenBradnick/motor/include   -I/home/travis/build/BenBradnick/motor/include   -I/home/travis/.cache/asyn-R4-38/include   -I/home/travis/.cache/seq-R2-2-8/include   -I/home/travis/.cache/busy-R1-7-1/include   -I/home/travis/.cache/ipac-master/include -I/home/travis/.cache/base-7.0/include/compiler/gcc -I/home/travis/.cache/base-7.0/include/os/WIN32 -I/home/travis/.cache/base-7.0/include        -o drvOms.obj -c ../drvOms.cc

The actual error is the loss of precision when casting:

../drvOms.cc: In function ‘RTN_STATUS omsSetup(int, void*, unsigned int, int, int)’:

../drvOms.cc:1038:23: error: cast from ‘void*’ to ‘epicsUInt32 {aka unsigned int}’ loses precision [-fpermissive]
kmpeters commented 4 years ago

It looks like the 64-bit windows build is failing due to the Newport support:

https://travis-ci.org/epics-modules/motor/jobs/650402968

MarkRivers commented 4 years ago

It looks like the 64-bit windows build is failing due to the Newport support:

When I look at the log file I don't see any errors in the Newport support. I see this error in the Oms support:

../drvOms.cc: In function ‘RTN_STATUS omsSetup(int, void*, unsigned int, int, int)’:
../drvOms.cc:1038:23: error: cast from ‘void*’ to ‘epicsUInt32 {aka unsigned int}’ loses precision [-fpermissive]
     if ((epicsUInt32) addrs & 0xF)
                       ^
../drvOms.cc: At global scope:
../drvOms.cc:827:13: warning: ‘void motorIsr(int)’ defined but not used [-Wunused-function]
 static void motorIsr(int card)
             ^
../drvOms.cc:975:13: warning: ‘void motorIsrDisable(int)’ defined but not used [-Wunused-function]
 static void motorIsrDisable(int card)
             ^
/home/travis/.cache/base-7.0/configure/RULES_BUILD:244: recipe for target 'drvOms.obj' failed
make[5]: *** [drvOms.obj] Error 1
kmpeters commented 4 years ago

When I look at the log file I don't see any errors in the Newport support. I see this error in the Oms support:

I was mistaken. I didn't scroll back far enough to see the Oms error and the "Waiting for unfinished jobs" message:

https://travis-ci.org/epics-modules/motor/jobs/650402968#L10725

BenBradnick commented 4 years ago

I'll take a look at the motorOms submodule and get it building for 64 bit Windows by itself.

tboegi commented 4 years ago

@BenBradnick ; @kmpeters I managed to fix the Oms error: https://github.com/epics-motor/motorOms/pull/3

After that, the next problem is in the Hytec module: https://travis-ci.com/github/tboegi/motor/jobs/296984548?utm_medium=notification&utm_source=email

I wonder what the best way forward is:

MarkRivers commented 4 years ago

I wonder what the best way forward is:

  • Don't build the motor under Win64 at all
  • Exclude some modules in the Win64 build (How do we do that ?)
  • Fix all modules, one by one.

It is easy to only build a module (e.g. Hytec) on specific operating systems (e.g. Linux and vxWorks) by putting this in the Makefile:

LIBRARY_IOC_Linux += HytecMotor
LIBRARY_IOC_vxWorks += HytecMotor

Then it won't try to build on Windows. The Hytec really does not need to build on Windows because I don't know of any EPICS Windows drivers for Industry Pack carrier cards.

I really doubt if anyone is actually using the Hytec driver anymore. It is worth asking on tech-talk and if not then remove it.

tboegi commented 4 years ago

Thanks @MarkRivers for the hint changing the Makefile: https://github.com/epics-motor/motorHytec/pull/2

I found another problem here: https://github.com/epics-motor/motorOmsAsyn/pull/1

I would be happy to receive feedback

kmpeters commented 4 years ago

I think I should merge this PR and then we can address all the new issues it finds in the individual driver modules. @BenBradnick, are there any more commits that need to be pushed to this branch before it is merged?

BenBradnick commented 4 years ago

@kmpeters I don't have any other commits for this branch.

kmpeters commented 4 years ago

@BenBradnick, thanks for this PR.

tboegi commented 4 years ago

Folks, the travis build is now completely broken (here a clip from tboegi, same problem in epics-modules/motor)

Does anybody have a clue how to fix it ?

make[4]: Entering directory '/home/travis/build/tboegi/motor/modules/motorNewport/configure/O.linux-x86_64' perl -CSD /home/travis/.cache/base-7.0/bin/linux-x86_64/convertRelease.pl checkRelease perl -CSD /home/travis/.cache/base-7.0/bin/linux-x86_64/convertRelease.pl checkRelease Definition of SUPPORT conflicts with MOTOR support. In this application or module, a RELEASE file conflicts with MOTOR at /home/travis/build/tboegi/motor Here: SUPPORT = /home/travis/build/tboegi/motor/.. MOTOR: SUPPORT = /path/to/support

tboegi commented 4 years ago

May be I found it.... A possible solution is here: https://github.com/epics-modules/motor/pull/156

kmpeters commented 4 years ago

We could also just set CHECK_RELEASE = WARN. I'll take a closer look at the scripts to see where the best place to fix this is.