Skip to content

add regina (gui) - #6736

Open
wangyenshu wants to merge 9 commits into
emscripten-forge:mainfrom
wangyenshu:regina
Open

wangyenshu wants to merge 9 commits into
emscripten-forge:mainfrom
wangyenshu:regina

Conversation

@wangyenshu

Copy link
Copy Markdown
Contributor

Template A: Checklist for adding a package

Pre-submission Checks

  • Package requires building for emscripten-wasm32 platform (not a noarch package), in other words, the package requires compilation.

Recipe Structure

Added recipes/recipes_emscripten/[package-name]/recipe.yaml with proper structure:

  • context section with version (and optionally name)
  • package section with name and version using Jinja2 templates
  • source section with:
    • Source URL is valid and points to archive file (.tar.gz, .tar.bz2, .tar.xz, .tgz, or .zip)
    • Source URL contains ${{ version }} template for version updates
    • SHA256 hash is correct (verified with curl -sL <url> | sha256sum)
    • Patches (if any) are included in [package-name]/patches/ directory
  • build section with appropriate script/method
    • Python packages: ${PYTHON} -m pip install . ${PIP_ARGS}
    • R packages: $R CMD INSTALL $R_ARGS .
    • C++ packages: Uses emcmake/emmake or emconfigure/emmake
    • Rust packages: Uses rust-nightly and maturin or appropriate Rust build tool
    • Build number is 0
    • If the script is longer than 3 lines, a build.sh is included
  • requirements section (build, host, run as needed)
  • tests section
    • Python packages: test_import_[package].py file created and referenced
    • C++ packages: Test executable or package_contents test
    • R packages: Package contents test
  • about section with license, homepage, summary

PR Formatting

  • PR title follows format: Add [package-name] or Update [package-name] to [version]
  • PR description includes:
    • Version being added/updated
    • Any special build considerations or patches applied

Package Details

  • Package Name: regina
  • Version: 7.4.1

Build Notes

@wangyenshu

Copy link
Copy Markdown
Contributor Author

I tried to use the frontend from https://github.com/wangyenshu/TeXmacs-wasm-archive.

I get

VM215:1 Cannot create window: no screens available

emscriptenLog @ VM215:1
_emscripten_log @ VM215:1
$func24862 @ regina-gui.wasm:0xf86045
$func24866 @ regina-gui.wasm:0xf89183
$func24849 @ regina-gui.wasm:0xf85873
$func24848 @ regina-gui.wasm:0xf85749
$func24858 @ regina-gui.wasm:0xf85e55
$func16995 @ regina-gui.wasm:0xa81f78
$func16998 @ regina-gui.wasm:0xa8239e
$func7426 @ regina-gui.wasm:0x677f2c
$func7446 @ regina-gui.wasm:0x67b41d
$func7510 @ regina-gui.wasm:0x683533
$func7613 @ regina-gui.wasm:0x68b737
$func2556 @ regina-gui.wasm:0x1490d3
$__main_argc_argv @ regina-gui.wasm:0x13a138
Module._main @ VM215:1
callMain @ VM215:1
doRun @ VM215:1
eval @ VM215:1
setTimeout
run @ VM215:1
removeRunDependency @ VM215:1
receiveInstance @ VM215:1
eval @ VM215:1
(anonymous) @ qtloader.js:346
Promise.then
Module.instantiateWasm @ qtloader.js:345
eval @ VM215:1
createWasm @ VM215:1
eval @ VM215:1
completeLoadEmscriptenModule @ qtloader.js:443
(anonymous) @ qtloader.js:332
Promise.then
loadEmscriptenModule @ qtloader.js:331
init @ (index):56
onload @ (index):14
qtloader.js:382 Aborted()
VM215:1 Uncaught RuntimeError: unreachable
    at regina-gui.wasm:0x117e612
    at ___trap (eval at completeLoadEmscriptenModule (qtloader.js:443:14), <anonymous>:1:214732)
    at abort (eval at completeLoadEmscriptenModule (qtloader.js:443:14), <anonymous>:1:3977)
    at __abort_js (eval at completeLoadEmscriptenModule (qtloader.js:443:14), <anonymous>:1:61753)
    at regina-gui.wasm:0x1166b11
    at regina-gui.wasm:0x6a1350
    at regina-gui.wasm:0xf85792
    at regina-gui.wasm:0xf85e55
    at regina-gui.wasm:0xa81f78
    at regina-gui.wasm:0xa8239e

Anyways the static library should be working. Let's merge it first.

@wangyenshu

wangyenshu commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author
Screenshot23 GUI works!

But I get this when clicking "new 2D triangulations" button.

regina-gui.js:7 Calling exec() is not supported on Qt for WebAssembly in this configuration. Please build with asyncify support, or use an asynchronous API like QDialog::open()

emscriptenLog @ regina-gui.js:7
_emscripten_log @ regina-gui.js:7
$func24864 @ regina-gui.wasm:0xf88142
$func24868 @ regina-gui.wasm:0xf8b280
$func24851 @ regina-gui.wasm:0xf87970
$func24867 @ regina-gui.wasm:0xf885ce
$func24920 @ regina-gui.wasm:0xf8d7e7
$func28821 @ regina-gui.wasm:0x1140e6f
$func28820 @ regina-gui.wasm:0x1140b31
$func25542 @ regina-gui.wasm:0xfc4cc9
$func13248 @ regina-gui.wasm:0x92b5a5
$func2785 @ regina-gui.wasm:0x1a3caf
$func2085 @ regina-gui.wasm:0xd2586
$func2586 @ regina-gui.wasm:0x161493
$func2591 @ regina-gui.wasm:0x16219c
$func715 @ regina-gui.wasm:0x455a8
$func26103 @ regina-gui.wasm:0xff0b0f
$func26151 @ regina-gui.wasm:0xff7a1e
$func22033 @ regina-gui.wasm:0xd5dfc0
$func11890 @ regina-gui.wasm:0x8b30ef
$func11883 @ regina-gui.wasm:0x8b173b
$func11931 @ regina-gui.wasm:0x8b79dd
$func9766 @ regina-gui.wasm:0x7b195e
$func11933 @ regina-gui.wasm:0x8b81e2
$func9122 @ regina-gui.wasm:0x76da80
$func9129 @ regina-gui.wasm:0x76f108
$func25474 @ regina-gui.wasm:0xfc0c2f
$func25487 @ regina-gui.wasm:0xfc1684
$func9126 @ regina-gui.wasm:0x76de92
$func9972 @ regina-gui.wasm:0x7c718d
$func9122 @ regina-gui.wasm:0x76da80
$func9129 @ regina-gui.wasm:0x770a01
$func25474 @ regina-gui.wasm:0xfc0c2f
$func25487 @ regina-gui.wasm:0xfc1684
$func18257 @ regina-gui.wasm:0xb6ac91
$func18258 @ regina-gui.wasm:0xb6df1e
$func18256 @ regina-gui.wasm:0xb68539
$func19029 @ regina-gui.wasm:0xba119a
$func7524 @ regina-gui.wasm:0x6997f8
$func7551 @ regina-gui.wasm:0x69a6b5
$func28679 @ regina-gui.wasm:0x1138308
$func28680 @ regina-gui.wasm:0x11385f5
$func7332 @ regina-gui.wasm:0x680b9d
dynCall @ regina-gui.js:7
(anonymous) @ regina-gui.js:7
qtSendPendingEvents @ VM384:4
handler @ regina-gui.js:7
regina-gui.js:7 Aborted()
abort @ regina-gui.js:7
__abort_js @ regina-gui.js:7
$func28938 @ regina-gui.wasm:0x1168ce1
$func7129 @ regina-gui.wasm:0x664fbd
$func24867 @ regina-gui.wasm:0xf88622
$func24920 @ regina-gui.wasm:0xf8d7e7
$func28821 @ regina-gui.wasm:0x1140e6f
$func28820 @ regina-gui.wasm:0x1140b31
$func25542 @ regina-gui.wasm:0xfc4cc9
$func13248 @ regina-gui.wasm:0x92b5a5
$func2785 @ regina-gui.wasm:0x1a3caf
$func2085 @ regina-gui.wasm:0xd2586
$func2586 @ regina-gui.wasm:0x161493
$func2591 @ regina-gui.wasm:0x16219c
$func715 @ regina-gui.wasm:0x455a8
$func26103 @ regina-gui.wasm:0xff0b0f
$func26151 @ regina-gui.wasm:0xff7a1e
$func22033 @ regina-gui.wasm:0xd5dfc0
$func11890 @ regina-gui.wasm:0x8b30ef
$func11883 @ regina-gui.wasm:0x8b173b
$func11931 @ regina-gui.wasm:0x8b79dd
$func9766 @ regina-gui.wasm:0x7b195e
$func11933 @ regina-gui.wasm:0x8b81e2
$func9122 @ regina-gui.wasm:0x76da80
$func9129 @ regina-gui.wasm:0x76f108
$func25474 @ regina-gui.wasm:0xfc0c2f
$func25487 @ regina-gui.wasm:0xfc1684
$func9126 @ regina-gui.wasm:0x76de92
$func9972 @ regina-gui.wasm:0x7c718d
$func9122 @ regina-gui.wasm:0x76da80
$func9129 @ regina-gui.wasm:0x770a01
$func25474 @ regina-gui.wasm:0xfc0c2f
$func25487 @ regina-gui.wasm:0xfc1684
$func18257 @ regina-gui.wasm:0xb6ac91
$func18258 @ regina-gui.wasm:0xb6df1e
$func18256 @ regina-gui.wasm:0xb68539
$func19029 @ regina-gui.wasm:0xba119a
$func7524 @ regina-gui.wasm:0x6997f8
$func7551 @ regina-gui.wasm:0x69a6b5
$func28679 @ regina-gui.wasm:0x1138308
$func28680 @ regina-gui.wasm:0x11385f5
$func7332 @ regina-gui.wasm:0x680b9d
dynCall @ regina-gui.js:7
(anonymous) @ regina-gui.js:7
qtSendPendingEvents @ VM384:4
handler @ regina-gui.js:7
regina-gui.wasm:0x11807d7 Uncaught RuntimeError: unreachable
    at regina-gui.wasm:0x11807d7
    at abort (regina-gui.js:7:3958)
    at __abort_js (regina-gui.js:7:62543)
    at regina-gui.wasm:0x1168ce1
    at regina-gui.wasm:0x664fbd
    at regina-gui.wasm:0xf88622
    at regina-gui.wasm:0xf8d7e7
    at regina-gui.wasm:0x1140e6f
    at regina-gui.wasm:0x1140b31
    at regina-gui.wasm:0xfc4cc9

@wangyenshu

Copy link
Copy Markdown
Contributor Author

And icons are missing.

@wangyenshu

wangyenshu commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

A web demo is here: https://wangyenshu.github.io/regina-wasm/. It seems that everything except python console is working. I don't know if its python console is process based or not.

@wangyenshu

Copy link
Copy Markdown
Contributor Author

The example files for "open examples" are missing.

@wangyenshu

Copy link
Copy Markdown
Contributor Author

@DerThorsten I cannot find HACL symbol in your python recipe build. Is it removed? I have to fetch CPython source to build the HACL hash library.

@wangyenshu

Copy link
Copy Markdown
Contributor Author

Now everything works.
Screenshot232

@wangyenshu
wangyenshu marked this pull request as ready for review September 17, 2026 15:02
@wangyenshu
wangyenshu marked this pull request as draft September 17, 2026 15:20
@wangyenshu

Copy link
Copy Markdown
Contributor Author

@DerThorsten I cannot find HACL symbol in your python recipe build. Is it removed? I have to fetch CPython source to build the HACL hash library.

Fixed.

@wangyenshu
wangyenshu marked this pull request as ready for review September 18, 2026 00:31
@DerThorsten

Copy link
Copy Markdown
Contributor

@DerThorsten I cannot find HACL symbol in your python recipe build. Is it removed? I have to fetch CPython source to build the HACL hash library.

Fixed.

on the 6x branch we fix this and install the hacl libraries, I am tempted to say that on emscripten-4x we should stick with python 3.13 and not introduce any more changes to the python recipe.

@IsabelParedes IsabelParedes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wangyenshu !

Unfortunately, after some internal discussion we've decided we will not be accepting any changes to the python recipe on the current main branch.

We are in the middle of a migration (emscripten-6x) where Python v3.14 will be the default.

For regina, I would suggest trying to make it work with python as is. But if that's not possible, please have some patience until we add more packages to emscripten-6x so that regina can be added there.

If you would like to help with the migration to prioritize the packages you are interested in, please let us know :)

Thank you!

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.

3 participants