Skip to content

[Android] .NET 9 android build breaks when using NDK 23 #111695

@jkurdek

Description

@jkurdek

63cb882 introduced a hotfix into .NET 9 to allow for building with NDK 27. This causes build to fail when using old NDK 23 locally:

  Libclang '~/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/lib64/libclang.so.12git /usr/local/lib/libclang.so' doesn't exist.

Error stems form incorrect conditions in mono.proj. _LibClang is an item not a property, it should be referred to using @.

runtime/src/mono/mono.proj

Lines 821 to 822 in 0b71788

<_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib64/libclang.so.*" Condition=" '$(_LibClang)' == '' "/>
<_LibClang Include="/usr/local/lib/libclang.so" Condition="'$(_LibClang)' == ''" />

Reproduction steps:

export SDK
export NDK 23
./build.sh -arch x64 -s mono+libs+libs.tests -os android  -c Release

\cc: @steveisok

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions