setzer22 / blackjack

A procedural, node-based modelling tool, made in rust 🦀
Mozilla Public License 2.0
1.42k stars 64 forks source link

Build on Windows failed. #54

Closed zeroxer closed 2 years ago

zeroxer commented 2 years ago

Is there any windows building test?

setzer22 commented 2 years ago

Not currently, but I am planning to look into that by setting up CI releases for the major platforms.

What's the error you're getting, in the meantime?

DamenH commented 2 years ago

I am on Windows 11. I get the following error:

error: failed to run custom build command for `gdnative-sys v0.10.1`

Caused by:
  process didn't exit successfully: `C:\Users\damen\Documents\Projects\blackjack\target\debug\build\gdnative-sys-c05f9e568170cd89\build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at '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: [])"', C:\Users\damen\.cargo\registry\src\github.com-1ecc6299db9ec823\bindgen-0.60.1\src/lib.rs:2172:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Going to try on WSL

setzer22 commented 2 years ago

Ah, that's unfortunate :thinking: This seems to be happening when building the godot integration (@Bromeon may want to check this error message). I will investigate further.

If you're not planning on using the godot integration, you should be able to get this working by building the blackjack_ui crate directly. Simply run:

cargo run --bin blackjack_ui
setzer22 commented 2 years ago

Ok, so it seems the issue is simply that godot-rust wants LLVM to be installed in the system where it's built. This is explained in their user guide: https://godot-rust.github.io/book/getting-started/setup.html#llvm

Because not all blackjack users will care about Godot, it makes sense to not build the crate unless you need it, so the advice to only compile blackjack_ui is the right answer.

@DamenH, @zeroxer: Could you confirm after building with cargo run --bin blackjack_ui the error is gone?

DamenH commented 2 years ago

Awesome. It is now building with no issues. Going to play around some. Thank you for the help! Keep up the great work.

setzer22 commented 2 years ago

Amazing! Glad I was able to help :)