Skip to content

Compilation is broken with HAVE_DYNAMIC_LOADING=0 #122907

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

Closed
tritao opened this issue Aug 11, 2024 · 5 comments
Closed

Compilation is broken with HAVE_DYNAMIC_LOADING=0 #122907

tritao opened this issue Aug 11, 2024 · 5 comments
Assignees
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-emscripten topic-importlib type-bug An unexpected behavior, bug, or error

Comments

@tritao
Copy link

tritao commented Aug 11, 2024

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

@tritao tritao added the type-bug An unexpected behavior, bug, or error label Aug 11, 2024
@ericsnowcurrently
Copy link
Member

I'll take a look.

@brettcannon
Copy link
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).

@ericsnowcurrently
Copy link
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.

@ericsnowcurrently ericsnowcurrently self-assigned this Aug 12, 2024
ericsnowcurrently added a commit that referenced this issue Aug 13, 2024
As of 529a160 (gh-118204), building with HAVE_DYNAMIC_LOADING stopped working.  This is a minimal fix just to get builds working again.  There are actually a number of long-standing deficiencies with HAVE_DYNAMIC_LOADING builds that need to be resolved separately.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 13, 2024
…h-122952)

As of 529a160 (pythongh-118204), building with HAVE_DYNAMIC_LOADING stopped working.  This is a minimal fix just to get builds working again.  There are actually a number of long-standing deficiencies with HAVE_DYNAMIC_LOADING builds that need to be resolved separately.
(cherry picked from commit ee1b8ce)

Co-authored-by: Eric Snow <[email protected]>
blhsing pushed a commit to blhsing/cpython that referenced this issue Aug 22, 2024
…h-122952)

As of 529a160 (pythongh-118204), building with HAVE_DYNAMIC_LOADING stopped working.  This is a minimal fix just to get builds working again.  There are actually a number of long-standing deficiencies with HAVE_DYNAMIC_LOADING builds that need to be resolved separately.
Yhg1s pushed a commit that referenced this issue Dec 3, 2024
) (#122984)

gh-122907: Fix Builds Without HAVE_DYNAMIC_LOADING Set (gh-122952)

As of 529a160 (gh-118204), building with HAVE_DYNAMIC_LOADING stopped working.  This is a minimal fix just to get builds working again.  There are actually a number of long-standing deficiencies with HAVE_DYNAMIC_LOADING builds that need to be resolved separately.
(cherry picked from commit ee1b8ce)

Co-authored-by: Eric Snow <[email protected]>
@ZeroIntensity
Copy link
Member

Doing some triaging. Is this all good to close?

@freakboy3742
Copy link
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
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-emscripten topic-importlib type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

6 participants