Comments (7)
The error message is complaining about atomics, so maybe it needs to be built with threads. Try adding threads = "emscripten",
to your wasm_cc_binary
from emsdk.
Thank you very much. Build completed successfully now
from emsdk.
The error message is complaining about atomics, so maybe it needs to be built with threads. Try adding
threads = "emscripten",
to yourwasm_cc_binary
I am using WebAssembly (Wasm) in a WeChat Mini Program environment, but it does not support Web Workers.
worker=new Worker(pthreadMainJs,workerOptions)
Would you like additional information or suggestions on how to handle WebAssembly in WeChat Mini Programs without Web Workers? @walkingeyerobot
like without option threads = "emscripten"
in wasm_cc_binary
,
thank you so much !~
from emsdk.
Are you able to get tensorflow lite to compile without threads outside of bazel and run in your environment? If yes, I'm happy to help dig into this further. If no, I think that's a question for hte tensorflow lite folks.
from emsdk.
Thank you very much for your help.
According to the advice from a TensorFlow Lite team member, I tried remove the -pthread lines in the emlink params file and ran emcc_link.sh
. It was successful, although the generated wasm-loader.js
is larger than usual. Are there any unfinished tasks that need to be completed after running emcc_link.sh
?
generated wasm-loader.js
file
tensorflow isuse help which build wasm_cc_binary
without pthread
from emsdk.
Are you able to get tensorflow lite to compile without threads outside of bazel and run in your environment? If yes, I'm happy to help dig into this further. If no, I think that's a question for hte tensorflow lite folks.
This works internally in google3 (you can ping me in chat for a link) for building @tensorflow/tfjs-tflite, so I think the Bazel wasm tooling probably supports it. My guess is there's something misconfigured in the oss build, possibly before anything gets passed to wasm_cc_binary, that's causing it to use threads even when threads are not requested. If that's the case, then this is a TFLite issue.
from emsdk.
The error message is complaining about atomics, so maybe it needs to be built with threads. Try adding
threads = "emscripten",
to yourwasm_cc_binary
I found a solution to fix the emcc_link
issue by threads = "off"
and adding -s USE_PTHREADS=0
from emsdk.
Related Issues (20)
- [Bazel] Add example of extracting Emscripten's output with rules_foreign_cc
- emsdk install tot command fails HOT 2
- 3.1.61 Docker image not published HOT 1
- The compilation speed is too slow. HOT 1
- [Bazel] Should the toolchain set the same variables as tools/building.py? HOT 2
- TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed. HOT 1
- [Bazel] Main bootstrap script for Wasm Audio Worklets not generated HOT 3
- [Bazel] feature flags for the Emscripten toolchain HOT 18
- [Bazel] Dynamically generate Emscripten cache HOT 5
- Downloading files with urllib results in missing KB HOT 3
- THYDU𝕏
- THYDU𝕏
- THYDU𝕏
- [bazel] [rules_foreign_cc] ModuleNotFoundError: No module named 'tools' HOT 11
- Error when running (or linking) with GLFW HOT 1
- The latest published Docker image uses a version of CMake that appears incompatible with sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=$dynCall HOT 8
- [bazel] Example to Bind Packages with Non-Standard Libraries HOT 2
- [bazel] Frozen Cache exception with MEMORY64=1 HOT 13
- Reinstall Error: ".../emsdk/python/3.9.2_64bit/bin/python3: No such file or directory"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emsdk.