Closed kmpeters closed 4 years ago
@MarkRivers, can you elaborate on the problem that resulted in commit e3ec0a9042414144fc555348b7e11b233e3c3c15?
Have you successfully built motorSmarAct for VxWorks since that commit?
Do we need to figure out which version of VxWorks added rint?
It looks like VxWorks has had rint in math.h since at least Tornado 2.2.
That may depend on the specific target being compiled, some of the more obscure math.h functions like this were provided for m68k but not for PowerPC.
I see it in tornado22-ppc/target/h/math.h
on APSshare.
That doesn't mean it's actually implemented, the target/h/math.h header is generic and contains this comment above that block of declarations:
/* Miscellaneous math functions *
* Not available on all VxWorks architectures. */
@MarkRivers, can you elaborate on the problem that resulted in commit e3ec0a9?
The problem is that rint was being declared as a global function in smarActMCSMotorDriver.cpp. When I wrote the smarActSCUMotorDriver.cpp I also needed rint, but when I declared it global I got a conflict when linking because that function was multiply defined. Making it static fixed this issue.
Have you successfully built motorSmarAct for VxWorks since that commit?
No, I had not tried building on vxWorks. I just did that, and got the same error you did. Sorry about that.
No worries. I failed to do the necessary test builds during my rush to release R7-2, which would have caught all of the build problems. My penance was spending the day preparing R7-2-1.
That doesn't mean it's actually implemented, the target/h/math.h header is generic and contains this comment above that block of declarations:
/* Miscellaneous math functions * * Not available on all VxWorks architectures. */
@anjohnson, is there a way to tell if a version of VxWorks includes an implementation of rint at compile time? Does it depend on the decisions of the person preparing the board support packages?
I got Appveyor builds configured in asyn to do CI on Windows (Visual Studio and mingw). It's not hard, and would probably be worth doing in motor (and all synApps modules).
I'll check out asyn's appveyor config. I'd like to have CI for all the motor driver modules, so we don't need to wait until the motor submodules are updated to find a problem, but I haven't had a chance to do that yet.
is there a way to tell if a version of VxWorks includes an implementation of rint at compile time? Does it depend on the decisions of the person preparing the board support packages?
No, it was a CPU_FAMILY thing; some of the math functions that were implemented for the 68k didn't have equivalent versions written for the PowerPC or other CPU families. I just looked in the VxWorks-6.9 sources and build system though, and it seems that rint() may not be available for MIPS builds, but it is there for the PowerPC.
Commit e3ec0a9042414144fc555348b7e11b233e3c3c15 breaks builds on VxWorks: