spiderlightning icon indicating copy to clipboard operation
spiderlightning copied to clipboard

"make build-c" fails to build sample apps

Open squillace opened this issue 2 years ago • 3 comments

Description of the bug make build-c
make -C examples/multi_capability-demo-clang/ clean make[1]: Entering directory '/home/squillace/work/squillace/spiderlightning/examples/multi_capability-demo-clang' rm -rf bindings/ mkdir bindings/ make[1]: Leaving directory '/home/squillace/work/squillace/spiderlightning/examples/multi_capability-demo-clang' make -C examples/multi_capability-demo-clang/ bindings make[1]: Entering directory '/home/squillace/work/squillace/spiderlightning/examples/multi_capability-demo-clang' wit-bindgen c --import ../../wit/keyvalue.wit --out-dir bindings/ Error: expected an identifier or string, found '(' --> ../../wit/keyvalue.wit:4:19 | 4 | static open: func(name: string) -> expected<keyvalue, keyvalue-error> | ^ make[1]: *** [Makefile:21: bindings] Error 1 make[1]: Leaving directory '/home/squillace/work/squillace/spiderlightning/examples/multi_capability-demo-clang' make: *** [Makefile:158: build-c] Error 2

To Reproduce make build-c

Additional context

squillace avatar Apr 12 '23 17:04 squillace

Thanks for rasing this issue @squillace . make build-c is actually not ran by the CI/CD so its currently broken. I will take "adding make build-c to CI" as a follow up

Mossaka avatar Apr 12 '23 19:04 Mossaka

But to just fix the issue you ran into - please make sure that you have wit-bindgen tag v0.2.0 installed instead of the latest wit-bindgen

Mossaka avatar Apr 12 '23 19:04 Mossaka

cargo install --git https://github.com/bytecodealliance/wit-bindgen \
  wit-bindgen-cli --tag v0.2.0

Maybe that should go the docs somewhere? Took me a bit to figure out the right incantation.

mboersma avatar Aug 04 '23 19:08 mboersma