Skip to content

libatomic.a dependency causes issues when building on Arch Linux #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
csd4ni3l opened this issue May 18, 2025 · 2 comments
Open

libatomic.a dependency causes issues when building on Arch Linux #616

csd4ni3l opened this issue May 18, 2025 · 2 comments
Assignees

Comments

@csd4ni3l
Copy link

Nuitka (and probably other py-to-exe software) tries to use libatomic.a instead of libatomic.so, which crashes gcc or other compilers.
In Arch Linux, libatomic.a does not exist anymore.
replacing compiler flags from -l:libatomic.a to -latomic fixes the issue, the dynamic version of libatomic is always available.

Example error:

gcc -o /home/csd4ni3l/Documents/Python3/shatterstack/test.dist/test -s -z noexecstack -export-dynamic -Wl,-R,'$ORIGIN' -Wl,--disable-new-dtags @"./@link_input.txt" -L/home/csd4ni3l/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib -ldl -lm -lpython3.11 -ldl -lpthread -lutil -lrt -lm -l:libatomic.a -l:libatomic.a
/usr/bin/ld: cannot find -l:libatomic.a: No such file or directory
/usr/bin/ld: cannot find -l:libatomic.a: No such file or directory
collect2: error: ld returned 1 exit status
@csd4ni3l
Copy link
Author

Nuitka issue: Nuitka/Nuitka#3474

@geofft geofft self-assigned this May 18, 2025
@geofft
Copy link
Collaborator

geofft commented May 18, 2025

I think this is leaking out from our internal use of -l:libatomic.a (see cpython-unix/extension-modules.yml), the original purpose of which was to avoid needing libatomic on end user systems, but unfortunately the Python extension build process leaks flags from how Python itself was built, which is probably why you're getting that on your build command line.

We have since started also using libatomic.so on some platforms; see #410. It may be the case that we can actually assume there's a platform libatomic.so everywhere.

Alternatively, we should be able to stop leaking this command line flag.

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

No branches or pull requests

2 participants