Skip to content

Revert "[Xamarin.Android.Build.Tasks] $(AndroidNdkDirectory) is optio… - #6560

Closed
jonpryor wants to merge 1 commit into
dotnet:mainfrom
jonpryor:jonp-revert-6539
Closed

jonpryor wants to merge 1 commit into
dotnet:mainfrom
jonpryor:jonp-revert-6539

Conversation

@jonpryor

@jonpryor jonpryor commented Dec 9, 2021

Copy link
Copy Markdown
Contributor

…nal (#6539)"

This reverts commit c96d9f4.

Context? #6520

On CI, ever since c96d9f4 landed, the
NoSymbolsArgShouldReduceAppSize test has been failing.

Is this because of c96d9f4?

Try reverting c96d9f4, see if the test passes again.

…nal (dotnet#6539)"

This reverts commit c96d9f4.

Context? dotnet#6520

On CI, ever since c96d9f4 landed, the
`NoSymbolsArgShouldReduceAppSize` test has been failing.

Is this because of c96d9f4?

Try reverting c96d9f4, see if the test passes again.
@jonpryor

jonpryor commented Dec 9, 2021 •

Copy link
Copy Markdown
Contributor Author

Conjecture:

The failing NoSymbolsArgShouldReduceAppSize test was merged on 2021-Dec-6 in #6544.

The change to make $(AndroidNdkDirectory) optional in #6539 was also merged on 2021-Dec-06, and was last updated on 2021-Nov-30, before #6544 was merged. PR #6539 thus never ran the NoSymbolsArgShouldReduceAppSize test.

#6544 passed because our unit tests provision the NDK into $HOME, which is a directory that doesn't contain spaces.

#6539, in making the NDK "optional", instead uses NDK-related tooling that are located in the Xamarin.Android installation directory, which is within Visual Studio, which is underneath C:\Program Files…, which is a directory which contains spaces.

Thus, it looks like #6539 "broke" the NoSymbolsArgShouldReduceAppSize test, by causing it to use NDK-related tools in a directory containing spaces. (Which is something that we should be testing for anyway! And I thought was checked for as part of fd5f31c! Apparently that's still not quite enough.)

If this PR has NoSymbolsArgShouldReduceAppSize pass, this conjecture will be validated.

@jonpryor

jonpryor commented Dec 9, 2021

Copy link
Copy Markdown
Contributor Author

Assuming that the conjecture is validated, what do we do?

  1. We could revert [Xamarin.Android.Build.Tasks] make $(AndroidNdkDirectory) optional #6539, making the NDK required. However, this only "hides" the problem; builds will still fail if the NDK installation directory contains spaces.
  2. We could revert [tests] enable NoSymbolsArgShouldReduceAppSize test #6544, disabling the NoSymbolsArgShouldReduceAppSize test. We still have a problem if the NDK dir contains spaces, but at least we'll be green!
  3. Just leave the test failing until Issue .NET SDK for Android + $(EnableLLVM)=True + $(AotAssemblies)=True + Windows: bad path quoting? #6520 is fixed.

If (3) doesn't take too long, that might be the better idea.

@jonathanpeppers jonathanpeppers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go with option 2 and revert this one instead:

#6544

Option 3 will require a change in dotnet/runtime to fix, and it seems preferable for the $(AndroidNdkDirectory) to not be required even if it uncovered a separate issue.

@jonpryor

jonpryor commented Dec 9, 2021

Copy link
Copy Markdown
Contributor Author

@jonpryor wrote:

If this PR has NoSymbolsArgShouldReduceAppSize pass, this conjecture will be validated.

NoSymbolsArgShouldReduceAppSize passed, which is the behavior seen with PR #6544. The conjecture is validated.

We'll revert #6544 so that our CI can be green again, and properly fix it when a proper fix exists.

@jonpryor jonpryor closed this Dec 9, 2021
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Dec 9, 2021
)"

This reverts commit 5dcf294.

Context: dotnet#6520
Context: dotnet#6560
Context: 5dcf294
Context: c96d9f4

There was a "curious" interaction between 5dcf294 (PR dotnet#6544) and
commit c96d9f4 (PR dotnet#6539): they both had green PRs, but each of
their PR build ran without the other existing.  Once both were merged,
all subsequent commits, and PRs based on c96d9f4, had a unit test
failure in `NoSymbolsArgShouldReduceAppSize`:

	Task "MonoAOTCompiler" requested 6 cores, acquired 6 cores, and now holds 6 cores total.
	[System.Private.CoreLib.dll] Running: C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools\mono-aot-cross.exe --response="C:\Users\cloudtest\AppData\Local\Temp\tmp4D48.tmp"
	[System.Private.CoreLib.dll] Using working directory: C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked
	[System.Private.CoreLib.dll] Setting environment variables for execution:
	[System.Private.CoreLib.dll] 	MONO_PATH = C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked;
	[System.Private.CoreLib.dll] 	MONO_ENV_OPTIONS =
	[System.Private.CoreLib.dll] Exit code: 1
	[System.Private.CoreLib.dll] Exec (with response file contents expanded) in C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked: MONO_PATH=C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked; MONO_ENV_OPTIONS= C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools\mono-aot-cross.exe --debug --llvm "--aot=asmwriter,mtriple=aarch64-linux-android,tool-prefix=C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-,ld-name=ld.EXE,ld-flags=-LC:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21 C:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libc.so C:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libm.so,temp-path=C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib,nodebug,llvm-path=C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools,outfile=C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\System.Private.CoreLib.dll.so,llvm-outfile=C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\System.Private.CoreLib.dll-llvm.o" "System
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find Files\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find C:\Program\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find Files\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libc.so: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find C:\Program\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find Files\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libm.so: No such file or directory
	AOT of image System.Private.CoreLib.dll failed.
	Mono Ahead of Time compiler - compiling assembly C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked\System.Private.CoreLib.dll
	AOTID EE73FF83-5340-500C-4239-56CE4D83F91B
	Executing opt: "C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools\opt" -f -O2 -disable-tail-calls -place-safepoints -spp-all-backedges -o "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.opt.bc" "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.bc"
	Executing llc: "C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools\llc"  -enable-implicit-null-checks -disable-fault-maps -march=aarch64 -asm-verbose=false -mtriple=aarch64-linux-android -disable-gnu-eh-frame -enable-mono-eh-frame -mono-eh-frame-symbol=mono_aot_corlib_eh_frame -disable-tail-calls -relocation-model=pic -filetype=obj -o "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp-llvm.o" "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.opt.bc"
	Compiled: 7440/7440
	Executing the native assembler: "C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-as"   -o C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.s.o C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.s
	Executing the native linker: "C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE" -Bsymbolic -shared -o C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\System.Private.CoreLib.dll.so.tmp "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp-llvm.o" C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.s.o -LC:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21 C:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libc.so C:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libm.so
	1:8>C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\targets\Microsoft.Android.Sdk.Aot.targets(71,5): error : Precompiling failed for C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked\System.Private.CoreLib.dll [C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\UnnamedProject.csproj]

This is the same error scenario as Issue dotnet#6520.

The "curious interaction" is as follows: the
`NoSymbolsArgShouldReduceAppSize` works under .NET 6 *so long as* the
NDK toolchain is installed into a directory that doesn't have spaces.
When dotnet#6544 ran, this was the case: it used the NDK provisioned by our
build process, located in `$HOME`.

Commit c96d9f4 / PR dotnet#6539 changed this: the NDK became optional
except when LLVM is required, because NDK tools located within the
Xamarin.Android install could be used instead.  As part of this
change, `$(AndroidNdkDirectory)` was *not* always set to the NDK
provisioned by the unit tests.  When an NDK *was* required, the
system-wide / VS-provided NDK was used instead, at:

	C:\Program Files (x86)\Android\android-sdk\ndk\23.1.7779620

Once both commits 5dcf294 and c96d9f4 landed, the *now running*
`NoSymbolsArgShouldReduceAppSize` test failed, as it was trying to
use the system-wide NDK directory.

Revert commit 5dcf294, disabling the
`NoSymbolsArgShouldReduceAppSize`.  We'll re-enable it once we fix
Issue dotnet#6520.
jonpryor added a commit that referenced this pull request Dec 10, 2021
…6561)

This reverts commit 5dcf294.

Context: #6520
Context: #6560
Context: 5dcf294
Context: c96d9f4

There was a "curious" interaction between 5dcf294 (PR #6544) and
commit c96d9f4 (PR #6539): they both had green PRs, but each of
their PR builds ran without the other existing.  Once both were
merged, all subsequent commits, and PRs based on c96d9f4, had a unit
test failure in `NoSymbolsArgShouldReduceAppSize`:

	Task "MonoAOTCompiler" requested 6 cores, acquired 6 cores, and now holds 6 cores total.
	[System.Private.CoreLib.dll] Running: C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools\mono-aot-cross.exe --response="C:\Users\cloudtest\AppData\Local\Temp\tmp4D48.tmp"
	[System.Private.CoreLib.dll] Using working directory: C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked
	[System.Private.CoreLib.dll] Setting environment variables for execution:
	[System.Private.CoreLib.dll] 	MONO_PATH = C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked;
	[System.Private.CoreLib.dll] 	MONO_ENV_OPTIONS =
	[System.Private.CoreLib.dll] Exit code: 1
	[System.Private.CoreLib.dll] Exec (with response file contents expanded) in C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked: MONO_PATH=C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked; MONO_ENV_OPTIONS= C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools\mono-aot-cross.exe --debug --llvm "--aot=asmwriter,mtriple=aarch64-linux-android,tool-prefix=C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-,ld-name=ld.EXE,ld-flags=-LC:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21 C:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libc.so C:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libm.so,temp-path=C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib,nodebug,llvm-path=C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools,outfile=C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\System.Private.CoreLib.dll.so,llvm-outfile=C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\System.Private.CoreLib.dll-llvm.o" "System
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find Files\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find C:\Program\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find Files\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libc.so: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find C:\Program\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find Files\: No such file or directory
	C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE: cannot find (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libm.so: No such file or directory
	AOT of image System.Private.CoreLib.dll failed.
	Mono Ahead of Time compiler - compiling assembly C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked\System.Private.CoreLib.dll
	AOTID EE73FF83-5340-500C-4239-56CE4D83F91B
	Executing opt: "C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools\opt" -f -O2 -disable-tail-calls -place-safepoints -spp-all-backedges -o "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.opt.bc" "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.bc"
	Executing llc: "C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64\6.0.1-mauipre.1.21602.7\Sdk\..\tools\llc"  -enable-implicit-null-checks -disable-fault-maps -march=aarch64 -asm-verbose=false -mtriple=aarch64-linux-android -disable-gnu-eh-frame -enable-mono-eh-frame -mono-eh-frame-symbol=mono_aot_corlib_eh_frame -disable-tail-calls -relocation-model=pic -filetype=obj -o "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp-llvm.o" "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.opt.bc"
	Compiled: 7440/7440
	Executing the native assembler: "C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-as"   -o C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.s.o C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.s
	Executing the native linker: "C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\tools\binutils\aarch64-linux-android-ld.EXE" -Bsymbolic -shared -o C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\System.Private.CoreLib.dll.so.tmp "C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp-llvm.o" C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\aot\arm64-v8a\System.Private.CoreLib\temp.s.o -LC:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21 C:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libc.so C:\Program\ Files\ (x86)\Android\android-sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\21\libm.so
	1:8>C:\Users\cloudtest\android-toolchain\dotnet\packs\Microsoft.Android.Sdk.Windows\31.0.101-preview.12.134\targets\Microsoft.Android.Sdk.Aot.targets(71,5): error : Precompiling failed for C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\obj\Release\android-arm64\linked\System.Private.CoreLib.dll [C:\a\_work\1\a\TestRelease\12-09_14.48.54\temp\NoSymbolsArgShouldReduceAppSize\UnnamedProject.csproj]

This is the same error scenario as Issue #6520.

The "curious interaction" is as follows: the
`NoSymbolsArgShouldReduceAppSize` works under .NET 6 *so long as* the
NDK toolchain is installed into a directory that doesn't have spaces.
When #6544 ran, this was the case: it used the NDK provisioned by our
build process, located in `$HOME`.

Commit c96d9f4 / PR #6539 changed this: the NDK became optional
except when LLVM is required, because NDK tools located within the
Xamarin.Android install could be used instead.  As part of this
change, `$(AndroidNdkDirectory)` was *not* always set to the NDK
provisioned by the unit tests.  When an NDK *was* required, the
system-wide / VS-provided NDK was used instead, at:

	C:\Program Files (x86)\Android\android-sdk\ndk\23.1.7779620

Once both commits 5dcf294 and c96d9f4 landed, the *now running*
`NoSymbolsArgShouldReduceAppSize` test failed, as it was trying to
use the system-wide NDK directory.

Revert commit 5dcf294, disabling the
`NoSymbolsArgShouldReduceAppSize`.  We'll re-enable it once we fix
Issue #6520.
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants