-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix macOS host + linux-bionic-arm64 target cross-compile build #9
Fix macOS host + linux-bionic-arm64 target cross-compile build #9
Conversation
Context: dotnet/runtime#101727 Previously, trying to use `dotnet publish` from a macOS host would result in obscure build failures, e.g. % dotnet publish -c Release … clang : error : invalid linker name in argument '-fuse-ld=lld' Apply the workaround from dotnet/runtime#101727 to workaround this. The `$(ANDROID_NDK_HOME)` environment variable requuired: # we're all xamarin-android devs here, right? ;-) % export ANDROID_NDK_HOME=$HOME/android-toolchain/ndk % dotnet publish -c Release # Creates DotNet/bin/Release/net8.0/linux-bionic-arm64/publish/libdotnet.so
lol, so… While
This is because Fortunately this is "easy" to solve: copy % mkdir Native/app/src/main/jniLibs/arm64-v8a
% cp $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so \
Native/app/src/main/jniLibs/arm64-v8a Build, install, run…
…and it crashes. I think the NativeAOT + macOS host + linux-bionic toolchain is broken:
|
Context: dotnet/runtime#101727
Previously, trying to use
dotnet publish
from a macOS host would result in obscure build failures, e.g.Apply the workaround from dotnet/runtime#101727 to workaround this. The
$(ANDROID_NDK_HOME)
environment variable requuired: