[issue47232] Difficulties building tip of tree Python for emscripten

2022-04-05 Thread Hood Chatham
Hood Chatham added the comment: Okay I got it working. I was making several mistakes that each caused the same symptoms so it was hard to track them all down. Thanks again for your help! -- status: open -> closed ___ Python tracker <

[issue47232] Difficulties building tip of tree Python for emscripten

2022-04-05 Thread Hood Chatham
Hood Chatham added the comment: There is still a pretty good change I am making some dumb mistake. -- ___ Python tracker <https://bugs.python.org/issue47

[issue47232] Difficulties building tip of tree Python for emscripten

2022-04-05 Thread Hood Chatham
Hood Chatham added the comment: config.log is apparently 1.7 MB and when I try to upload I get "Error 413: Entity Too Large". I've attached the Makefile. -- Added file: https://bugs.python.org/file50723/Makefile ___ Python

[issue47232] Difficulties building tip of tree Python for emscripten

2022-04-05 Thread Hood Chatham
Hood Chatham added the comment: I take it back, I am still having this problem. -- status: closed -> open ___ Python tracker <https://bugs.python.org/issu

[issue47232] Difficulties building tip of tree Python for emscripten

2022-04-05 Thread Hood Chatham
Hood Chatham added the comment: Okay I found the problem. Elsewhere in my Makefiles `PYTHON_FOR_BUILD` was getting overwritten. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue47232] Difficulties building tip of tree Python for emscripten

2022-04-05 Thread Hood Chatham
New submission from Hood Chatham : I am trying to build tot Python for Emscripten to test recent changes and having trouble. The problem is caused by recent changes since 3.11.0a6 to `sre`. I build a build Python 3.11 from tot, and provided it to `./configure --with-build-python

[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-04 Thread Hood Chatham
Hood Chatham added the comment: Ideally the library should be able to define a different macro, e.g., CTYPES_CUSTOM_MAX_ARGCOUNT. This way the libffi port can define CTYPES_CUSTOM_MAX_ARGCOUNT and it will be compatible with older Python versions without causing Warning: "CTYPES_MAX_ARG

[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-03 Thread Hood Chatham
Change by Hood Chatham : -- nosy: +amaury.forgeotdarc, belopolsky, christian.heimes, meador.inge ___ Python tracker <https://bugs.python.org/issue47208> ___ ___

[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-03 Thread Hood Chatham
New submission from Hood Chatham : ctypes defines `CTYPES_MAX_ARGCOUNT` to be 1024: https://github.com/python/cpython/blob/6db2db91b96aaa1270c200ec931a2250fe2799c7/Modules/_ctypes/ctypes.h#L21 If a function call is attempted with more than 1024 arguments, it will fail. The libffi emscripten

[issue47197] ctypes mishandles `void` return type

2022-04-03 Thread Hood Chatham
Change by Hood Chatham : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker <https://bugs.python.org/issue47197> ___ ___ Python-bugs-list m

[issue47196] Function pointer cast in test_imp

2022-04-02 Thread Hood Chatham
Change by Hood Chatham : -- pull_requests: +30341 pull_request: https://github.com/python/cpython/pull/32280 ___ Python tracker <https://bugs.python.org/issue47

[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

2022-04-01 Thread Hood Chatham
Hood Chatham added the comment: Actually, I think the _PyImport_InitFunc trampoline call is only there as a work around for the problematic `test_imp` and `test_import` Python tests. I don't know of any third party code with a problem

[issue47197] ctypes mishandles `void` return type

2022-04-01 Thread Hood Chatham
Change by Hood Chatham : -- keywords: +patch nosy: +hoodmane nosy_count: 2.0 -> 3.0 pull_requests: +30317 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32246 ___ Python tracker <https://bugs.python.org/i

[issue47197] ctypes mishandles `void` return type

2022-04-01 Thread Hood Chatham
New submission from Hood Chatham : On wasm targets, `test_code` fails. It's because of a bad function pointer cast. The problematic code is as follows: ```py import ctypes py = ctypes.pythonapi freefunc = ctypes.CFUNCTYPE(None, ctypes.c_voidp) RequestCodeExtraIndex

[issue47196] Function pointer cast in test_imp

2022-04-01 Thread Hood Chatham
Hood Chatham added the comment: Every other `PyInit` function in that module also needs the spec argument to be removed in order for test_importlib to pass. -- ___ Python tracker <https://bugs.python.org/issue47

[issue47196] Function pointer cast in test_imp

2022-04-01 Thread Hood Chatham
Change by Hood Chatham : -- keywords: +patch nosy: +hoodmane nosy_count: 2.0 -> 3.0 pull_requests: +30315 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32244 ___ Python tracker <https://bugs.python.org/i

[issue47196] Function pointer cast in test_imp

2022-04-01 Thread Hood Chatham
New submission from Hood Chatham : The function PyInit_imp_dummy is declared as void f(PyObject* spec) and ignores the argument. In the test, it is called via imp.load_dynamic as void f(void). On wasm targets without the call trampolines added in https://bugs.python.org/issue47162 this

[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

2022-04-01 Thread Hood Chatham
Hood Chatham added the comment: As an update, building the chrome devtools with the wasm limit set to 12Mb following that guide worked fantastic. Highly recommend it. (Though there are a few paths that are out of date, I had to consult google's devtools docs.) The problem is

[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

2022-04-01 Thread Hood Chatham
Hood Chatham added the comment: I'm having trouble pinpointing the bad function pointer because chrome cuts off the end of the wasm file with: ``` ;; text is truncated due to size ``` Maybe I should follow the directions here, since this is a consistent nuisance. https://www.diver

[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

2022-04-01 Thread Hood Chatham
Hood Chatham added the comment: Note that there are still Python test suite failures in emscripten without these trampolines enabled, for instance test_imp fails. The only trampoline needed to pass the core test suite is _PyImport_InitFunc_TrampolineCall. -- nosy: +hoodchatham

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-03-30 Thread Hood Chatham
Change by Hood Chatham : -- versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue47176> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-03-30 Thread Hood Chatham
Change by Hood Chatham : -- versions: -Python 3.10 ___ Python tracker <https://bugs.python.org/issue47176> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-03-30 Thread Hood Chatham
Change by Hood Chatham : -- keywords: +patch pull_requests: +30284 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32209 ___ Python tracker <https://bugs.python.org/issu

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-03-30 Thread Hood Chatham
New submission from Hood Chatham : In Pyodide, we need to patch the interpreter to allow keyboard interrupts. We build Python without pthreads support because Emscripten doesn't currently support using pthreads and dynamic linking in the same build. It is still possible to handle UI a