Bug 34533 - android build broken on el capitan
Summary: android build broken on el capitan
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2015-10-02 13:38 UTC by Randy
Modified: 2015-10-02 14:04 UTC (History)
1 user (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 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.

Related Links:

Description Randy 2015-10-02 13:38:47 UTC
Xamarin.android won't build after upgrading to El Capitan. The problem is caused by the SIP change where non-system links aren't allowed in /usr/bin which is where mono installs them. Mono doesn't actually need them but the Xamarin.Android tools reference them without a path, causing failures.

I specifically fixed a line in the /Library/Frameworks/Xamarin.Android.framework/Commands/generator script. It had:

exec mono $MONO_OPTIONS "$MANDROID_DIR/generator.exe" "$@"

This would get an error that it couldn't find 'mono'. Changing the line to this worked:

exec /Library/Frameworks/Mono.Framework/Commands/mono $MONO_OPTIONS "$MANDROID_DIR/generator.exe" "$@"

I'm sure there are other scripts Xamarin.Android tools that will fail for similar reasons. The above fix should probably be getting the path via an enviroment variable so it uses the selected mono runtime set in xamarin studio.
Comment 1 Jonathan Pryor 2015-10-02 14:04:42 UTC
FIxed in monodroid/5cae13fd and monodroid/cycle6/418c64df.

This should be present in the most recent cycle6 Alpha.