Git Product home page Git Product logo

Comments (10)

paulcdejean avatar paulcdejean commented on August 31, 2024 1

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.

sbc100 avatar sbc100 commented on August 31, 2024

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.

sbc100 avatar sbc100 commented on August 31, 2024

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.

djabi avatar djabi commented on August 31, 2024

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.

 avatar commented on August 31, 2024

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.

calvin2021y avatar calvin2021y commented on August 31, 2024

WebAssembly/WASI#490

from wasi-libc.

calvin2021y avatar calvin2021y commented on August 31, 2024

WebAssembly/exception-handling#179

from wasi-libc.

abrown avatar abrown commented on August 31, 2024

@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.

abrown avatar abrown commented on August 31, 2024

@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.

sporniket avatar sporniket commented on August 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.