Bug 35439 - Unclear error message when Xcode license is not accepted
Summary: Unclear error message when Xcode license is not accepted
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: General (show other bugs)
Version: XI 9.4 (iOS 9.2)
Hardware: PC Mac OS
: --- enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-10-31 19:39 UTC by Cody Beyer (MSFT)
Modified: 2017-10-02 11:14 UTC (History)
3 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 for Bug 35439 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:
Status:
CONFIRMED

Description Cody Beyer (MSFT) 2015-10-31 19:39:05 UTC
### Description

Recently, instead of displaying a more relevant error, the following is reported:

>Error MT5306: Failed to create the a fat library. Please review the build log. (MT5306) 

### Steps to Reproduce

1. Update to Xcode 7.1
2. Do not open Xcode and do not accept its license 
3. Build Xamairn.iOS app

### Expected Results

Error message along the lines of:

>Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

should be raised

### Actual Results

Error message as described in the description is raised

=== Xamarin Studio ===

Version 5.10 (build 860)
Installation UUID: 73204efb-3f52-4561-bfd0-1a9af26f9341
Runtime:
	Mono 4.2.1 (explicit/8862921)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010091

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.1 (9079)
Build 7B91b

=== Xamarin.Android ===

Version: 6.0.0.27 (Business Edition)
Android SDK: /Users/codybeyer/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

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: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.iOS ===

Version: 9.2.1.21 (Business Edition)
Hash: 9ce9e8b
Branch: master
Build date: 2015-10-28 19:11:03-0400

=== Xamarin.Mac ===

Version: 2.4.0.105 (Business Edition)

=== Build Information ===

Release ID: 510000860
Git revision: 7c46a0b709d51ad5d5a5ed90a4671cc7b6928e62
Build date: 2015-10-29 17:17:52-04
Xamarin addins: b9337905aca5dc276190d78819728a59cda33a43
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.11.1
Darwin Codys-MacBook-Pro.local 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2015-11-02 12:53:29 UTC
## A hint for how to reproduce without re-installing Xcode

In case it might be helpful for easier reproductions of the problem, you can simply move or delete the following file (it's a system-wide preferences file):

> /Library/Preferences/com.apple.dt.Xcode.plist

That file stores the latest accepted license agreement:

> $ plutil -p /Library/Preferences/com.apple.dt.Xcode.plist
> {
>   "IDEXcodeVersionForAgreedToGMLicense" => "7.1"
>   "IDELastGMLicenseAgreedTo" => "EA1327"
> }


If that file is _not_ present then this "Failed to create the a fat library" error _will_ happen when building for device.




## Regression status: not an immediate regression

This problem has affected older versions of Xcode + Xamarin.iOS too. See for example [1], a forum thread from January 2015.

[1] http://forums.xamarin.com/discussion/31493/mtouchtask-error-mt5206-failed-to-create-the-a-fat-library-please-review-the-build-log-mt5206/p1




## Additional context from the diagnostic build output for a failing build

(To show how the error from the Xcode toolchain appears in the build output)

> Environment variables being passed to the tool:
> Xamarin.iOS 9.3.1 Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk
> Process exited with code 69, command:
> /usr/bin/lipo /Users/macuser/Projects/UnifiedSingleViewIphone1/UnifiedSingleViewIphone1/obj/iPhone/Debug/mtouch-cache/64/Output/UnifiedSingleViewIphone1 /Users/macuser/Projects/UnifiedSingleViewIphone1/UnifiedSingleViewIphone1/obj/iPhone/Debug/mtouch-cache/32/Output/UnifiedSingleViewIphone1 -create -output /Users/macuser/Projects/UnifiedSingleViewIphone1/UnifiedSingleViewIphone1/bin/iPhone/Debug/UnifiedSingleViewIphone1.app/UnifiedSingleViewIphone1
> 
> 
> Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Comment 3 Cody Beyer (MSFT) 2016-09-28 16:23:55 UTC
This no longer occurs. In the latest C8SR0 version, we get the following when the license is not accepted:

Starting connection to Mac clb-macbook...
Xcode license must be accepted in order to be connected and working against the Mac
Disconnected from Mac clb-macbook (10.0.0.214)
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-28 18:43:38 UTC
It looks like the original report in Comment 0 was filed on Mac OS using Xamarin Studio (rather than in Visual Studio on Windows as in Comment 3).  I still get the original behavior from Comment 0 when building for device in on Mac in Xamarin Studio, so I am reopening.


## Version info

BAD: Xamarin.iOS 10.0.1.8 (3983064) + Xamarin Studio 6.1.1.15 (fa52f026)