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

build(docker): use wasi-threads #869

Merged
merged 46 commits into from
Jan 28, 2025

Conversation

thewtex
Copy link
Member

@thewtex thewtex commented Jul 9, 2023

Todos:

  • Check value of CROSS_TRIPLE in all images
  • Port DCMTK tree
  • Port ITK tree

@netlify
Copy link

netlify bot commented Jul 9, 2023

Deploy Preview for itk-wasm-docs ready!

Name Link
🔨 Latest commit dde4d94
🔍 Latest deploy log https://app.netlify.com/sites/itk-wasm-docs/deploys/64ab15a0e10fbb0008ffa887
😎 Deploy Preview https://deploy-preview-869--itk-wasm-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@thewtex thewtex force-pushed the wasi-threads branch 5 times, most recently from 5679b3d to 7ac0d63 Compare January 7, 2025 14:59
@thewtex thewtex changed the title WIP: build(Docker): Add wasi-threads build: build(docker): use wasi-threads Jan 7, 2025
@thewtex thewtex marked this pull request as ready for review January 7, 2025 22:18
To address:

  TypeError: WebAssembly.instantiate(): Import #20 module="env": module is not an object or function
For:

  wasm-ld: error: lto.tmp: undefined symbol: pthread_atfork
  wasm-ld: error: lto.tmp: undefined symbol: pthread_attr_setscope
To avoid:

CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
  Missing variable is:
    CMAKE_C_COMPILE_OBJECT
To address:

/ITKWebAssemblyInterface/src/pthreadShim.cxx:26:2: warning: non-void function does not return a value [-Wreturn-type]
   26 | {}
      |  ^
/ITKWebAssemblyInterface/src/pthreadShim.cxx:33:2: warning: non-void function does not return a value [-Wreturn-type]
   33 | {}
      |  ^
Required for threading.

Initial is sufficient for DICOM modules, which require a lot of data
(106 pages).
Latest version, SharedMemory support.
@thewtex thewtex force-pushed the wasi-threads branch 2 times, most recently from 9e0a1f3 to 41f114a Compare January 23, 2025 23:25
Until wasmtime supports threads in its C-API.
Address pipeline link errors where the function signature changes.
Addresses:

  wasm-ld: warning: function signature mismatch: __cxa_init_primary_exception
  >>> defined as (i32, i32, i32) -> i32 in lto.tmp
  >>> defined as (i32, i32, i32) -> void in libwasi-itk-extras.a(exceptionShim.cxx.o)
For:

│ wasm-ld: warning: function signature mismatch: __cxa_init_primary_exception
│ >>> defined as (i32, i32, i32) -> i32 in lto.tmp
│ >>> defined as (i32, i32, i32) -> void in libwasi-itk-extras.a(exceptionShimInitPrimaryException.cxx.o)
These do not seem to be reliably picked up from the environmental
variables anymore.
-Wno-warn-absolute-pathn and -DITK_WASM_NO_FILESYSTEM are only for
emscription.
And remove test:wasi:help from test -- crashing on exit for some reason.
Until we provide a jsdelivr web-worker pipeline embedded bundle to use.
Also stub out example data download when not needed.
@thewtex thewtex merged commit ad4e0b4 into InsightSoftwareConsortium:main Jan 28, 2025
58 of 64 checks passed
@thewtex thewtex deleted the wasi-threads branch January 28, 2025 13:22
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