-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when cross compiling plugin on Apple Silicon #21
Comments
Hi @bedranfleck
This is the x86_64 toolchain, for Intel/AMD CPUs, the new Apple Silicon CPUs are aarch64 (ARM 64). Maybe try doing something like this
|
The docs in here say the following about the x86_64 naming convention:
So in theory it should build without rosetta, but I'll try anyway. |
Ok, I was able to get past this issue by adding this to CMakeLists before the project() call: This allowed me to bypass the compiler check and execute cmake successfully. However, I'm now stuck with what appears to be a problem in the ordering of search paths when running
I've tried fiddling with how the search paths are being passed in CXXFLAGS and CFLAGS, but to no avail. Any thoughts? |
I've realized that the above won't work, since this will need to produce a shared library, not a static one. So I'm back to where I was before. Building with rosetta didn't work since the binaries at darwin-x86_64 path already include arm support. |
What do you have for $CC, $CXX and $LD ? Maybe check if the fat binaries compatible for M1 can do simple task like
Would be the first error I think |
Hi @PatriceBlin I've been having some issues trying to build the plugin locally. I've been following your guide on how to do this with the android NDK.
I'm trying to do this for NDK r25 revision r450784d.
Environment is macOS 13.6 with an Apple Silicon chip.
LLVM_HOME is set to:
~/tmp/llvm-toolchain/out/stage2-install/
LLVM_DIR is set to:
$LLVM_HOME/lib64/cmake
TOOLCHAIN is
~/tmp/android-ndk-r25/toolchains/llvm/prebuilt/darwin-x86_64
CXX_HEADERS is set to:
$LLVM_HOME/include/c++/v1
but I've tried these as well:android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++
android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/include/c++
When I try to build the plugin I get the following:
The text was updated successfully, but these errors were encountered: