Skip to content

Test tests/tool-frame fails locally #4670

Closed

Description

@hdiethelm

@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.

Activity

  1. hdiethelm commented on Oct 11, 2026

    @hdiethelm
    ContributorAuthor

    Bisect shows this commit: b4b19d7
    This makes sense, it adds EXPORT_SYMBOL

  2. BsAtHome commented on Oct 12, 2026

    @BsAtHome
    Contributor

    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.

  3. grandixximo commented on Oct 12, 2026

    @grandixximo
    Contributor

    That is #4673, I might have done something right 🤯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions