Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
When setting --aot-options=-O=float32 as noted in our Advanced Topics guide for Floating Point , and then performing a calculation on two float or nfloat variables, the build fails with the following error message:
>/Users/apple/Downloads/TestAotOptions/TestAotOptions/MTOUCH: Error MT3001: Could not AOT the assembly '/Users/apple/Downloads/TestAotOptions/TestAotOptions/obj/iPhone/Debug/mtouch-cache/32/Build/Xamarin.iOS.dll' (MT3001) (TestAotOptions)
and the following in the build output:
>Mono Ahead of Time compiler - compiling assembly /Users/apple/Downloads/TestAotOptions/TestAotOptions/obj/iPhone/Debug/mtouch-cache/32/Build/Xamarin.iOS.dll
> unknown opcode r4_rem in mono_arch_output_basic_block()
> * Assertion: should not be reached at ../../../../../mono/mono/mini/mini-arm.c:5884
> AOT Compilation exited with code 134, command:
> MONO_PATH=/Users/apple/Downloads/TestAotOptions/TestAotOptions/obj/iPhone/Debug/mtouch-cache/32/Build /Library/Frameworks/Xamarin.iOS.framework/Versions/22.214.171.124/bin/arm-darwin-mono-sgen --debug -O=gsharedvt -O=float32 --aot=mtriple=armv7-ios,full,static,asmonly,direct-icalls,dwarfdebug,no-direct-calls,iphone-abi,outfile=/Users/apple/Downloads/TestAotOptions/TestAotOptions/obj/iPhone/Debug/mtouch-cache/Xamarin.iOS.dll.armv7.s "/Users/apple/Downloads/TestAotOptions/TestAotOptions/obj/iPhone/Debug/mtouch-cache/32/Build/Xamarin.iOS.dll"
## Steps to reproduce
1. Create a new Single View Xamarin iOS Unified API app project.
2. Add --aot-options=-O=float32 to the "Additional touch arguments" for Debug iPhone configuration.
3. Add the following code to the AppDelegate Finished Launching method:
>float x = 1.0f;
>float y = 1.0f;
>float z = x % y;
4. Launch the project to an iOS device.
Expected result: App will build and launch.
Actual result: Build failed with above noted errors.
Tried using nfloat instead of float but this had no effect.
## My environment
=== Xamarin Studio ===
Version 5.9.2 (build 4)
Installation UUID: 2dc9022f-f9a8-424f-8284-bf224cbbfde0
Mono 4.0.1 ((detached/ed1d3ec)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400010044
=== Xamarin.Android ===
Version: 126.96.36.199 (Business Edition)
Android SDK: /Users/apple/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_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
=== Xamarin Android Player ===
Version: Unknown version
Location: /Applications/Xamarin Android Player.app
=== Apple Developer Tools ===
Xcode 6.3.2 (7718)
=== Xamarin.iOS ===
Version: 188.8.131.52 (Business Edition)
Build date: 2015-05-21 21:55:09-0400
=== Xamarin.Mac ===
Version: 184.108.40.206 (Business Edition)
=== Build Information ===
Release ID: 509020004
Git revision: 288eb01e990f2d93b856c9600a0c40708b930128
Build date: 2015-06-01 14:29:52-04
Xamarin addins: c12ed369b0e05dc5c35c9350fdcbc00a46c0ff99
=== Operating System ===
Mac OS X 10.10.3
Darwin Jons-iMac.local 14.3.0 Darwin Kernel Version 14.3.0
Mon Mar 23 11:59:05 PDT 2015
Fixed in mono master 550a8017ec225f016a81f6e37ecfcf97e94395f6.
This could be a candidate for sr2/3.
Can you guys update this ticket when the fix goes live?
We're nearing release of a product, and this should give us improved performance. We'd like to use it ASAP.
A workaround is to avoid doing floating point remainder operations in c# code, they are emulated even in C (fmod), so they are never going to be fast.
I have checked this issue with monotouch-220.127.116.11_6403a1e181e3736e1c7b2a24e6a833aade506340 and observed that this issue working fine after following steps mentioned in bug description as shown in screencast : http://www.screencast.com/t/x9PeRVlV
Hence closing this issue