Bug 11077 - Cannot bundle Mono 3 with Xamarin.Mac application
Summary: Cannot bundle Mono 3 with Xamarin.Mac application
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: 1.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Sebastien Pouliot
Depends on:
Reported: 2013-03-12 12:31 UTC by David Aramant
Modified: 2013-03-12 14:22 UTC (History)
0 users

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-03-12 12:31:24 UTC
Xamarin.Mac v1.0.11

1) Make sure Mono 3 is the default runtime for Xamarin.Studio
2) Create a new Xamarin.Mac Project
3) Enable "Include the Mono runtime in the application bundle" in the project
4) Attempt to build.  Error is included below.

Per bug 10783, I have created a symlink to pkg-config and placed it in /usr/bin.


Cleaning Solution: Test2 (Debug|x86)

Cleaning: Test2 (Debug|x86)
Removing output files...
Clean complete

Building Solution: Test2 (Debug|x86)

Building: Test2 (Debug|x86)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/3.0.7/bin/mcs /noconfig "/r:/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/mscorlib.dll" -nostdlib "/out:/Users/aramant/Projects/Test2/Test2/bin/Debug/Test2.exe" "/r:/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.Xml.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.Core.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.Xml.Linq.dll" "/r:/Library/Frameworks/Mono.framework/Versions/3.0.7/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/Test2/Test2/MainWindow.cs" "/Users/aramant/Projects/Test2/Test2/MainWindowController.cs" "/Users/aramant/Projects/Test2/Test2/MainWindow.designer.cs" "/Users/aramant/Projects/Test2/Test2/Main.cs" "/Users/aramant/Projects/Test2/Test2/AppDelegate.cs" "/Users/aramant/Projects/Test2/Test2/AppDelegate.designer.cs" 

Compiling interface definitions
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile "/Users/aramant/Projects/Test2/Test2/bin/Debug/Test2.app/Contents/Resources/MainWindow.nib" "/Users/aramant/Projects/Test2/Test2/MainWindow.xib"
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile "/Users/aramant/Projects/Test2/Test2/bin/Debug/Test2.app/Contents/Resources/MainMenu.nib" "/Users/aramant/Projects/Test2/Test2/MainMenu.xib"
Build complete -- 0 errors, 0 warnings

Updating application manifest

Merging Mono Runtime into app bundle
/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/bin/mmp -nolink "-minos=10.7" --sdkroot "/Applications/Xcode.app/Contents/Developer" -o "/Users/aramant/Projects/Test2/Test2/bin/Debug" -n "Test2" --profile "4.0" --debug -a "/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.dll" -a "/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.Xml.dll" -a "/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.Core.dll" -a "/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.Xml.Linq.dll" -a "/Library/Frameworks/Mono.framework/Versions/3.0.7/lib/mono/4.0/System.Drawing.dll" -a "/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/usr/lib/mono/XamMac.dll" "/Users/aramant/Projects/Test2/Test2/bin/Debug/Test2.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

---------------------- Done ----------------------

Build: 1 error, 1 warning
Comment 1 Sebastien Pouliot 2013-03-12 13:03:45 UTC
It does not look like the symlink exists (or points to mono's pkg-config). 

What happens when you open a terminal window and type the following commands ?

$ export | grep PATH

$ pkg-config

$ which pkg-config

$ pkg-config --variable=prefix mono-2

$ ls -l /usr/bin/pkg-config 

note: for the last command the "/usr/bin/pkg-config" should matcg the output of `which pkg-config`
Comment 2 David Aramant 2013-03-12 13:32:30 UTC
You're right, the symlink got messed up.  I might actually have wiped this machine sometime after my earlier bug report because of a giant PATH mess we got into with Homebrew and RVM.

I created the symlink in the correct place and it seems to work now.

Previously, the pkg-config being used was Homebrew's version in /usr/local/bin/pkg-config.  It is a higher version number (0.28 vs 0.25) than the Mono one.

Bug 10783 mentions that the dependence on the /usr/bin/ location of pkg-config was removed in version 1.2.43 of Xamarin.Mac.  Is there an Alpha channel for Xamarin.Mac releases?  It seems odd that v1.2 is being worked on when the most recent public release is v1.0.11.
Comment 3 Sebastien Pouliot 2013-03-12 13:58:43 UTC
"odd" ? that may be the right term ;-) It's the old Linux numbering schema where:

* Odd, e.g. 1.1.x (or 6.3.x for Xamarin.iOS), version numbers are used for alpha and betas. Not every releases goes thru a public alpha. Historically it's been used when an OSX (or iOS) releases are under NDA and the alphas are semi-private (to people under the same NDA).

* Even, e.g. 1.0.x and 1.2.x (or 6.2.x for Xamarin.iOS), numbers are used for stable releases and release candidates (the later being available on the beta channel).

and that hints you that a 1.2 release candidate/stable will soon be available (with that fix among other improvements).
Comment 4 David Aramant 2013-03-12 14:10:30 UTC
Ah, OK.  I didn't think Linux ever had non-public 'even' releases, though :)
Comment 5 Sebastien Pouliot 2013-03-12 14:22:24 UTC
Only the odd/even numbering comes from Linux. It's a quick way to know what's stable or not across products.

OTOH how Xamarin handle public/private releases (odd or even) comes from legal requirements (e.g. NDA) it has to face, noting to do with Linux.