Bug 47558 - AOT no longer working in Alpha channel
Summary: AOT no longer working in Alpha channel
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2016-11-21 08:21 UTC by Kent
Modified: 2017-08-31 18:45 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: Yes
Last known good build:


Attachments

Description Kent 2016-11-21 08:21:46 UTC
I have a project that builds with AOT enabled in stable/beta. But in alpha (cycle 9) it no longer builds. The output I get is:

[AOT] /Users/vagrant/git/Src/UI.Droid/obj/Release/android/assets/Life.dll
		[aot-compiler stderr] ld: warning: ignoring file /Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/temp-llvm.o, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): /Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/temp-llvm.o
		[aot-compiler stderr] ld: warning: ignoring file /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/mono_aot_zfoSuw.o, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/mono_aot_zfoSuw.o
		[aot-compiler stderr] ld: warning: ld: warning: ignoring file /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9/libgcc.a, file was built for archive which is not the architecture being linked (x86_64): /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9/libgcc.aignoring file /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/platforms/android-24/arch-arm/usr/lib/libc.so, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/platforms/android-24/arch-arm/usr/lib/libc.so
		[aot-compiler stderr] 
		[aot-compiler stderr] ld: warning: ignoring file /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/platforms/android-24/arch-arm/usr/lib/libm.so, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/platforms/android-24/arch-arm/usr/lib/libm.so
		[aot-compiler stderr] /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip:/Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/libaot-Life.dll.so.tmp: File format not recognized
		[aot-compiler stderr] AOT of image /Users/vagrant/git/Src/UI.Droid/obj/Release/android/assets/Life.dll failed.
		[aot-compiler stdout] Mono Ahead of Time compiler - compiling assembly /Users/vagrant/git/Src/UI.Droid/obj/Release/android/assets/Life.dll
		[aot-compiler stdout] AOTID CBD50831-3C66-1EA3-6A4B-F2D133513AE1
		[aot-compiler stdout] Executing opt: "/Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/opt" -f -targetlibinfo -no-aa -basicaa -notti -instcombine -simplifycfg -inline-cost -inline -sroa -domtree -early-cse -lazy-value-info -correlated-propagation -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -indvars -loop-idiom -loop-deletion -loop-unroll -memdep -gvn -memdep -memcpyopt -sccp -instcombine -lazy-value-info -correlated-propagation -domtree -memdep -adce -simplifycfg -instcombine -strip-dead-prototypes -domtree -verify -o "/Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/temp.opt.bc" "/Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/temp.bc"
		[aot-compiler stdout] Executing llc: "/Library/Frameworks/Xamarin.Android.framework/Versions/Current/bin/llc"  -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_Life_eh_frame -relocation-model=pic -filetype=obj -o "/Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/temp-llvm.o" "/Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/temp.opt.bc"
		[aot-compiler stdout] Code: 0(0%) Info: 1214(11%) Ex Info: 1470(13%) Unwind Info: 0(0%) Class Info: 2556(24%) PLT: 185(0%) GOT Info: 4122(39%) Offsets: 1197(11%) GOT: 800
		[aot-compiler stdout] Compiled: 192/192 (100%), LLVM: 192 (100%), No GOT slots: 99 (51%), Direct calls: 0 (100%)
		[aot-compiler stdout] Executing the native assembler: "/Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-as"   -mfpu=vfp3 -o /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/mono_aot_zfoSuw.o /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/mono_aot_zfoSuw
		[aot-compiler stdout] Executing the native linker: clang++  -shared -o /Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/libaot-Life.dll.so.tmp "/Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/temp-llvm.o" /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/mono_aot_zfoSuw.o /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9/libgcc.a /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/platforms/android-24/arch-arm/usr/lib/libc.so /Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/platforms/android-24/arch-arm/usr/lib/libm.so
		[aot-compiler stdout] Stripping the binary: "/Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip" --strip-symbol=\$a --strip-symbol=\$d /Users/vagrant/git/Src/UI.Droid/obj/Release/aot/armeabi-v7a/libaot-Life.dll.so.tmp
: error XA3001: Could not AOT the assembly: obj/Release/android/assets/Life.dll
	Task "Aot" execution -- FAILED

I'm using Bitrise to try this (so I don't have to install alphas on my dev box). This is the version information provided by them:

=== Xamarin specific ===================

--- Xamarin

* Xamarin Studio
Release ID: 602001413
Git revision: 742745078826af5470848930d858e671bb825a16
Build date: 2016-11-14 18:58:31-05

