Bug 30823 - Aot task fails when linker is set to don't link
Summary: Aot task fails when linker is set to don't link
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 5.1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 5.1.5 (C5SR3)
Assignee: João Matos
URL:
: 30134 ()
Depends on:
Blocks:
 
Reported: 2015-06-04 17:41 UTC by Peter Collins
Modified: 2015-07-14 13:38 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Peter Collins 2015-06-04 17:41:39 UTC
Steps to reproduce:
1. Open or create new XA project in XS/VS.
2. Change to release configuration, and edit project options to enable AOT and set the linker to don't link.
3. Attempt to deploy to device.

[aot-compiler stderr] Failed to load method 0x6000001 from '/Users/petercollins/Projects/testnolink/bin/Release/testnolink.dll' due to Could not load file or assembly or one of its dependencies. assembly:Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065 type:<unknown type> member:<none>.
	

Diagnostic build output:
https://gist.github.com/pjcollins/6fcc64d63118b1f9f8df

Environment:
OSX Yosemite
mandroid 5.1.99.24676320
Comment 2 Peter Collins 2015-06-05 12:52:29 UTC
*** Bug 30134 has been marked as a duplicate of this bug. ***
Comment 3 Nischal 2015-06-08 04:45:14 UTC
I have checked this Issue with C5SR2 builds and followed steps mentioned in bug. I am successfully able to deploy application to device having AOT enabled and linker as 'Don't link' . This is the application output for the same: https://gist.github.com/saurabh360/4a3d6f58f62e20207b93 and http://www.screencast.com/t/VbRHCpv6L3m

=== Xamarin Studio ===

Version 5.9.4 (build 3)
Installation UUID: 2939b8b4-8977-42bd-82d6-100275ccd9cd
Runtime:
	Mono 4.0.2 ((detached/198235d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020004

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.Mac ===

Version: 2.1.0.931 (Enterprise Edition)

=== Xamarin.iOS ===

Version: 8.10.2.16 (Enterprise Edition)
Hash: b2ebbc0
Branch: master
Build date: 2015-06-06 01:13:21-0400

=== Xamarin.Android ===

Version: 5.1.4.8 (Enterprise Edition)
Android SDK: /Users/360_macmini/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 509040003
Git revision: 71a8c576686882a0ad224f735d9f04a6c08119c8
Build date: 2015-06-04 02:45:11-04
Xamarin addins: 456e0954631a1a80bc90389e99c6d16cd8f09ad3

=== Operating System ===

Mac OS X 10.9.4
Darwin 360-MACMINIs-Mac-mini-2.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 4 Peter Collins 2015-06-11 23:20:11 UTC
Moving to SR3 and re-opening as the original fix somehow caused a regression and has since been reverted.  See bug #30990 for more info.
Comment 5 Abhishek 2015-06-30 10:12:52 UTC
I have checked this Issue with latest builds of master i.e. XA 5.1.99.-457. I am successfully able to deploy application to device/Emulator having AOT enabled and linker as 'Don't link' . 

As of now I am changing bug status to RESOLVED FIXED and I will VERIFY this issue when the build merged in release branch.

Environment Info:

=== Xamarin Studio ===

Version 5.9.4 (build 6)
Installation UUID: 93e693b0-b53d-40f4-b29c-b61ff5cbe892
Runtime:
	Mono 4.0.2 ((detached/198235d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020004

=== Xamarin.Android ===

Version: 5.1.99.457 (Enterprise Edition)
Android SDK: /Users/xamarin23/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.3 (7569)
Build 6D570

=== Xamarin.iOS ===

Version: 8.10.2.31 (Enterprise Edition)
Hash: 3570875
Branch: master
Build date: 2015-06-30 04:42:53-0400

=== Xamarin.Mac ===

Version: 2.0.2.31 (Enterprise Edition)

=== Build Information ===

Release ID: 509040006
Git revision: 5f3f12b6f585f47a55e895140de9bdd8fcef5626
Build date: 2015-06-22 15:01:40-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.10.0
Darwin 800BC.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 6 Mohit Kheterpal 2015-07-14 13:38:38 UTC
I have checked this issue with C5SR3 build of XA i.e. mono-android-5.1.5-1_17843e3350f88de6656e39ce5dd379eb191d140d and observed that this issue is working fine.

Hence closing this issue.