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
bpo-40280: Add --enable-wasm-dynamic-linking (GH-32253) #32253
Conversation
7cfc9d8
to
ad6a484
Compare
Maybe this should be called |
WASI does not support dynamic linking yet. It may get it in the future, https://helda.helsinki.fi/bitstream/handle/10138/337740/Dynamic_linking_in_WebAssembly_Architecture_and_Performance_Evaluation.pdf . |
But probably stuff like |
I still think we should discuss with Emscripten whether we could set some environment variable like |
WASI wouldn't see the Emscripten flags. We can easily extend our configure file later to do something like:
|
Right, makes sense that autotools has ways of dealing with different compilers needing different flags. |
e03d117
to
c1a4260
Compare
The PR drops @hoodmane does the PR help you, or at least not cause any new problems? |
I'm having trouble testing on tip of tree because of the changes to |
Or maybe I can cherry-pick this commit onto 3.11.0a6? |
What's the problem with |
I get failures at |
There is no line 17 in |
Yeah hence I need a docker image with tip of tree Python because my v3.11.0a6 system is out of date |
Are you familiar with out-of-tree builds? We compile a build Python interpreter to bootstrap Emscripten cross build from the same source check, https://github.com/ethanhs/python-wasm/blob/main/build-python-build.sh and https://github.com/ethanhs/python-wasm/blob/main/build-python-emscripten-browser.sh . The trick is |
Apparently not.
Is it important that there are two layers |
Also, are there docs on out of tree build somewhere that I should read? |
No, the paths are not important. Any directory structure will do. It's only important that you run |
Do I need to do this if I have cloned a fresh copy of |
No, a fresh clone is clean. |
I tried to follow your directions for this: Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/src/cpython/installs/python-3.11.0dev0/lib/python3.11/lib2to3/pgen2/driver.py", line 21, in <module>
import logging
^^^^^^^^^^^^^^
File "/src/cpython/installs/python-3.11.0dev0/lib/python3.11/logging/__init__.py", line 26, in <module>
import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/cpython/installs/python-3.11.0dev0/lib/python3.11/re/__init__.py", line 125, in <module>
from . import _compiler, _parser
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/cpython/installs/python-3.11.0dev0/lib/python3.11/re/_compiler.py", line 17, in <module>
assert _sre.MAGIC == MAGIC, "SRE module mismatch"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: SRE module mismatch Maybe you can tell me what I'm doing wrong? |
Ah maybe the problem is just buggy make recipes. |
I think the |
Okay the problem is on Makefile.pre.in line 2032:
Note that this is the build Python ( |
Or something. I tried manually removing PYTHONPATH from that and it still broke in the same way so I don't know. |
Is the error coming from I'm merging the PR now to get it into the upcoming alpha. It's unlike to cause you any problems and allows us to test dynamic linking more easily. |
Yeah I think |
https://bugs.python.org/issue40280