OpenEmu / Mupen64Plus-Core

OpenEmu Core plugin with Mupen64Plus to support N64 emulation
49 stars 23 forks source link

Cannot Build OpenEmu on macOS 14 due to Mupen64Plus Error #41

Open Jenavieve-Rose opened 1 year ago

Jenavieve-Rose commented 1 year ago

Summary of issue When building OpenEmu version (375f1b6705065549d3235688353743b5a87cc3f2) I receive error

ld: warning: search path '/Users/USER/Github/OpenEmu/Mupen64Plus/../DerivedData/OpenEmu/Build/Products/Release' not found ld: archive member '/' not a mach-o file in '/Users/USER/Github/OpenEmu/Mupen64Plus/GLideN64/src/GLideNHQ/lib/libz.a' clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using the latest version of Xcode in macOS 14 Sonoma and I am using Github Desktop to clone repository.

I am on an M2 Pro

Jenavieve-Rose commented 1 year ago

I still cannot build OpenEmu due to this error I don't really think this should have been moved here as I am fairly certain it has more to do with OpenEmu then the core. It's not finding the libz.a when building.

MaddTheSane commented 1 year ago

Most likely the libz static library needs to be updated or discarded. (macOS has a dylib that could be used instead).

rybalkoss commented 11 months ago

I have exactly same error when building some small project after upgrade to sonoma (no lib dependencies at all)

rybalkoss commented 11 months ago

reproduced issue on minimal build example, https://stackoverflow.com/q/77444892/11335766

leeronr commented 11 months ago

@MaddTheSane was on the right track. I was able to solve this issue by replacing OpenEmu/Mupen64Plus/GLideN64/src/GLideNHQ/lib/libz.a with libz.a provided by Homebrew's zlib package.

  1. brew install zlib
  2. cp /opt/homebrew/opt/zlib/lib/libz.a [PATH-TO]/OpenEmu/Mupen64Plus/GLideN64/src/GLideNHQ/lib/

Successfully compiled after that!

I will mention a caveat: I had to solve a previous issue first; it involved writing a script change all the deployment targets from 10.11 to 10.13. If someone runs into that and needs help, let me know.

bluevisor commented 10 months ago

I was able to compile from terminal like this:

`git clone --recursive https://github.com/OpenEmu/OpenEmu.git\
cd OpenEmu\
git submodule update --init --recursive
xcodebuild -workspace OpenEmu.xcworkspace -scheme "OpenEmu" -configuration Release`

Replacing "OpenEmu" with "OpenEmu (Experimental)" got me the universal binary of the experimental build, which is what I was looking for. The release link on github is Intel binary.

*eh... never mind, the main program does run, but all the modules are still in intel binary, so nothing works...