veecle / tricore-probe

Just like probe-run but targeting the Tricore-Architecture
Apache License 2.0
20 stars 5 forks source link

Update readme prerequisites #17

Closed gemesa closed 4 months ago

gemesa commented 4 months ago

Fixed some issues related to the prerequisite list in readme:

C:\Users\andra\git-repos\tricore-probe>cargo build
...
   Compiling rust-mcd v0.1.0 (C:\Users\andra\git-repos\tricore-probe\rust-mcd)
error: failed to run custom build command for `rust-mcd v0.1.0 (C:\Users\andra\git-repos\tricore-probe\rust-mcd)`

Caused by:
  process didn't exit successfully: `C:\Users\andra\git-repos\tricore-probe\target\debug\build\rust-mcd-44d1f68bb99c93f6\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=mcd_demo_basic_120412/src/mcd_api.h
  cargo:rerun-if-env-changed=TARGET
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS
  cargo:rerun-if-changed=mcd_demo_basic_120412/src/mcd_api.h

  --- stderr
  thread 'main' panicked at C:\Users\andra\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bindgen-0.69.4\lib.rs:622:31:
  Unable to find libclang: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Installing LLVM and setting env var LIBCLANG_PATH solves the issue:

C:\Users\andra\git-repos\tricore-probe>cargo build
   Compiling bindgen v0.69.4
   Compiling rust-mcd v0.1.0 (C:\Users\andra\git-repos\tricore-probe\rust-mcd)
   Compiling tricore-windows v0.1.0 (C:\Users\andra\git-repos\tricore-probe\tricore-windows)
   Compiling tricore-probe v0.1.0 (C:\Users\andra\git-repos\tricore-probe)
    Finished dev [unoptimized + debuginfo] target(s) in 9.47s
mc-cat-tty commented 4 months ago

I came across the same error on a clean ubuntu installation and I solved by installing libclang-dev with apt package manager:

[sudo] apt install libclang-dev
daniel-veecle commented 4 months ago

Thanks a lot! We will double check and merge this in @arctic-alpaca.

Likely also linked to #4.