RustでWASM挑戦中に発生したエラー
環境はWindows 10 wsl2 Ubuntu 20です。
解決策
先に解決策はパッケージが不足しているので追加する。
1 2 |
sudo apt install libclang-dev g++ -y |
エラー全文
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
rror: failed to run custom build command for `onig_sys v69.8.1` Caused by: process didn't exit successfully: `/home/x/workdir/oss/wasm-md2html/target/release/build/onig_sys-68d8794dfb16a39c/build-script-build` (exit status: 1) --- stdout cargo:rerun-if-env-changed=RUSTONIG_DYNAMIC_LIBONIG cargo:rerun-if-env-changed=RUSTONIG_STATIC_LIBONIG cargo:rerun-if-env-changed=RUSTONIG_SYSTEM_LIBONIG TARGET = Some("wasm32-unknown-unknown") OPT_LEVEL = Some("3") HOST = Some("x86_64-unknown-linux-gnu") CC_wasm32-unknown-unknown = None CC_wasm32_unknown_unknown = None TARGET_CC = None CC = None CFLAGS_wasm32-unknown-unknown = None CFLAGS_wasm32_unknown_unknown = None TARGET_CFLAGS = None CFLAGS = None CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "/home/x/workdir/oss/wasm-md2html/target/wasm32-unknown-unknown/release/build/onig_sys-5788a2b38b5278e1/out" "-I" "oniguruma/src" "-DONIG_DISABLE_DIRECT_THREADING=1" "-DONIG_EXTERN=__attribute__((visibility(\"default\")))" "-o" "/home/x/workdir/oss/wasm-md2html/target/wasm32-unknown-unknown/release/build/onig_sys-5788a2b38b5278e1/out/oniguruma/src/regexec.o" "-c" "oniguruma/src/regexec.c" --- stderr error occurred: Failed to find tool. Is `clang` installed? |
参考
じゃあね~。