Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Static musl build regression (3.14+): duplicate _Py_LibHacl_* symbols from duplicated Modules/_hacl/*.o #146264

Open
Labels
3.14bugs and security fixes3.15new features, bugs and security fixesOS-unsupportedbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error
@booxter

Description

@booxter

Bug report

Bug description:

This appears to be a regression: in our static musl packaging, Python3.13 built successfully, but failures started in3.14 and are still present in3.15.0a7.

When building CPython3.15.0a7 as a fully static musl target, final linking ofpython andPrograms/_testembed fails with duplicate_Py_LibHacl_* symbols.

The link command includes severalModules/_hacl/*.o files twice, thenld reports multiple definitions for symbols from those objects.

I knowx86_64-unknown-linux-musl is not a PEP 11 supported tier, but this looks like a generic linker-input duplication issue in the HACL link flags (similar class to#133042), not musl-specific behavior.

Reproduction:

I’m reproducing this from nixpkgs static Python packaging, but the relevant configure mode is:

./configure \  --disable-shared \  --enable-static \  --host=x86_64-unknown-linux-musl \  --build=x86_64-unknown-linux-gnu \  --with-lto \  LDFLAGS=-static \  MODULE_BUILDTYPE=static \  ac_cv_func_dlopen=nomake -j

Build fails while linkingpython andPrograms/_testembed.

Evidence from build log:

Configure/version context:

  • source:Python-3.15.0a7
  • host:x86_64-unknown-linux-musl
  • compiler:x86_64-unknown-linux-musl-gcc
  • static build mode:--enable-static --disable-shared LDFLAGS=-static MODULE_BUILDTYPE=static

In both-o python and-o Programs/_testembed link commands, these appear twice:

Modules/_hacl/Hacl_Hash_MD5.oModules/_hacl/Hacl_Hash_SHA1.oModules/_hacl/Hacl_Hash_SHA2.oModules/_hacl/Hacl_Hash_SHA3.oModules/_hacl/Hacl_Hash_Blake2s.oModules/_hacl/Hacl_Hash_Blake2b.oModules/_hacl/Lib_Memzero0.oModules/_hacl/Hacl_Hash_Blake2s_Simd128.oModules/_hacl/Hacl_Hash_Blake2b_Simd256.o

Object count summary from the-o python line:

  • total HACL objects passed:20
  • unique HACL objects:11
  • 9 hash/memzero objects are each passed exactly twice
  • Hacl_HMAC.o andHacl_Streaming_HMAC.o appear once

Example linker failures:

ld: Modules/_hacl/Hacl_Hash_MD5.o: multiple definition of `_Py_LibHacl_Hacl_Hash_MD5_init'; ... first defined hereld: Modules/_hacl/Hacl_Hash_SHA1.o: multiple definition of `_Py_LibHacl_Hacl_Hash_SHA1_init'; ... first defined here...collect2: error: ld returned 1 exit statusmake: *** [Makefile:1151: python] Error 1make: *** [Makefile:1841: Programs/_testembed] Error 1

Expected behavior:

Static builds should not duplicate identical HACL object files on the final link line forpython /_testembed.

Related issues/PRs:

If useful, I can attach the full failing link command and full build log.


Note: This report was prepared with the help of Codex.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15new features, bugs and security fixesOS-unsupportedbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp