FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.51k stars 341 forks source link

can't build, cargo build --package editor --release #455

Closed PlumpMath closed 1 year ago

PlumpMath commented 1 year ago

Hello I think I've compiled and run it before, but I can't remember if it was successful only on NixOS... Building definitely worked well on NixOS. Before creating it as a derivation, it should be executable in the nix-shell so that derivation work can be done. That's why I'm leaving this note here, as it seems appropriate to mention it. Unity and Unreal are also working well on NixOS now. I hope Fyrox will be installed as a default on NixOS soon, so that I can easily incorporate the developed features into derivations.

MacOS (Intel) + Nix-Darwin

target/release/deps/editor-dccae5d1a826c62a" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: Undefined symbols for architecture x86_64:
            "_kCFURLVolumeAvailableCapacityForImportantUsageKey", referenced from:
                _$LT$sysinfo..apple..disk..Disk$u20$as$u20$sysinfo..traits..DiskExt$GT$::refresh::hdfce48cf43c8881a in libsysinfo-233afd26a1743ba6.rlib(sysinfo-233afd26a1743ba6.sysinfo.ca77f7b2-cgu.15.rcgu.o)
                sysinfo::apple::disk::get_disks::h21133e4acc4647dc in libsysinfo-233afd26a1743ba6.rlib(sysinfo-233afd26a1743ba6.sysinfo.ca77f7b2-cgu.15.rcgu.o)
          ld: symbol(s) not found for architecture x86_64
          clang-11: error: linker command failed with exit code 1 (use -v to see invocation)

MacOS (M2) + Nix-Darwin

   Compiling toml v0.5.11
error: failed to run custom build command for `coreaudio-sys v0.2.12`

Caused by:
  process didn't exit successfully: `/Users/gp/pnix/dev/rust/fyrox/basic3d/target/release/build/coreaudio-sys-62b4501b9564d19f/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=COREAUDIO_SDK_PATH
  cargo:rustc-link-lib=framework=AudioUnit
  cargo:rustc-link-lib=framework=AudioToolbox
  cargo:rustc-link-lib=framework=CoreAudio
  cargo:rustc-link-lib=framework=OpenAL
  cargo:rustc-link-lib=framework=CoreMIDI
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

  --- stderr
  /nix/store/lz4b78jk58m9skbxrh3ppg6jsggy1ci4-sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h:169:10: fatal error: 'CoreAudioTypes/CoreAudioTypes.h' file not found
  thread 'main' panicked at 'unable to generate bindings: ClangDiagnostic("/nix/store/lz4b78jk58m9skbxrh3ppg6jsggy1ci4-sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioComponent.h:169:10: fatal error: 'CoreAudioTypes/CoreAudioTypes.h' file not found\n")', /Users/gp/.cargo/registry/src/github.com-1ecc6299db9ec823/coreaudio-sys-0.2.12/build.rs:150:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
PlumpMath commented 1 year ago

cant intel cpu macos

On m2, the issue is resolved by reinstalling the command line tools.

sudo rm -r -f /Library/Developer/CommandLineTools
xcode-select --install
PlumpMath commented 1 year ago

problem x86_64-darwin

resolved it here. Thank you. https://github.com/ipetkov/crane/discussions/329#discussioncomment-5974313