Comments (10)
I'm still getting this error.
error: failed to run custom build command for `wasmtime-runtime v9.0.3`
Caused by:
process didn't exit successfully: `C:\Users\Paul Dejean\Documents\rustburn\target\release\build\wasmtime-runtime-3fca1f717556e79b\build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-changed=src/helpers.c
TARGET = Some("wasm32-wasi")
OPT_LEVEL = Some("s")
HOST = Some("x86_64-pc-windows-msvc")
cargo:rerun-if-env-changed=CC_wasm32-wasi
CC_wasm32-wasi = None
cargo:rerun-if-env-changed=CC_wasm32_wasi
CC_wasm32_wasi = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_wasm32-wasi
CFLAGS_wasm32-wasi = None
cargo:rerun-if-env-changed=CFLAGS_wasm32_wasi
CFLAGS_wasm32_wasi = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
running: "clang" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-wasi" "-Wall" "-Wextra" "-DCFG_TARGET_OS_wasi" "-DCFG_TARGET_ARCH_wasm32" "-o" "C:\\Users\\Paul Dejean\\Documents\\rustburn\\target\\wasm32-wasi\\release\\build\\wasmtime-runtime-2648d1ef287d276f\\out\\src/helpers.o" "-c" "src/helpers.c"
cargo:warning=src/helpers.c:1:10: fatal error: 'setjmp.h' file not found
cargo:warning=#include <setjmp.h>
cargo:warning= ^~~~~~~~~~
cargo:warning=1 error generated.
exit code: 1
--- stderr
error occurred: Command "clang" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-wasi" "-Wall" "-Wextra" "-DCFG_TARGET_OS_wasi" "-DCFG_TARGET_ARCH_wasm32" "-o" "C:\\Users\\Paul Dejean\\Documents\\rustburn\\target\\wasm32-wasi\\release\\build\\wasmtime-runtime-2648d1ef287d276f\\out\\src/helpers.o" "-c" "src/helpers.c" with args "clang" did not execute successfully (status code exit code: 1).
from wasi-libc.
The wask-sdk does not support setjmp or other non-local control flow concepts (such as C++ exceptions) yet because WebAssembly does not yet support such things.
There are several proposals in the works that would enable these things, and if/when they get to certain point in the process wask-sdk/wask-libc will add support for setjmp.
from wasi-libc.
Apologies, on re-reading this does look like something that could probably be fixed. Most likely the correct solution is to patch libc++ headers to avoid including c++/v1/setjmp.h
. We should also probably remove that file from the SDK
from wasi-libc.
I was about to answer to your reply. Correct, I'm not trying to use set jump or exceptions. The code just fails to compile when using modules and std imports. It compiles with only modules use or std imports but not with both. I tried to supply setjmp.h from somewhere else but it brings more issues. cheers!
from wasi-libc.
Hello,
I am face to the same issue, just FYI :
At least \wasi-sdk-12\wasi-sysroot\include\c++\v1\module.modulemap export some module like thread, csignal, setjmp_h, csetjmp, atomic, barrier, future, latch and semaphore which is not supported in WAsm/WASI
Thks,
Ghis
from wasi-libc.
from wasi-libc.
WebAssembly/exception-handling#179
from wasi-libc.
@djabi: is this still an issue? I was going to recommend moving this issue over to https://github.com/WebAssembly/wasi-libc in order to include a stubbed-out version of setjmp.h
but perhaps like @sbc100 mentions something needs to be done here?
from wasi-libc.
@paulcdejean, I don't think what you're observing is the same thing. It looks like you are trying to compile Wasmtime (src/helpers.c
) targeting wasm32-wasi
but that is not going to work: as mentioned here Wasmtime expects to JIT-compile WebAssembly, which isn't really easy (possible?) to do from within WebAssembly. Here's more discussion on that: bytecodealliance/wasmtime#6504, bytecodealliance/wasmtime#6611.
I guess I really need to know if this is still a problem for general C/C++ code that we do expect to compile to WebAssembly.
from wasi-libc.
I guess I am experiencing this problem, trying to build yices2 : https://github.com/sporniket/yices2-built-with-wasi-sdk
I end up with "no rule to make 'setjmp.h' required by xxx"
from wasi-libc.
Related Issues (20)
- Support sigaction (for LLVM) HOT 1
- how does preview2 deal with wasm64? HOT 2
- locking issues in chdir.c
- O_RESOLVE_BENEATH is forced HOT 4
- both `/` and `.` preopens "normlaize" to empty string meaning it is not possible to preopen root and current dir simultaneously HOT 6
- main in a library regression HOT 2
- Enhancement request: interface to get the wasi-libc version at runtime HOT 3
- Support `mprotect` in wasi-emulated-mman HOT 6
- Consider including a pthread.h for all targets HOT 5
- httpclient module for API request HOT 1
- Dereferencing nullptr in __sec_to_zone function HOT 2
- wasi-libc should probably not define `_POSIX_CPUTIME` and `_POSIX_THREAD_CPUTIME`...
- Command line length limits are easily exceeded on Windows HOT 1
- Keep/separate out a list of symbols that are only stubs
- sysroot for wasm64
- FTS Support HOT 1
- Support WASIp2 sockets in `read` and `write`
- [msys2] AR is set as gcc in UCRT64 and MINGW64 HOT 1
- 'mkdirat()' ignores the parameter 'mode' HOT 2
- Some `SO_*` constants like `SO_BROADCAST` and `SO_LINGER` aren't defined
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 wasi-libc.