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

[watchOS] MT3001: Could not AOT the assembly mscorlib.dll #12130

Closed
rolfbjarne opened this issue Dec 19, 2018 · 0 comments · Fixed by xamarin/xamarin-android#2609

Comments

@rolfbjarne
Copy link
Member

@rolfbjarne rolfbjarne commented Dec 19, 2018

Source: xamarin/xamarin-macios#5252

Steps to Reproduce

  1. Download a sample
  2. Set Release|iPhone configuration
  3. Build it

Expected Behavior

Build succeeds

Actual Behavior

Build fails

/[path]/SimpleWatchConnectivity.WatchAppExtension/MTOUCH: Error MT3001: Could not AOT the assembly '/[path]/SimpleWatchConnectivity.WatchAppExtension/obj/iPhone/Release/mtouch-cache/3-Build/mscorlib.dll' (MT3001) (SimpleWatchConnectivity.WatchAppExtension)

Complete build log
Crash report: armv7k-unknown-darwin-mono-sgen_2018-12-19-112635_RolfsMacPro.txt

Version Used:

This is happening with xamarin-macios/master (it regressed in xamarin/xamarin-macios@7c4aa8c).

rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Dec 19, 2018
…y we ship.

References:

* mono/mono#12131: LLVM failed for 'UIEdgeInsets.Equals': opcode r4_cneq
* mono/mono#12130: [watchOS] MT3001: Could not AOT the assembly mscorlib.dll
* xamarin#4763: [RFC] Improve handling of filter clauses with LLVM/Bitcode
* https://bugzilla.xamarin.com/show_bug.cgi?id=58209: LLVM/bitcode can't handle filter clauses
@spouliot spouliot added this to the 2018-08 (5.18.xx) milestone Dec 19, 2018
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 19, 2018
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 19, 2018
Fix function name to match code - trampolines in runtime code are prefixed with `xamarin` since the unification of Xamarin.iOS and Xamarin.Mac.
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 19, 2018
* [msbuild] Adds output property for unpacked resources

This output property will be used by VS to create/touch output files on Windows only for the unpacked resources and not for all the resources found.

Partial fix for bug 662636 - *.dylib libraries are signed during full rebuild, but not the second time
https://devdiv.visualstudio.com/DevDiv/_queries/edit/662636

* [msbuild] Adds output property with copied frameworks to MTouchTaskBase

This property is needed from VS to know Frameworks where changed as a result of the mtouch execution. The lack of this information was causing MSBuild to skip the CodesignFrameworks target (from Windows) on incremental builds if the frameworks were copied to the app bundle by mtouch.

Partial fix for bug 662636 - *.dylib libraries are signed during full rebuild, but not the second time
https://devdiv.visualstudio.com/DevDiv/_queries/edit/662636
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 19, 2018
Commit list for xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@44e90a2 Keys in property list dictionaries aren't necessarily unique. Fixes xamarin-macios#5277. (#39) (#41)
* xamarin/Xamarin.MacDev@c81c625 Get rid of spurious <ItemGroup>
* xamarin/Xamarin.MacDev@d1d3fa4 Remove packagerefs. Leads to unintended problems (see discussion xamarin/md-addins#3946) (#38)

Diff: xamarin/Xamarin.MacDev@179f720...44e90a2

Fixes #5277.
vargaz added a commit to vargaz/mono that referenced this issue Dec 19, 2018
monojenkins added a commit to monojenkins/mono that referenced this issue Dec 19, 2018
monojenkins added a commit to monojenkins/mono that referenced this issue Dec 19, 2018
marek-safar added a commit that referenced this issue Dec 19, 2018
marek-safar added a commit that referenced this issue Dec 19, 2018
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 20, 2018
…5190 (#5290)

When `HttpClient` is used it might not be possible to set custom
properties on the handler.

This PR avoids a fight between the `HttpClient.Timeout` and the ones that
`NSURLSession` provides - making its use, as default, working as expected

It is still possible to set those custom properties when creating the
`NSUrlSessionHandler` manually, so there's no loss of functionalities.

Adding a unit test would be tricky since it depends on external sites and
requires "enough" delays to trigger (both leading to false positives over
time).

Notes
* HttpClientHandler timeout is broken -> mono/mono#12100
* CFNetworkHandler is broken when no data is received -> #5289

Fixes #5190
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 20, 2018
This allowed #5252 to pass the PR build: the device build was disabled for the
PR test run.
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 20, 2018
This makes Visual Studio for Mac show a better error message when the system mono is too old:

    FATAL ERROR [2018-12-19 08:07:50Z]: Visual Studio failed to start. Some of the assemblies required to run Visual Studio (for example gtk-sharp)may not be properly installed in the GAC.
    System.Exception: Toolkit could not be loaded ---> System.NotSupportedException: This version of Xamarin.Mac requires Mono 5.18.0.185, but found Mono 5.16.0.209.
      at ObjCRuntime.Runtime.VerifyMonoVersion () [0x000b4] in /work/maccore/master/xamarin-macios/src/ObjCRuntime/Runtime.mac.cs:150
      at ObjCRuntime.Runtime.EnsureInitialized () [0x00030] in /work/maccore/master/xamarin-macios/src/ObjCRuntime/Runtime.mac.cs:117
      at AppKit.NSApplication.Init () [0x00016] in /work/maccore/master/xamarin-macios/src/AppKit/NSApplication.cs:56
      at Xwt.Mac.NSApplicationInitializer.Initialize () [0x00051] in /work/monodevelop/monodevelop/main/external/xwt/Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs:44
      at Xwt.Mac.MacEngine.InitializeApplication () [0x00001] in /work/monodevelop/monodevelop/main/external/xwt/Xwt.XamMac/Xwt.Mac/MacEngine.cs:48

instead of (from mono/monodevelop#6779):

    FATAL ERROR [2018-12-17 14:05:44Z]: Visual Studio failed to start. Some of the assemblies required to run Visual Studio (for example gtk-sharp)may not be properly installed in the GAC.
    System.Exception: Toolkit could not be loaded ---> System.NullReferenceException: Object reference not set to an instance of an object
      at (wrapper managed-to-native) System.Object.wrapper_native_0x102f47470()
      at ObjCRuntime.Runtime.EnsureInitialized () [0x00041] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.6.0.1/src/Xamarin.Mac/ObjCRuntime/Runtime.mac.cs:118
      at AppKit.NSApplication.Init () [0x00016] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.6.0.1/src/Xamarin.Mac/AppKit/NSApplication.cs:56
      at Xwt.Mac.NSApplicationInitializer.Initialize () [0x00046] in /Users/vsts/agent/2.144.0/work/1/s/monodevelop/main/external/xwt/Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs:44
      at Xwt.Mac.MacEngine.InitializeApplication () [0x00000] in /Users/vsts/agent/2.144.0/work/1/s/monodevelop/main/external/xwt/Xwt.XamMac/Xwt.Mac/MacEngine.cs:48
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 20, 2018
Improve rendering of failures on older macOS bots by showing which bot things
failed on in the commit comment.
rolfbjarne referenced this issue in xamarin/xamarin-macios Dec 20, 2018
…cObjectTest.framework need. (#5297)

Fixes these test failure:

    Xamarin.iOS.Tasks.NativeReferencesNoEmbedding("iPhone").FrameworksEmbeddedProperly(True): #RunTarget-ErrorCount
        linker command failed with exit code 1 (use -v to see invocation)
        Native linking failed, undefined Objective-C class: MDLTransform. The symbol '_OBJC_CLASS_$_MDLTransform' could not be found in any of the libraries or frameworks linked with your application.
        Native linking failed. Please review the build log.
    Expected: 0
    But was: 3

    Xamarin.iOS.Tasks.NativeReferencesNoEmbedding("iPhone").ShouldNotUnnecessarilyRebuildFinalProject(True): #RunTarget-ErrorCount
        linker command failed with exit code 1 (use -v to see invocation)
        Native linking failed, undefined Objective-C class: MDLTransform. The symbol '_OBJC_CLASS_$_MDLTransform' could not be found in any of the libraries or frameworks linked with your application.
        Native linking failed. Please review the build log.
    Expected: 0
    But was: 3
rolfbjarne added a commit to xamarin/xamarin-macios that referenced this issue Jan 8, 2019
…y we ship. (#5295)

* [tests] Add test to ensure LLVM succeeds on watchOS for every assembly we ship.

References:

* mono/mono#12131: LLVM failed for 'UIEdgeInsets.Equals': opcode r4_cneq
* mono/mono#12130: [watchOS] MT3001: Could not AOT the assembly mscorlib.dll
* #4763: [RFC] Improve handling of filter clauses with LLVM/Bitcode
* https://bugzilla.xamarin.com/show_bug.cgi?id=58209: LLVM/bitcode can't handle filter clauses

* LLVM failure in mscorlib.dll is now fixed.

* Revert "LLVM failure in mscorlib.dll is now fixed."

This reverts commit ace3c93.

* [tests] Run mtouch tests inprocess.

Fixes a remoting exception:

    System.Runtime.Remoting.RemotingException: Cannot create channel sink to connect to URL fff8ce5c_3219_4dd0_941f_500dd49e02a5/94f23f2_4.rem. An appropriate channel has probably not been registered.

    Server stack trace:
      at System.Runtime.Remoting.RemotingServices.GetClientChannelSinkChain (System.String url, System.Object channelData, System.String& objectUri) [0x00019] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.GetOrCreateClientIdentity (System.Runtime.Remoting.ObjRef objRef, System.Type proxyType, System.Object& clientProxy) [0x0001d] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.GetRemoteObject (System.Runtime.Remoting.ObjRef objRef, System.Type proxyType) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.GetProxyForRemoteObject (System.Runtime.Remoting.ObjRef objref, System.Type classToProxy) [0x0001b] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.Unmarshal (System.Runtime.Remoting.ObjRef objectRef, System.Boolean fRefine) [0x0007a] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.Unmarshal (System.Runtime.Remoting.ObjRef objectRef) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.ObjRef.GetRealObject (System.Runtime.Serialization.StreamingContext context) [0x0000f] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.ObjectManager.ResolveObjectReference (System.Runtime.Serialization.ObjectHolder holder) [0x00010] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.ObjectManager.DoFixups () [0x0007f] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize (System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Serialization.Formatters.Binary.__BinaryParser serParser, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00077] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x000a2] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.DeserializeMethodResponse (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage (System.Runtime.Remoting.Messaging.IMessage msg) [0x00083] in <dcf627861d9e44ce818b79d685496eeb>:0

    Exception rethrown at [0]:
      at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_remoting_wrapper(intptr,intptr)
      at (wrapper remoting-invoke) NUnit.Engine.Agents.RemoteTestAgent.Load()
      at NUnit.Engine.Runners.ProcessRunner.LoadPackage () [0x00040] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.Engine.Runners.AbstractTestRunner.Load () [0x00000] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.Engine.Runners.MasterTestRunner.LoadPackage () [0x0006b] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.Engine.Runners.MasterTestRunner..ctor (NUnit.Engine.IServiceLocator services, NUnit.Engine.TestPackage package) [0x0007a] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.Engine.TestEngine.GetRunner (NUnit.Engine.TestPackage package) [0x0001e] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.ConsoleRunner.ConsoleRunner.RunTests (NUnit.Engine.TestPackage package, NUnit.Engine.TestFilter filter) [0x00095] in <93782c327b3c4ab5aae551528dfe1cae>:0
      at NUnit.ConsoleRunner.ConsoleRunner.Execute () [0x000b6] in <93782c327b3c4ab5aae551528dfe1cae>:0
      at NUnit.ConsoleRunner.Program.Main (System.String[] args) [0x001b5] in <93782c327b3c4ab5aae551528dfe1cae>:0

* [xharness] Run mtouch tests in-process.

* [tests] Don't run the LLVM watchOS tests if we didn't build for device.

* [tests] Update NoLLVMFailuresInWatchOS known failures according to latest mono bump.
jonpryor added a commit to jonpryor/xamarin-android that referenced this issue Jan 11, 2019
Fixes: mono/mono#11874
Fixes: mono/mono#11898
Fixes: mono/mono#12093
Fixes: mono/mono#12130
Fixes: mono/mono#12131

Fix race condition in XmlCharType.Instance.

Fix IndexOutOfRangeException in MethodInfo.ReturnParameter.IsDefined

Fix CVE 2018-8292 on macOS.

NDK r18 build support.

Crash reporter fixes.
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Jan 11, 2019
Fixes: mono/mono#11874
Fixes: mono/mono#11898
Fixes: mono/mono#12093
Fixes: mono/mono#12130
Fixes: mono/mono#12131

Fix race condition in XmlCharType.Instance.

Fix IndexOutOfRangeException in MethodInfo.ReturnParameter.IsDefined

Fix CVE 2018-8292 on macOS.

NDK r18 build support.

Crash reporter fixes.
lewurm added a commit that referenced this issue Jan 14, 2019
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Jan 14, 2019
Fixes: mono/mono#11874
Fixes: mono/mono#11898
Fixes: mono/mono#12093
Fixes: mono/mono#12130
Fixes: mono/mono#12131

Fix race condition in XmlCharType.Instance.

Fix IndexOutOfRangeException in MethodInfo.ReturnParameter.IsDefined

Fix CVE 2018-8292 on macOS.

NDK r18 build support.

Crash reporter fixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.