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

make run-c not working #418

Open
mboersma opened this issue Aug 4, 2023 · 0 comments
Open

make run-c not working #418

mboersma opened this issue Aug 4, 2023 · 0 comments
Labels
🐛 bug Something isn't working 🚧 maintainer issue An issue that is being tackled by maintainers

Comments

@mboersma
Copy link
Contributor

mboersma commented Aug 4, 2023

Description of the bug

I've been trying to build the examples and managed to get my macOS box configured and building the C examples (maybe?), but make run-c fails.

% make build-c run-c
/Library/Developer/CommandLineTools/usr/bin/make -C examples/multi_capability-demo-clang/ clean
rm -rf bindings/
mkdir bindings/
/Library/Developer/CommandLineTools/usr/bin/make -C examples/multi_capability-demo-clang/ bindings
wit-bindgen c --import ../../wit/keyvalue.wit --out-dir bindings/
Generating "bindings/keyvalue.c"
Generating "bindings/keyvalue.h"
wit-bindgen c --import ../../wit/messaging.wit --out-dir bindings/
Generating "bindings/messaging.c"
Generating "bindings/messaging.h"
chmod +x bindings/keyvalue.c bindings/messaging.c
/Library/Developer/CommandLineTools/usr/bin/make -C examples/multi_capability-demo-clang/ build
sudo /opt/wasi-sdk/bin/clang -I . -I ./bindings -c -o keyvalue.o bindings/keyvalue.c
sudo /opt/wasi-sdk/bin/clang -I . -I ./bindings -c -o messaging.o bindings/messaging.c
sudo /opt/wasi-sdk/bin/clang -Wall main.c keyvalue.o messaging.o -o multi_capability-demo-clang.wasm --sysroot /opt/wasi-sdk/share/wasi-sysroot
RUST_LOG=slight=trace ./target/release/slight -c './examples/messaging-producer-demo/azsbus_slightfile.toml' run ./examples/messaging-producer-demo/target/wasm32-wasi/release/messaging-producer-demo.wasm && ./target/release/slight -c './examples/multi_capability-demo-clang/slightfile.toml' run ./examples/multi_capability-demo-clang/multi_capability-demo-clang.wasm
2023-08-04T19:14:01.698864Z  INFO slight_lib::commands::run: Starting slight
Error: failed to read input file

Caused by:
    No such file or directory (os error 2)
make: *** [run-c] Error 1
% ls ./examples/messaging-producer-demo/target
ls: ./examples/messaging-producer-demo/target: No such file or directory

To Reproduce

Run make install-deps-macos build-c successfully and then try make run-c.

Additional context

Seems like the build didn't work or didn't put the .wasm file in the expected target location.

@mboersma mboersma added 🐛 bug Something isn't working 🚧 maintainer issue An issue that is being tackled by maintainers labels Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🚧 maintainer issue An issue that is being tackled by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant