Skip to content

Compilation is broken with HAVE_DYNAMIC_LOADING=0 #122907

Description

@tritao

Bug report

Bug description:

When compiling for Wasm with --disable-wasm-dynamic-linking, we end up with HAVE_DYNAMIC_LOADING=0, which is currently broken with the following linking errors:

wasm-ld: error: Python/import.o: undefined symbol: _Py_ext_module_loader_info_init_for_builtin
wasm-ld: error: Python/import.o: undefined symbol: _PyImport_RunModInitFunc
wasm-ld: error: Python/import.o: undefined symbol: _Py_ext_module_loader_result_apply_error
wasm-ld: error: Python/import.o: undefined symbol: _Py_ext_module_loader_result_clear
wasm-ld: error: Python/import.o: undefined symbol: _Py_ext_module_loader_result_clear
wasm-ld: error: Python/import.o: undefined symbol: _Py_ext_module_loader_info_clear
wasm-ld: error: Python/import.o: undefined symbol: _PyImport_RunModInitFunc
wasm-ld: error: Python/import.o: undefined symbol: _Py_ext_module_loader_result_apply_error
wasm-ld: error: Python/import.o: undefined symbol: _Py_ext_module_loader_result_clear

I believe its a regression introduced in 529a160.

@ericsnowcurrently, would you be able to take a look into fixing this?

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Aug 11, 2024
  2. ericsnowcurrently commented on Aug 12, 2024

    @ericsnowcurrently
    Member

    I'll take a look.

  3. brettcannon commented on Aug 12, 2024

    @brettcannon
    Member

    Is this for Emscripten of WASI? If it's for the former it's no longer officially supported as of CPython 3.13 (code for Emsripten will start being removed in CPython 3.14/main, I just haven't gotten around to doing the removal).

  4. ericsnowcurrently commented on Aug 12, 2024

    @ericsnowcurrently
    Member

    The problem manifests with HAVE_DYNAMIC_LOADING not set, regardless of any WASM-related build. I'll get builds without dynamic loading working again with a minimal change, but there are broader deficiencies to address. See gh-122950.

  5. added a commit that references this issue on Aug 13, 2024
  6. added a commit that references this issue on Aug 13, 2024
  7. added a commit that references this issue on Aug 22, 2024
  8. added a commit that references this issue on Dec 3, 2024
  9. ZeroIntensity commented on Jan 11, 2025

    @ZeroIntensity
    Member

    Doing some triaging. Is this all good to close?

  10. freakboy3742 commented on Jan 11, 2025

    @freakboy3742
    Contributor

    My read is that it is good to close; there's still a related issue, but that's being tracked by #122950.

    Also - for the benefit of posterity, Emscripten support is back on for 3.14 (or, at least, myself and @hoodmane... mostly @hoodmane) are trying to restore it to Tier 3.

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

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions