Bug 10783 - mmp fails with error MM0000 on new Xamarin.Mac solution
Summary: mmp fails with error MM0000 on new Xamarin.Mac solution
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: 1.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Sebastien Pouliot
: 11147 ()
Depends on:
Reported: 2013-02-28 17:31 UTC by David Aramant
Modified: 2013-03-14 08:06 UTC (History)
2 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 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 David Aramant 2013-02-28 17:31:45 UTC
I am unable to bundle Mono, even with a brand new example solution.

1) Create a new Xamarin.Mac Project
2) Enable "Include the Mono runtime in the application bundle" in the project settings.
3) Build.
4) The build fails with the error below:


Building: TestXMac (Debug|x86)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/2.10.11/bin/dmcs /noconfig "/out:/Users/aramant/Projects/TestXMac/TestXMac/bin/Debug/TestXMac.exe" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Xml.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Core.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Xml.Linq.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Drawing.dll" "/r:/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/lib/mono/XamMac.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 /platform:x86 "/define:DEBUG"  /t:exe "/Users/aramant/Projects/TestXMac/TestXMac/MainWindow.cs" "/Users/aramant/Projects/TestXMac/TestXMac/MainWindowController.cs" "/Users/aramant/Projects/TestXMac/TestXMac/MainWindow.designer.cs" "/Users/aramant/Projects/TestXMac/TestXMac/Main.cs" "/Users/aramant/Projects/TestXMac/TestXMac/AppDelegate.cs" "/Users/aramant/Projects/TestXMac/TestXMac/AppDelegate.designer.cs" 
Build complete -- 0 errors, 0 warnings

Merging Mono Runtime into app bundle
/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/bin/mmp -nolink "-minos=10.6" --sdkroot "/Applications/Xcode.app/Contents/Developer" -o "/Users/aramant/Projects/TestXMac/TestXMac/bin/Debug" -n "TestXMac" --profile "4.0" --debug -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Xml.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Core.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Xml.Linq.dll" -a "/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Drawing.dll" -a "/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/lib/mono/XamMac.dll" "/Users/aramant/Projects/TestXMac/TestXMac/bin/Debug/TestXMac.exe"
error MM0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.ComponentModel.Win32Exception: ApplicationName='pkg-config', CommandLine='--variable=prefix mono-2', CurrentDirectory=''
  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <filename unknown>:0 
  at MonoMac.Bundler.Driver.RunCommand (System.String path, System.String args, System.String[] env, System.String& output) [0x00000] in <filename unknown>:0 
  at MonoMac.Bundler.Driver.get_MonoDirectory () [0x00000] in <filename unknown>:0 
  at MonoMac.Bundler.Driver.Pack (IList`1 unprocessed) [0x00000] in <filename unknown>:0 
  at MonoMac.Bundler.Driver.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
  at MonoMac.Bundler.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
mmp exited with code 1


Detailed info from X.Studio:

=== Xamarin Studio ===

Version 4.0 (build 2003)
Installation UUID: 1fcc71a0-766d-4a62-b611-8edd0fdc5d1e
	Mono 2.10.11 (mono-2-10/2baeee2)
	GTK 2.24.14
	GTK# (
	Package version: 210110000

=== Apple Developer Tools ===

Xcode 4.6 (2066)
Build 4H127

=== Xamarin.iOS ===

Version: (Starter Edition)

=== Xamarin.Mac ===

Xamarin.Mac: 1.0.11

=== Xamarin.Android ===

Not Installed

=== Build Information ===

Git revision: Release ID: 400002003
Build date: 2013-02-20 00:32:59+0000
Xamarin addins: b7a7aff09b352c13ded8a27439fd6d2250361511

=== Operating System ===

Mac OS X 10.8.2
Darwin davids-mac-mini.net.sep.com 12.2.0 Darwin Kernel Version 12.2.0
    Sat Aug 25 00:48:52 PDT 2012
    root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
Comment 1 David Aramant 2013-02-28 17:36:17 UTC
Additionally, the first time it is built (after being cleaned) there is a warning: "Warning: Could not determine value for manifest key 'DTPlatformBuild'"

This warning goes away if you build it more than once.
Comment 2 Sebastien Pouliot 2013-02-28 17:43:08 UTC
That's likely because Xamarin.Mac currently* requires Xcode "Command-Line Tools" to be installed to get some tools, like pkg-config.

You can install them by doing the following:
* start Xcode;
* go to the Xcode menu;
* select the Preferences... item;
* select the Downloads icons;
* click on "install" button for the "Command Line Tools"

Once installed you should be able to build your project without error.

* future versions of Xamarin.Mac will remove this requirement (but it's often useful to have the tools installed) but it;s still required to build iOS apps.
Comment 3 David Aramant 2013-02-28 17:49:10 UTC
Unfortunately, I already had the Xcode command line tools installed, so that isn't it.
Comment 4 David Aramant 2013-02-28 17:51:18 UTC
Could this have something to do with Homebrew?  I know you guys recently changed something in Mono 3 to get around some conflict.  

Comment 5 Sebastien Pouliot 2013-02-28 19:10:35 UTC
Good catch, that's likely the reason - if you did not install (or keep) a previous install of the Mono SDK (since any of them would have "installed" the tool in /usr/bin).

As a workaround you can create a symlink from:

This is what the installer did (previously). I'll look at making `mmp` not depend on the /usr/bin location (for future, post-1.2, releases).
Comment 6 David Aramant 2013-03-01 10:22:51 UTC
Creating the symlink worked; thanks!

When you say "future post-1.2" releases, what are you referring to?  Xamarin.Mac?  MMP?
Comment 7 Sebastien Pouliot 2013-03-01 10:25:48 UTC
It's all the same. MMP ships with Xamarin.Mac (along with XamMac.dll and a few other tools, like btouch).

Thanks for confirming the workaround!
Comment 8 Sebastien Pouliot 2013-03-04 11:01:53 UTC
Xamarin.Mac 1.2.33+ will have a fix built-in.
Thanks for the report!
Comment 9 narayanp 2013-03-07 05:36:58 UTC
Today we have checked this issue with following builds:

X.S 4.0 - 1645b898271456799b70944c8b356ed6c5c00fdf
Xamarin.Mac- 1.2.43

Now we are able to build and run project successfully after selecting 'Include the Mono runtime in the application bundle'

Changing the status to verified.
Comment 10 Sebastien Pouliot 2013-03-14 08:06:41 UTC
*** Bug 11147 has been marked as a duplicate of this bug. ***