This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 41431 - [aot] Build fails due to 'Sgen STW requires a working mono-context' error
Summary: [aot] Build fails due to 'Sgen STW requires a working mono-context' error
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler (show other bugs)
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Aleksey Kliger
URL:
Depends on:
Blocks:
 
Reported: 2016-06-01 13:17 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2016-06-06 17:37 UTC (History)
4 users (show)

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


Attachments

Description Rolf Bjarne Kvinge [MSFT] 2016-06-01 13:17:38 UTC
Repro:

* Open xamarin-macios/tests/tests.sln
* Build the 'mtouch' project
* Run the MT4146 test in Xamarin Studio's unit test pad (mtouch.MTouchTests.Registrar.MT4146)

Result:

    ***** MTouchTests.Registrar.MT4146
    /Library/Frameworks/Mono.framework/Commands/mcs  /unsafe /debug:full /nologo /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/Test.cs -r:/Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/Xamarin.iOS.dll -lib:/Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS 
    
    /Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/Test.exe -dev /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/Test.app --sdk 9.3 -targetver 9.3 --abi=armv7 --registrar:static --sdkroot /Applications/Xcode73.app/Contents/Developer --cache /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache --nolink  --debug -r:/Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/Xamarin.iOS.dll --target-framework:Xamarin.iOS,v1.0
    5/31/2016 1:08:17 PM Executed in 00:00:17.8266022: /Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/Test.exe -dev /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/Test.app --sdk 9.3 -targetver 9.3 --abi=armv7 --registrar:static --sdkroot /Applications/Xcode73.app/Contents/Developer --cache /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache --nolink  --debug -r:/Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/Xamarin.iOS.dll --target-framework:Xamarin.iOS,v1.0
    /Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/Test.exe -dev /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/Test.app --sdk 9.3 -targetver 9.3 --abi=armv7 --registrar:static --sdkroot /Applications/Xcode73.app/Contents/Developer --cache /var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache --nolink  --debug -r:/Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.iOS/Xamarin.iOS.dll --target-framework:Xamarin.iOS,v1.0
    Xamarin.iOS 9.9.0 using framework: /Applications/Xcode73.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk
    warning MT4146: The Name parameter of the Registrar attribute on the class 'C' contains an invalid character: ' ' (0x20)
    AOT Compilation exited with code 134, command:
    MONO_PATH=/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache/Build /Users/builder/data/lanes/1381/c5ef10a2/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/bin/arm-darwin-mono-sgen --debug -O=gsharedvt  --aot=mtriple=armv7-ios,data-outfile=/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache/Xamarin.iOS.armv7.aotdata,static,asmonly,direct-icalls,full,dwarfdebug,no-direct-calls,direct-pinvoke,outfile=/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache/Xamarin.iOS.dll.armv7.s "/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache/Build/Xamarin.iOS.dll"
    Mono Ahead of Time compiler - compiling assembly /private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache/Build/Xamarin.iOS.dll
    Sgen STW requires a working mono-context
    
    error MT3001: Could not AOT the assembly '/private/var/folders/9t/bhhqghxd4131b5k43v0yk7yc0000gn/T/tmp582f5063.tmp/cache/Build/Xamarin.iOS.dll'

This also happesn with other tests:

* MTouchTests.MTouch.TestCaseMismatchedAssemblyName
* MTouchTests.MTouch.FastDev_LinkAll_Then_NoLink(Classic)
* MTouchTests.MTouch.FastDev_NoLink(Unified)

Tt's always the same library (Xamarin.iOS.dll), and seems to only happen if the linker is disabled.
Comment 1 Rodrigo Kumpera 2016-06-03 18:44:30 UTC
Hey Aleksey,

Could you take a look at this issue?
Comment 2 Rodrigo Kumpera 2016-06-06 16:34:34 UTC
Hey Aleksey,

Could you take a look at this issue?
Comment 3 Zoltan Varga 2016-06-06 17:37:10 UTC
Should be fixed by the mono bump in 24bd707bb47d0454b2186fe52bfb8e36024d37a7.

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