minecraft-again: Can't build on M1 Macbook

Whenever I try to run $ make from the terminal, it gives this error:

jack@Jacks-MacBook-Pro minecraft-again % make
mkdir -p ./bin
export LD_PATH="-framework QuartzCore -framework Cocoa -framework Carbon -framework Metal -framework CoreFoundation -framework IOKit"
cd lib/bx && make osx-arm64
make[1]: *** No rule to make target osx-arm64'.  Stop.
make: *** [libs] Error 2 

Git shows this error when I open the repo’s overview

fatal: no submodule mapping found in .gitmodules for path 'lib/bgfx'

Status: 128

Help…

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 25 (1 by maintainers)

Most upvoted comments

heres a bugfix dont use a mac

Thank you! finally 😃, make clean does not clean bx build, must run rm -rf lib/bx/.build to delete pre-build files, compile passing now.

Ah yes, this is another issue in bx.

  • In lib/bx/scripts/toolchain.lua find the configuration for "osx-arm64" (line 1007).
  • Add the following in to linkoptions list:
      	linkoptions {
      		"-arch arm64",
    +		"-framework Foundation"
      	}
    

Then run make clean inside the lib/bx directory and run make again from the root project directory.

ok, i added and it’s already compiling, but occurred with another error. 😦

==== Building bin2c (debug) ====
Creating ../../osx-arm64/obj/Debug/bin2c
Creating ../../osx-arm64/obj/Debug/bin2c/tools/bin2c
bin2c.cpp
Linking bin2c
Undefined symbols for architecture arm64:
  "_NSLog", referenced from:
      bx::debugOutput(char const*) in libbxDebug.a(debug.o)
  "___CFStringMakeConstantString", referenced from:
      bx::debugOutput(char const*) in libbxDebug.a(debug.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [../../osx-arm64/bin/bin2cDebug] Error 1
make[2]: *** [bin2c] Error 2
make[1]: *** [osx-arm64-debug] Error 2
make: *** [libs] Error 2