proxy-wasm / proxy-wasm-cpp-host

WebAssembly for Proxies (C++ host implementation)
Apache License 2.0
84 stars 69 forks source link

build failture with wasmtime #418

Open wbpcode opened 1 month ago

wbpcode commented 1 month ago
vscode@docker-desktop:~/proxy-wasm-cpp-host$ bazel build --define=engine=multi :lib
INFO: Analyzed target //:lib (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /build/proxy-wasm-cpp-host/BUILD:246:11: Compiling src/wasmtime/prefixed_wasmtime.cc failed: (Exit 1): gcc failed: error executing command (from target //:prefixed_wasmtime_lib) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF ... (remaining 29 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from bazel-out/aarch64-fastbuild/bin/src/wasmtime/prefixed_wasmtime.cc:27:
bazel-out/aarch64-fastbuild/bin/src/wasmtime/prefixed_types.h:16:10: fatal error: crates/c-api/include/prefixed_wasm.h: No such file or directory
   16 | #include "crates/c-api/include/prefixed_wasm.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Target //:lib failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 8.030s, Critical Path: 7.29s
INFO: 454 processes: 10 internal, 1 local, 443 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
PiotrSikora commented 1 month ago

@keithmattix could you take a look? Thanks!

keithmattix commented 1 month ago

Will take a look

krinkinmu commented 1 month ago

@keithmattix I hit this issue myself and I think I have a fix, would you mind if I took it over? It blocks a project I work on, so I would like to resolve this.

UPDATE: nvm, I can see the PR with the fix now, let me test it and confirm that it works.