Cemu
Cemu copied to clipboard
Error in MacOS cmake -S command
Paths declared in cmake command in step 3 of building Cemu on MacOS (https://github.com/cemu-project/Cemu/blob/main/BUILD.md#build-cemu-using-cmake-and-clang-1) for llvm@14 compilers and ninja are incorrect
Currently:
cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/local/opt/llvm@14/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@14/bin/clang++ -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja
brew for MacOS does not install llvm@14 or ninja to those paths.
llvm@14 clang path is /opt/homebrew/opt/llvm@14/bin/clang
llvm@14 clang++ path is /opt/homebrew/opt/llvm@14/bin/clang++
The following cmake command works:
cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@14/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@14/bin/clang++ -G Ninja -DCMAKE_MAKE_PROGRAM=/opt/homebrew/opt/ninja/bin/ninja
On ARM brew installations, the homebrew path is /opt/homebrew
.
On Intel brew installations, the homebrew path is /usr/local
Before compiling, run arch -x86_64 zsh
. Then, install brew again (this won't conflict with your ARM brew installation), and all dependencies.
Installing brew and the dependencies while inside arch -x86_64 zsh
will install everything to /usr/local
.
So there are no plans for an arm64 build?
On ARM brew installations, the homebrew path is /opt/homebrew. On Intel brew installations, the homebrew path is /usr/local
Before compiling, run arch -x86_64 zsh. Then, install brew again (this won't conflict with your ARM brew installation), and all dependencies.
Installing brew and the dependencies while inside arch -x86_64 zsh will install everything to /usr/local.
Ya it doesn't. It's still trying to install from the arm64 brew install. I'm not going to complete change my dev environment just for this.
Update: You specifically need to run the homebrew install in /usr/local/bin
-
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
arch -x86_64 /usr/local/bin/brew reinstall git cmake llvm@14 ninja nasm molten-vk
-
arch -x86_64 /usr/local/bin/git clone --recursive https://github.com/cemu-project/Cemu
-
cd Cemu
-
arch -x86_64 /usr/local/bin/cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/local/opt/llvm@14/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@14/bin/clang++ -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -G Ninja
-
arch -x86_64 /usr/local/bin/cmake --build build
-
./bin/Cemu_release
I just ran each command with arch -x86_64
just to remove any chance of running the arm64 install of the binaries
So there are no plans for an arm64 build?
On the Cemu roadmap, it's planned to switch to LLVM as a CPU backend, which can then be built for arm64.