Mupen64Plus-Core icon indicating copy to clipboard operation
Mupen64Plus-Core copied to clipboard

Cannot Build OpenEmu on macOS 14 due to Mupen64Plus Error

Open Jenavieve-Rose opened this issue 2 years ago • 6 comments
trafficstars

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 avatar Sep 30 '23 15:09 Jenavieve-Rose

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.

Jenavieve-Rose avatar Oct 19 '23 03:10 Jenavieve-Rose

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

MaddTheSane avatar Oct 19 '23 08:10 MaddTheSane

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

rybalkoss avatar Nov 07 '23 21:11 rybalkoss

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

rybalkoss avatar Nov 11 '23 06:11 rybalkoss

@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.

leeronr avatar Nov 13 '23 12:11 leeronr

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...

bluevisor avatar Dec 03 '23 13:12 bluevisor