Skip to content

uv-Python build fail due to missing libatomic.a on arch #3474

Closed

Description

@csd4ni3l

Nuitka and Python version:
2.7.3
Commercial: None
Python: 3.11.11 (main, Mar 17 2025, 21:02:09) [Clang 20.1.0 ]
Flavor: Python Build Standalone
Executable: ~/.cache/uv/archive-v0/d47QaPIKtn6EVRot-tWZw/bin/python
OS: Linux
Arch: x86_64
Distribution: Arch None
Version C compiler: /usr/lib/ccache/bin/gcc (gcc 15.1.1).

There are no packages involved. Even a simple hello world crashes.

print("Hello World")

The problem is that (probably in the new gcc 15 update) libatomic.a is not included in any way. This causes both dynamic and static libpython builds to fail on Arch.
I also tested on develop and factory branches and those fail as well as the current latest. (2.7.3)

Scon logs:

gcc -o /home/csd4ni3l/Documents/Python3/shatterstack/test.dist/test -s -z noexecstack -export-dynamic -Wl,-rpath=/home/csd4ni3l/.local/share/uv/python/cpython-3.11.11-linux-x86_64-gnu/lib -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
scons: *** [/home/csd4ni3l/Documents/Python3/shatterstack/test.dist/test] Error 1
scons: internal stack trace:
  File "/home/csd4ni3l/.cache/uv/archive-v0/zAKT2UNcggJO80PQry8Up/lib/python3.11/site-packages/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Job.py", line 258, in run
    task.execute()
  File "/home/csd4ni3l/.cache/uv/archive-v0/zAKT2UNcggJO80PQry8Up/lib/python3.11/site-packages/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Script/Main.py", line 206, in execute
    SCons.Taskmaster.OutOfDateTask.execute(self)
  File "/home/csd4ni3l/.cache/uv/archive-v0/zAKT2UNcggJO80PQry8Up/lib/python3.11/site-packages/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Taskmaster.py", line 255, in execute
    self.targets[0].build()
  File "/home/csd4ni3l/.cache/uv/archive-v0/zAKT2UNcggJO80PQry8Up/lib/python3.11/site-packages/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Node/__init__.py", line 766, in build
    self.get_executor()(self, **kw)
  File "/home/csd4ni3l/.cache/uv/archive-v0/zAKT2UNcggJO80PQry8Up/lib/python3.11/site-packages/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Executor.py", line 397, in __call__
    return _do_execute_map[self._do_execute](self, target, kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/csd4ni3l/.cache/uv/archive-v0/zAKT2UNcggJO80PQry8Up/lib/python3.11/site-packages/nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Executor.py", line 131, in execute_action_list
    raise status    # TODO pylint E0702: raising int not allowed
    ^^^^^^^^^^^^
scons: building terminated because of errors.
FATAL: Failed unexpectedly in Scons C backend compilation.
Nuitka:WARNING:     Complex topic! More information can be found at https://nuitka.net/info/scons-backend-failure.html
Nuitka-Reports: Compilation crash report written to file 'nuitka-crash-report.xml'.

Activity

  1. csd4ni3l commented on May 18, 2025

    @csd4ni3l
    ContributorAuthor

    Turns out, it might be uv instead of arch here

  2. kayhayen commented on May 19, 2025

    @kayhayen
    Member

    Please don't be shy to provide more output, esp. from --show-scons, but indeed "Python Build Standalone" doesn't do or default to --static-libpython and issues a call to action warning to fix them. At some point in the future, it's probably going to work starting with some newer uv-Python versions.

    Until this time it's a duplicate of #3331 for which I am closing this.

  3. changed the title [-]Arch Linux builds fail due to missing libatomic.a[/-] [+]uv-Python build fail due to missing libatomic.a on arch[/+] on May 19, 2025
  4. self-assigned this
    on May 19, 2025
  5. WilliamStam commented on Oct 1, 2025

    @WilliamStam

    can confirm that in my case (red hat 8.9) using uv python leads to the error /usr/bin/ld: cannot find -l:libatomic.a but if you install python normally (or in my case used the old install - python3.6) it works fine.

    $ python3 --version
    Python 3.6.8
    
    
    $ source .venv/bin/activate
    $ python --version
    Python 3.6.8
    
    $ pip install nuitka
    ...
    $ python -m nuitka src/main.py --standalone --onefile --output-filename=testing --output-dir=build
    ...
    
    $ ll build
    total 16328
    drwxr-xr-x 3     4096 Oct  1 11:26 main.build
    drwxr-xr-x 2     4096 Oct  1 11:26 main.dist
    drwxr-xr-x 3     166 Oct  1 11:26 main.onefile-build
    -rwxr-xr-x 1  12700058 Oct  1 11:26 testing <--- YES!
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions