Skip to content
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

AOT-compiler path needs to be escaped #6792

Closed
vsfeedback opened this issue Feb 24, 2022 · 6 comments
Closed

AOT-compiler path needs to be escaped #6792

vsfeedback opened this issue Feb 24, 2022 · 6 comments
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects. needs-triage Issues that need to be assigned.

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:I'm unable to use this version] [regression] [worked-in:17.0.0 (with Android NDK: 21)]
Hello,

When I try to build a Android APK I get this error:

La cible est ignorée "_CopyConfigFiles" car elle ne comporte pas d'entrée.
La cible est ignorée "_ConvertPdbFiles", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
Génération partielle de la cible "_AndroidXCecilfyShrinkCopyFiles", car certains fichiers de sortie sont obsolètes par rapport aux fichiers d'entrée.
Copie du fichier de "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\bin\Release\app-name.Android.dll" vers "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\androidx\cecil\app-name.Android.dll".
Copie du fichier de "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\bin\Release\app-name.Android.pdb" vers "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\androidx\cecil\app-name.Android.pdb".
Result of cecilfication: PotentialJni, PotentialJavaArtifacts
Mise à jour de l'horodatage "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\stamp\_CopyIntermediateAssemblies.stamp".
Mise à jour de l'horodatage "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\stamp\_AndroidXCecilfy.stamp".
Mise à jour de l'horodatage "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\link.flag".
La cible est ignorée "_AndroidXJetifyJavaLibraryRules", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
La cible est ignorée "_AndroidXJetifyProguardRules", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
Mise à jour de l'horodatage "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\stamp\_GenerateJavaStubs.stamp".
La cible est ignorée "_ManifestMerger", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
La cible est ignorée "_ConvertCustomView", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
La cible est ignorée "_AddStaticResources", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
La cible est ignorée "_GeneratePackageManagerJava", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
La cible est ignorée "_GenerateAndroidAssetsDir", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
Mise à jour de l'horodatage "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\stamp\_GenerateJavaStubs.stamp".
Mise à jour de l'horodatage "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\stamp\_AndroidXJetifyManifest.stamp".
Mise à jour de l'horodatage "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\android\bin\packaged_resources".
La cible est ignorée "_CompileJava", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
La cible est ignorée "_CompileNativeAssemblySources", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
La cible est ignorée "_CreateApplicationSharedLibraries", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
La cible est ignorée "_CompileToDalvik", car tous les fichiers de sortie sont à jour par rapport aux fichiers d'entrée.
Mise à jour de l'horodatage "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\android\assets\shrunk\shrunk.flag".
La cible est ignorée "_CopyConfigFiles" car elle ne comporte pas d'entrée.
[aot-compiler stderr] C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE: error: cannot open C:\Program Files (x86)\Android\android-sdk
dk-bundle\platforms\android-21\arch-arm\usr\lib\libm.so,profile-only,profile=C:\Program: Invalid argument
[aot-compiler stderr] C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE: error: cannot open Files\Microsoft: No such file or directory
[aot-compiler stderr] C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE: error: cannot open Visual: No such file or directory
[aot-compiler stderr] C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE: error: cannot open Studio\2022\Community\MSBuild\Xamarin\Android\startup-xf.aotprofile: No such file or directory
[aot-compiler stdout] Mono Ahead of Time compiler - compiling assembly C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\android\assets\shrunk\System.Buffers.dll
[aot-compiler stderr] AOT of image C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\android\assets\shrunk\System.Buffers.dll failed.
[aot-compiler stdout] AOTID AD1019B7-376A-0DFD-890D-CCD027E4DD3A
[aot-compiler stdout] Executing opt: "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\Android\opt" -f -O2 -disable-tail-calls -place-safepoints -spp-all-backedges -o "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp.opt.bc" "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp.bc"
[aot-compiler stdout] Executing llc: "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\Android\llc"  -enable-implicit-null-checks -disable-fault-maps -mattr=+vfp2,-neon,+d16 -asm-verbose=false -mtriple=armv7-linux-gnueabi -disable-gnu-eh-frame -enable-mono-eh-frame -mono-eh-frame-symbol=mono_aot_System_Buffers_eh_frame -disable-tail-calls -relocation-model=pic -o "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp-llvm.s" "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp.opt.bc"
[aot-compiler stdout] Compiled: 5/5
[aot-compiler stdout] Executing the native assembler: "C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-as"   -mfpu=vfp3 -o C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp.s.o C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp.s
[aot-compiler stdout] Executing the native assembler: "C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-as"   -mfpu=vfp3 -o C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp-llvm.o C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp-llvm.s
[aot-compiler stdout] Executing the native linker: "C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE" -Bsymbolic -shared -o C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\libaot-System.Buffers.dll.so.tmp "C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp-llvm.o" C:\Users\user\Documents\Project_builds\app-name\app-name.Android\obj\Release\aot\armeabi-v7a\System.Buffers.dll\temp.s.o "-LC:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib\gcc\arm-linux-androideabi\4.9.x" "-LC:\Program Files (x86)\Android\android-sdk
dk-bundle\platforms\android-21\arch-arm\usr\lib" "-LC:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\..\sysroot\usr\lib\arm-linux-androideabi" "C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib\gcc\arm-linux-androideabi\4.9.x\libgcc.a" "C:\Program Files (x86)\Android\android-sdk
dk-bundle\platforms\android-21\arch-arm\usr\lib\libc.so" "C:\Program Files (x86)\Android\android-sdk
dk-bundle\platforms\android-21\arch-arm\usr\lib\libm.so",profile-only,profile=C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\Android\startup-xf.aotprofile
XA3001: Could not AOT the assembly: System.Buffers.dll
Génération du projet "app-name.Android.csproj" terminée -- ÉCHEC.
ÉCHEC de la build.

This error happen in:
Visual Studio 2022 17.1.0
Xamarin Android 12.2.0.4
Android NDK: 22.1.7171670


Original Comments

Feedback Bot on 2/17/2022, 11:27 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Winnie zhang (CSI Interfusion Inc) [MSFT] on 2/21/2022, 00:33 AM:

Thanks for your feedback!
We are very sorry for the trouble caused by this issue.
For us to investigate this further, could you provide your repro steps and screen recording about this issue? And could you collect a Diagnostic build output? For collect Diagnostic build output, you can change the build output verbosity to “Diagnostic” from Tools -> Options -> Projects and Solutions -> Build and Run -> MS Build project build output verbosity, build project and then copy the content of the Build output pane.
Looking forward to hearing from you!

Josué Tille on 2/22/2022, 07:19 AM:

(private comment, text removed)

Winnie zhang (CSI Interfusion Inc) [MSFT] on 2/23/2022, 00:48 AM:

This feedback is being re-triaged as we are moving it to another team that can better help with the issue. Thanks for your patience.

Feedback Bot on 2/23/2022, 06:53 AM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.


Original Solutions

(no solutions)

@samhouts samhouts added the needs-triage Issues that need to be assigned. label Feb 28, 2022
@jpobst
Copy link
Contributor

jpobst commented Mar 1, 2022

This seems to be the error (need to escape path):

[aot-compiler stderr] C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE: error: cannot open C:\Program Files (x86)\Android\android-sdk
dk-bundle\platforms\android-21\arch-arm\usr\lib\libm.so,profile-only,profile=C:\Program: Invalid argument
[aot-compiler stderr] C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE: error: cannot open Files\Microsoft: No such file or directory
[aot-compiler stderr] C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE: error: cannot open Visual: No such file or directory
[aot-compiler stderr] C:\Program Files (x86)\Android\android-sdk
dk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.EXE: error: cannot open Studio\2022\Community\MSBuild\Xamarin\Android\startup-xf.aotprofile: No such file or directory

@jpobst jpobst assigned jonathanpeppers and unassigned jpobst Mar 1, 2022
@jpobst jpobst added the Area: App+Library Build Issues when building Library projects or Application projects. label Mar 1, 2022
@jpobst jpobst changed the title Xamarin Android - Can't build APK AOT-compiler path needs to be escaped Mar 1, 2022
@jonathanpeppers
Copy link
Member

I think this is fixed in main via: 5d2bc5e

A workaround is to not use LLVM and Profiled AOT at the same time, so setting EnableLLVM=false.

Josué Tille let us know if you still have a problem when using the workaround, thanks!

@AlleSchonWeg
Copy link

@jonathanpeppers
When will this fix available? Will this fixed with a Visual Studio Update? Version 17.1.4 still has this issue.
My workaround is using VS 16.11.10. I'm afraid to update it.
Thank you.

@jonathanpeppers
Copy link
Member

VS 17.2 previews should have this fix.

@Auto72
Copy link

Auto72 commented Apr 14, 2022

With VS 17.2.0 Preview 3.0 I was able to successfully archive my Xamarin Forms project, using the following options:

[x] AOT Compilation
[x] Use LLVM Optimizing Compiler
[x] Enable Startup Tracing

While with VS 17.1.4 I got the error related to path not escaped.

I used NDK versione 21.4.7075529.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App+Library Build Issues when building Library projects or Application projects. needs-triage Issues that need to be assigned.
Projects
None yet
Development

No branches or pull requests

7 participants