Repository navigation
Test tests/tool-frame fails locally #4670
Copy link
Copy link
Closed
Description
@grandixximo Probably for you, after re-basing to master, I got:
Running test: tests/tool-frame
*** tests/tool-frame: FAIL: test run exited with 1
************** result:
************** stderr:
+ set -e
++ dirname /home/hannes/linuxcnc-src/include
+ TOPDIR=/home/hannes/linuxcnc-src
+ gcc -O2 -Wall -ffunction-sections -fdata-sections -DULAPI -I/home/hannes/linuxcnc-src/include -I/home/hannes/linuxcnc-src/src -I/home/hannes/linuxcnc-src/src/emc -o test_tool_frame test_tool_frame.c /home/hannes/linuxcnc-src/src/emc/kinematics/kins_util.c -L/home/hannes/linuxcnc-src/lib -Wl,-rpath,/home/hannes/linuxcnc-src/lib -Wl,--gc-sections -lposemath -llinuxcnchal -lm
/home/hannes/linuxcnc-src/src/emc/kinematics/kins_util.c:302:1: warning: data definition has no type or storage class
302 | EXPORT_SYMBOL(identityKinematicsAxisJointsBitmap);
| ^~~~~~~~~~~~~
/home/hannes/linuxcnc-src/src/emc/kinematics/kins_util.c:302:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
/home/hannes/linuxcnc-src/src/emc/kinematics/kins_util.c:302:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
/home/hannes/linuxcnc-src/src/emc/kinematics/kins_util.c:1307:1: warning: data definition has no type or storage class
1307 | EXPORT_SYMBOL(map_coordinates_to_jnumbers);
| ^~~~~~~~~~~~~
...
This fixes it:
diff --git a/tests/tool-frame/test.sh b/tests/tool-frame/test.sh
index 2dae535797..e4d064accb 100755
--- a/tests/tool-frame/test.sh
+++ b/tests/tool-frame/test.sh
@@ -7,7 +7,7 @@ TOPDIR=$(dirname "$HEADERS")
# kins_util.c holds the shared kinematics helpers. Only the tool frame ones
# are exercised here, so build with function sections and let the linker drop
# the rest rather than dragging in the HAL pin setup the others need.
-gcc -O2 -Wall -ffunction-sections -fdata-sections -DULAPI \
+gcc -O2 -Wall -ffunction-sections -fdata-sections -DRTAPI \
-I"$HEADERS" -I"$TOPDIR/src" -I"$TOPDIR/src/emc" \
-o test_tool_frame test_tool_frame.c "$TOPDIR/src/emc/kinematics/kins_util.c" \
-L"$LIBDIR" -Wl,-rpath,"$LIBDIR" -Wl,--gc-sections \Now, what I don't understand is, why this works in CI but not on my PC on master branch. DULAPI does not define EXPORT_SYMBOL in rtapi.h so it should always fail.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
hdiethelm commentedon Oct 11, 2026
Bisect shows this commit: b4b19d7
This makes sense, it adds
EXPORT_SYMBOLBsAtHome commentedon Oct 12, 2026
Doing compiles in tests is very hard and is prone to failure. That is why I have been pressing to do this is components, where halcompile can help you.
grandixximo commentedon Oct 12, 2026
That is #4673, I might have done something right 🤯
tests: tool-frame checks the helpers as a realtime component