bpo-40280: Add --enable-wasm-dynamic-linking (GH-32253)#32253
Conversation
7cfc9d8 to
ad6a484
Compare
April 2, 2022 15:54
|
Maybe this should be called |
Sorry, something went wrong.
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 . |
Sorry, something went wrong.
|
But probably stuff like |
Sorry, something went wrong.
|
I still think we should discuss with Emscripten whether we could set some environment variable like |
Sorry, something went wrong.
WASI wouldn't see the Emscripten flags. We can easily extend our configure file later to do something like: |
Sorry, something went wrong.
|
Right, makes sense that autotools has ways of dealing with different compilers needing different flags. |
Sorry, something went wrong.
erlend-aasland
left a comment
There was a problem hiding this comment.
AC changes look good to me!
Sorry, something went wrong.
e03d117 to
c1a4260
Compare
April 3, 2022 17:25
|
The PR drops @hoodmane does the PR help you, or at least not cause any new problems? |
Sorry, something went wrong.
|
I'm having trouble testing on tip of tree because of the changes to |
Sorry, something went wrong.
|
Or maybe I can cherry-pick this commit onto 3.11.0a6? |
Sorry, something went wrong.
|
What's the problem with |
Sorry, something went wrong.
|
I get failures at |
Sorry, something went wrong.
|
There is no line 17 in |
Sorry, something went wrong.
Yeah hence I need a docker image with tip of tree Python because my v3.11.0a6 system is out of date |
Sorry, something went wrong.
|
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 |
Sorry, something went wrong.
Apparently not.
Is it important that there are two layers |
Sorry, something went wrong.
|
Also, are there docs on out of tree build somewhere that I should read? |
Sorry, something went wrong.
|
No, the paths are not important. Any directory structure will do. It's only important that you run |
Sorry, something went wrong.
Do I need to do this if I have cloned a fresh copy of |
Sorry, something went wrong.
No, a fresh clone is clean. |
Sorry, something went wrong.
|
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 mismatchMaybe you can tell me what I'm doing wrong? |
Sorry, something went wrong.
|
Ah maybe the problem is just buggy make recipes. |
Sorry, something went wrong.
|
I think the |
Sorry, something went wrong.
|
Okay the problem is on Makefile.pre.in line 2032: Note that this is the build Python ( |
Sorry, something went wrong.
|
Or something. I tried manually removing PYTHONPATH from that and it still broke in the same way so I don't know. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Yeah I think |
Sorry, something went wrong.
|
Congratulations, you have discovered an annoying issue with development during Python's alpha phase. :) Code is moving fast and breaks often. You should rebuild your build Python interpreter every time you update your checkout or switch branches. It's going to stabilize during beta and won't be an issue once Python 3.11 reaches RC and final stages. I recommend config cache ( |
Sorry, something went wrong.
|
Makes sense. At least Python is fast to build. The main annoyance is that if I want to get the CI running I have to set up building Python either in my Dockerfile or in my pipeline. |
Sorry, something went wrong.
|
Hmm, I'm still having trouble. Even building a x86 Linux Python and passing it as I think this should be: |
Sorry, something went wrong.
|
@hoodmane at this point it's probably better to open an issue, else this is liable to get lost since the PR has already been merged. |
Sorry, something went wrong.
|
Okay I opened an issue here: https://bugs.python.org/issue47232 |
Sorry, something went wrong.
https://bugs.python.org/issue40280