Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(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

(1 edit)

If it’s not working still, then I think I should drop Mac support all together. Trying to figure out what’s happening on your system is becoming time consuming. I don’t own any Mac hardware so I cannot debug locally. I’m going to ask a friend to try to see if they can build it with the instructions provided.

It looks like you are running that script from your /Users/max/Library folder, not the repo copy. You need to pulled the repo into a clean folder and run ./buildSystem.sh --allMac from inside that folder. I’m not sure how you’re doing this, but if you are doing this all correct and still having this error, then Mac support is broken and I don’t have hardware or time to fix it. I will have to delete the Mac instructions from the repo.

You could try to read the build script itself and figure out how it works to see why it’s failing. It’s build on these instructions, so you could could try running them for yourself: Export to macOS and iOS.

I'm not running it from /Users/max/Library. It's expecting to find the files there for some reason. That's why when I place the repo files into /Users/max/Library it works slightly better. But then it hits the other bug I mentioned about it thinking it's on Linux.

Hopefully your friend can offer some debugging help and insight

 

My non-programmer friend was able to build for Mac well enough. He did have some issues and I added some notes on the readme regarding some of his pain points. He was not, however, able to reproduce your exact issue. I’m not sure why Bash is looking in your home directory and not it’s own file directory.

The build system is written in Bash. It’s a very useful scripting language to know/learn. If you’re still having issues, you can read it and see if you can find the cause. You can also try to export to Mac using the manual steps listen on GodotRust.

I’ve spent some hours on debugging your issue now and that’s time not spent on my own projects. No one else can seem to reproduce it. Let me know if you figure out what’s happening so we can add it to the readme to prevent other people from having this issue.

That might be the issue. MacOS Terminal defaults to Zshell, not bash. I wonder if there's a way I can change that. Do you think that could be the problem?

I'll go through the process again and see if the updates you've made help