Skip to content
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

emscripten_get_now should have no leading underscore #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hoodmane
Copy link

@hoodmane hoodmane commented Jun 1, 2022

According to @sbc100 in emscripten-core/emscripten#17106 (comment) `emscripten_core:

It looks like that side module is trying to import this symbol with an _ prefix. But that symbol doesn't start with an underscore:

https://github.com/emscripten-core/emscripten/blob/922cf56100de7dd162593f64481c73d16931643e/system/include/emscripten/emscripten.h#L86

See emscripten-core/emscripten#17106

I have confirmed that this fix works on
pyodide/pyodide#2378
though it requires an additional patch to Emscripten to add a signature for emscripten_get_now (see linked Emscripten issue). This additional Emscripten patch is only needed to use instant in a dynamically linked side module, if it's in the main module it is unnecessary.

@hoodmane
Copy link
Author

hoodmane commented Jun 1, 2022

Fixes #35.

hoodmane added a commit to hoodmane/pyo3 that referenced this pull request Jun 6, 2022
This adds CI to build libpython3.11 for wasm32-emscripten and
running tests against it. We need to patch instant to work
around the emscripten_get_now:
sebcrozet/instant#47

We also have to patch emscripten to work aroung the "undefined
symbol gxx_personality_v0" error:
emscripten-core/emscripten#17128

I set up a nox file to download and install emscripten,
download and build cpython, set appropriate environment variables
then run cargo test. The workflow just installs python, rust,
node, and nox and runs the nox session.

I xfailed all the test failures. There are problems with datetime.
iter_dict_nosegv and test_filenotfounderror should probably be
fixable. The tests that involve threads or asyncio probably can't
be fixed.
hoodmane added a commit to hoodmane/pyo3 that referenced this pull request Jun 6, 2022
This adds CI to build libpython3.11 for wasm32-emscripten and
running tests against it. We need to patch instant to work
around the emscripten_get_now:
sebcrozet/instant#47

We also have to patch emscripten to work aroung the "undefined
symbol gxx_personality_v0" error:
emscripten-core/emscripten#17128

I set up a nox file to download and install emscripten,
download and build cpython, set appropriate environment variables
then run cargo test. The workflow just installs python, rust,
node, and nox and runs the nox session.

I xfailed all the test failures. There are problems with datetime.
iter_dict_nosegv and test_filenotfounderror should probably be
fixable. The tests that involve threads or asyncio probably can't
be fixed.
hoodmane added a commit to hoodmane/pyo3 that referenced this pull request Jun 6, 2022
This adds CI to build libpython3.11 for wasm32-emscripten and
running tests against it. We need to patch instant to work
around the emscripten_get_now:
sebcrozet/instant#47

We also have to patch emscripten to work aroung the "undefined
symbol gxx_personality_v0" error:
emscripten-core/emscripten#17128

I set up a nox file to download and install emscripten,
download and build cpython, set appropriate environment variables
then run cargo test. The workflow just installs python, rust,
node, and nox and runs the nox session.

I xfailed all the test failures. There are problems with datetime.
iter_dict_nosegv and test_filenotfounderror should probably be
fixable. The tests that involve threads or asyncio probably can't
be fixed.
davidhewitt pushed a commit to PyO3/pyo3 that referenced this pull request Jun 8, 2022
* ci: test on emscripten target

This adds CI to build libpython3.11 for wasm32-emscripten and
running tests against it. We need to patch instant to work
around the emscripten_get_now:
sebcrozet/instant#47

We also have to patch emscripten to work aroung the "undefined
symbol gxx_personality_v0" error:
emscripten-core/emscripten#17128

I set up a nox file to download and install emscripten,
download and build cpython, set appropriate environment variables
then run cargo test. The workflow just installs python, rust,
node, and nox and runs the nox session.

I xfailed all the test failures. There are problems with datetime.
iter_dict_nosegv and test_filenotfounderror should probably be
fixable. The tests that involve threads or asyncio probably can't
be fixed.

* Some cleanup

* Remove instant patch

* Add explanations for xfails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant