Repository navigation
tests: tool-frame checks the helpers as a realtime component - #4673
Conversation
The test compiled kins_util.c into a userspace program with -DULAPI. Since kins_util.c exports its helpers for switchkins_core, EXPORT_SYMBOL is undefined there, which GCC 13 lets through as an implicit int and GCC 14 rejects, so the test failed to build on GCC 14. The checks now run in a component loaded after switchkins_core, which exports the helpers, the way tests/kins-jacobian checks the kinematics modules. A failed check fails the load. The checks themselves are unchanged. Reported by hdiethelm in LinuxCNC#4670. Fixes LinuxCNC#4670
|
@BsAtHome tests/blendmath has the same GCC 14 failure as tests/tool-frame here. Since #4643, blendmath.c has The test checks only two functions, But these are plain vector helpers, and gomath already has |
Essentially, moving it all into one library would save us from having to look all around. Consolidating it would be step two, if that is necessary. I have currently no detailed overview who is using what. But it seems that the go routines are only in |
|
Thanks for the fix! tests/blendmath has indeed the same problem since the last merge to master. But no hurry, i can work around it with |
|
Hmm, I assume that all code using EXPORT_SYMBOL should be built with There are a few tests using gcc: They are probably all problematic: Just as a starter, they take gcc and not clang, even if you build linuxcnc with clang or define a different gcc version. Would it make sense to add a submakefile for the tests and not build in a .sh? |
|
@hdiethelm thanks. tests/blendmath is fixed in #4676: its two functions move into posemath and the test becomes a component loaded after tpmod, like tool-frame here. That PR also removes gomath, which answers the consolidation question above. The static_assert guard makes sense to me as a separate rtapi.h change. Shared code such as hal_lib.c already wraps its exports in On gcc in test.sh: tests of module code are becoming halcompile'd components, which also use the configured compiler. Of the others, lowlevel/emcmot-error-mpsc still compiles tree sources (emcmotutil.c, dbuf.c) and is the next candidate; mutex, ini_api_c and header-sanity only build their own files. |
The test compiled kins_util.c into a userspace program with -DULAPI. Since kins_util.c exports its helpers for switchkins_core, EXPORT_SYMBOL is undefined there, which GCC 13 lets through as an implicit int and GCC 14 rejects, so the test failed to build on GCC 14. CI's rip-and-test job runs GCC 13, and the trixie and sid jobs skip the test, so it stayed green.
The checks now run in a component loaded after switchkins_core, which exports the helpers, the way tests/kins-jacobian checks the kinematics modules. A failed check fails the load. The checks themselves are unchanged.
tests/blendmath has the same problem since #4643 (EXPORT_SYMBOL(pmCircleEffectiveMinRadius)); that one is not addressed here.
Fixes #4670. Thanks to hdiethelm for the report and the bisect.