* Mono version:
Mono JIT compiler version 4.8.0 (mono-4.8.0-branch/f5fbc32 Mon Nov 14 14:10:00 EST 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug 
	LLVM:          yes(3.6.0svn-mono-master/8b1520c)
	GC:            sgen
* Mono path:
/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono

* Xamarin.Android
7.1.0

* Xamarin.iOS
mtouch 10.4.0.20 (master: 62816dd)

--- Android

* ANDROID_HOME (/Users/vagrant/Library/Developer/Xamarin/android-sdk-macosx) content:
total 8
drwxr-xr-x  11 vagrant  staff   374B Nov 17 19:09 .
drwxr-xr-x   4 vagrant  staff   136B Nov  2 01:43 ..
-rw-r--r--   1 vagrant  staff   1.1K Oct 13  2015 SDK Readme.txt
drwxr-xr-x   5 vagrant  staff   170B Nov 17 19:19 add-ons
drwxr-xr-x  15 vagrant  staff   510B Nov 17 19:14 build-tools
drwxr-xr-x   4 vagrant  staff   136B Nov 17 19:19 extras
drwxr-xr-x  13 vagrant  staff   442B Nov 17 19:09 platform-tools
drwxr-xr-x  12 vagrant  staff   408B Nov 17 19:12 platforms
drwxr-xr-x   9 vagrant  staff   306B Nov 17 19:18 system-images
drwxr-xr-x   2 vagrant  staff    68B Nov 17 19:19 temp
drwxr-xr-x  31 vagrant  staff   1.0K Nov  2 01:39 tools

* ANDROID_NDK_HOME (/Users/vagrant/Library/Developer/Xamarin/android-ndk/android-ndk-r11c) content:
total 64
drwxr-xr-x  15 vagrant  staff   510B Nov  2 01:44 .
drwxr-xr-x   3 vagrant  staff   102B Nov  2 01:43 ..
-rw-r--r--   1 vagrant  staff   6.3K Mar 30  2016 CHANGELOG.md
drwxr-xr-x  11 vagrant  staff   374B Nov  2 01:43 build
-rwxr-xr-x   1 vagrant  staff    72B Mar 30  2016 ndk-build
-rwxr-xr-x   1 vagrant  staff    95B Mar 30  2016 ndk-depends
-rwxr-xr-x   1 vagrant  staff    91B Mar 30  2016 ndk-gdb
-rwxr-xr-x   1 vagrant  staff    93B Mar 30  2016 ndk-stack
-rwxr-xr-x   1 vagrant  staff    93B Mar 30  2016 ndk-which
drwxr-xr-x  18 vagrant  staff   612B Nov  2 01:43 platforms
drwxr-xr-x   9 vagrant  staff   306B Nov  2 01:43 prebuilt
drwxr-xr-x   6 vagrant  staff   204B Nov  2 01:44 python-packages
-rw-r--r--   1 vagrant  staff    51B Mar 30  2016 source.properties
drwxr-xr-x   5 vagrant  staff   170B Nov  2 01:44 sources
drwxr-xr-x   9 vagrant  staff   306B Nov  2 01:44 toolchains

* platform-tools content:
NOTICE.txt
adb
api
dmtracedump
etc1tool
fastboot
hprof-conv
lib
source.properties
sqlite3
systrace

* build-tools content:
17.0.0
19.1.0
20.0.0
21.1.2
22.0.1
23.0.1
23.0.2
23.0.3
24.0.0
24.0.1
24.0.2
24.0.3
25.0.0

* extras content:
/Users/vagrant/Library/Developer/Xamarin/android-sdk-macosx/extras
├── android
│   ├── m2repository
│   └── support
└── google
    ├── google_play_services
    └── m2repository

6 directories, 0 files

* extra-android-support package version:
Pkg.Revision=23.2.1

* platforms content:
android-10
android-15
android-17
android-19
android-20
android-21
android-22
android-23
android-24
android-25

* system-images content:
/Users/vagrant/Library/Developer/Xamarin/android-sdk-macosx/system-images
├── android-15
│   └── default
│       └── armeabi-v7a
├── android-17
│   └── default
│       └── armeabi-v7a
├── android-19
│   └── default
│       └── armeabi-v7a
├── android-21
│   └── default
│       └── armeabi-v7a
├── android-22
│   └── default
│       └── armeabi-v7a
├── android-23
│   └── google_apis
│       ├── armeabi-v7a
│       └── x86
└── android-24
    └── default
        └── armeabi-v7a

22 directories, 0 files
========================================
Comment 1 Marek Habersack 2017-08-31 18:45:12 UTC
@Kent, could you please attach a small app that reproduces the issue for you (or make the source of your actual application available for us)? While the error messages are clear, the cause is not and we need to be able to reproduce the issue locally in order to fix it. Thanks!

Note You need to log in before you can comment on or make changes to this bug.