Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How has it been going?

(-1)

I haven't been able to do it yet. I looked for the instructions and found it inscrutable. I was planning to look again relatively soon

What part of it was “inscrutable”? It’s outlined very simply: install rust and run the build script. Not sure what part your caught on.

(2 edits)

Not saying you're being inscrutable, just saying I don't really understand this stuff so the instructions are complicated to me.

I installed Rust and Cargo is installed but when I run BuildSystem.sh I get the error:

could not find `Cargo.toml` in `/Users/max/Library` or any parent directory

Which is confusing since it's in the same folder as the build script. I'm going to see if I can figure out what's going on

Edit: OK, so I tried putting the Cargo.toml file in my Library folder and now I'm gettinga new error:

error: failed to parse manifest at `/Users/max/Library/Cargo.toml`

Caused by:

  can't find library `godot_boy`, rename file to `src/lib.rs` or specify lib.path


Did you do a git clone of the whole repo or just download the single files? You need the whole repo.

Oh OK. I didn't know that!

I cloned the repository but I'm still getting the same error 

Clone or download the repo and run the builder in the cloned copy.

(2 edits)

That's what I did

Edit: I noticed the error indicated looking for the .toml file in my ~/Library folder so I tried copying all the items in the repository there and it worked quite a bit better until coming to this error: 

   Compiling thiserror-impl v1.0.59
error: failed to run custom build command for `alsa-sys v0.3.1`
<span class="s2"></span>
Caused by:
  process didn't exit successfully: `/Users/max/Library/target/debug/build/alsa-sys-e1a28c965dd1a6bc/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ALSA_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
<span class="s2"></span>
  --- stderr
<span class="s2"></span>
  thread 'main' (7404970) panicked at /Users/max/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/alsa-sys-0.3.1/build.rs:13:18:
  pkg-config has not been configured to support cross-compilation.
<span class="s2"></span>
  Install a sysroot for the target platform and configure it via
  PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
  cross-compiling wrapper for pkg-config and set it via
  PKG_CONFIG environment variable.
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...


It also had this text at the start of the build:

PLATFORM_LABEL = x86_64-unknown-linux-gnu
CARGO_RELEASE_ARGS =
TARGET_PATH = target/x86_64-unknown-linux-gnu/debug/libgodot_boy.so
installing env on Linux not supported, please install another way
info: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is up to date

So it looks like for whatever reason:

  • The build script is only able to find the files in my home library folder
  • It thinks MacOS is Linux and can't build for it. Or it's just going down the Linux build path for some other reason 

I don’t know why it’s not detecting your OS. I use this line to detect Mac. But I don’t own a Mac so this isn’t an important feature for me.

    elif [[ $OSTYPE == "darwin"* ]]; then
        export TARGET="macos"

Try building with ./buildSystem.sh --allMac. Please start a new, clean folder and pull the project into that. Don’t run it out of another folder like /Users/max/Library. That’s a recipe for mess and disaster.

I originally tried to build it out of a  clean folder but I got the error 

"Could not find 'Cargo.toml' in '/Users/max/Library' or any parent directory

So it seems like there's some kind of issue with the formation of the indicated path or something like that