Bug 55622 - Improve warning when static registrar compilation fails
Summary: Improve warning when static registrar compilation fails
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: Master
Hardware: PC Mac OS
: High enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Chris Hamons
Depends on:
Reported: 2017-04-26 14:19 UTC by Chris Hamons
Modified: 2017-04-27 16:22 UTC (History)
3 users (show)

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 for Bug 55622 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Chris Hamons 2017-04-26 14:19:46 UTC
You get errors such as these.

Error MM4162: The type 'AVFoundation.AVContentKeyRequest' (used as a parameter in AVFoundation.AVContentKeySession.RenewExpiringResponseData) is not available in macOS 10.12.2 (it was introduced in macOS 10.12.4). Please build with a newer macOS SDK (usually done by using the most recent version of Xcode).<--- (MM4162) (projname) ---> (Inner Exception #0)

It should be reasonable to search the error message for something like "is not available in macOS" and show a custom error that suggests:

- Enable linking
- Upgrade Xcode
- Disable static registrar.

See https://bugzilla.xamarin.com/show_bug.cgi?id=54998 for an example.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2017-04-27 05:44:30 UTC
Who should search the error message? If Xamarin Studio, then the bug should be moved there. If mmp, then there's no need to search the error message, we can just change it.

We should also document mmp errors (like we do for mtouch errors).
Comment 2 Chris Hamons 2017-04-27 13:29:58 UTC
I was thinking mtouch/mmp.

So we convert MM4162 into another error with it embedded. Since we know that:

- We are invoking clang on our static registrar
- We know that the compiler came back with an error
- We can parse the output looking for a hint that we need a newer XCode).

We already do some return code checking here:


for example.

But i'm not opposed if you have a better idea.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2017-04-27 13:33:57 UTC
When we show MM4162, it's because we already know that clang won't be able to compile the generated output. We can change the message to say whatever we want.

Note that we generate this entire message [1], it's not something we're re-throwing from a clang error.

[1] https://github.com/xamarin/xamarin-macios/blob/master/src/ObjCRuntime/Registrar.cs#L1146
Comment 4 Chris Hamons 2017-04-27 16:22:08 UTC
Let me think if I can come up with a better error message.