Skip to content

axis: link _togl with -lGL (partially addresses #4034)#4042

Open
grandixximo wants to merge 1 commit into
LinuxCNC:2.9from
grandixximo:fix-togl-arm64
Open

axis: link _togl with -lGL (partially addresses #4034)#4042
grandixximo wants to merge 1 commit into
LinuxCNC:2.9from
grandixximo:fix-togl-arm64

Conversation

@grandixximo
Copy link
Copy Markdown
Contributor

@grandixximo grandixximo commented May 19, 2026

Summary

  • _toglmodule.c calls raw GLX (glXDestroyContext etc.). libepoxy is runtime dispatch only, does not provide link-time GLX symbols.
  • Without -lGL the built _togl.so has 9 unresolved glX* symbols. On x86_64 the transitive libepoxy -> libGL chain hides it; on aarch64 it fails import with undefined symbol: glXDestroyContext.
  • Backport of the togl hunk from ceed26d (already on master).

Partially addresses #4034 (togl ImportError). The separate AXIS segfault on UTM/virgl/ANGLE is unrelated.

Test plan

  • Reproduced ImportError in qemu-user arm64 bookworm chroot with stock 2.9 build.
  • Confirmed -lGL adds libGL.so.1 to NEEDED and resolves all glX* symbols.
  • Verify x86_64 build still links cleanly (opened and tested axis UI works proper).

_toglmodule.c calls raw GLX functions directly; libepoxy only provides
runtime dispatch, not link-time GLX symbols. Without -lGL the resulting
_togl.so has unresolved glX* symbols and fails to import on aarch64,
where the transitive libepoxy -> libGL chain does not apply as it does
on x86_64.

Fixes the 'undefined symbol: glXDestroyContext' ImportError reported in
LinuxCNC#4034. Does not fix the AXIS segfault, which appears to originate in
the UTM virgl/ANGLE GL stack on Apple Silicon and is unrelated.

Backport of the togl hunk from ceed26d.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant