Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I have bundled an Exe with Mono in Mac using
export AS="as -arch i386"
export CC="cc -arch i386 -framework CoreFoundation -lobjc -liconv"
mkbundle -- static myapp.exe MonoMac.dll --deps -o myapp
It successfully produces the native application myapp.
I copied the lib directory from mono folder and pasted it on desktop because the app uses **GTK** for User Interface.
I'm trying to launch the application using the following ***script.sh***
The app successfully launches provided that Mono is installed in Library folder*** if i remove Mono.Framework from the Library Folder i get the following error
My question is isn't the static Flag used to include Mono Runtime with the Exe and produce a non dependent Native code(Except GTK for which i have set the DYLIB Path),Why is it looking for Mono in the Library Folder?
So a few things.
- You are using MonoMac.dll, so this isn't a Xamarin.Mac bug.
- You might get more information on where mono is looking for libraries with MONO_LOG_LEVEL=debug MONO_LOG_MASK=asm as prefixes when launching your application as detailed here (http://www.mono-project.com/docs/advanced/runtime/logging-runtime-events/).
- Bug reports aren't for questions. Please see the forums (https://forums.xamarin.com/categories/mac) for a more appropriate place for questions.
Im not using Monomac.dll alone.Im just using it for showing the NSOpenPanel so that the file dialog has a native look and feel on OSX,rather than the alien GTK Look and feel.
Im using your IDE Xamarin Studio and i intent to use GTK UI for it.If i want to distribute the bundled Mono Runtime i know that i need to purchase Xamarin.Mac.
So this is indeed a Bug.I tried setting the DLLMAPs too.
Just for clarification, as I indicated in my last response, MonoMac.dll != XamMac.dll or Xamarin.Mac.dll. This bug was filed against Xamarin.Mac, so I wanted to clarify that you filed it against the wrong product.
Moving on from that, bug reports aren't the best location for questions. I do not believe this report currently has enough information to say "Product X has a bug" as much as "I'm trying to use X and it is not working as expected."
I would suggest using MONO_LOG_LEVEL=debug MONO_LOG_MASK=asm to track down where mono is trying to load the library in question, and posting on the forums if you need help.
If and when you track down the source of the bug, feel free to open a new bug with a detailed description of the problem or a example that reproduces the flaw.
Okay.I get your point.But this is indeed a bug with mkbundle or the mono runtime.The static flag bundles mono with the exe,why does the bundled mono look for the libraries folder? So this is a Bug i suggest you move this to the proper section.Xamarin IDE itself is full of Bugs,now i have to deal with this too.
Plus no one answers the questions on SO or the Mailing List.Mono and GTK seems abandoned.I dont know why i should pay for Xamarin.Mac if this is the Case.
This is indeed a Bug.What is the point is using MONO_LOG_LEVEL=debug MONO_LOG_MASK=asm. I mean from where im i supposed to use that.The system to which the app should be installed does not have mono.Mono should be bundled since im using the --static flag with mkbundle.I tried modifying the dllmap.. nothing helps.Here is a related thread
I suggest you take some interest in sorting out this issue otherwise Mono+GTK will go down the drain.You people are just so busy to close bug reports without even trying to understand the issue.
Alright, I see why you are frustrated, and I'm sorry the command line tooling isn't working as expected. However, because this is not a Xamarin.Mac issue, we need to get your issue to the correct place where it can be taken care of. There are several options: we can move this bug to MonoMac, but since MonoMac and GTK# are community supported projects, it may be a very long time until you see any response. I recommend filing a post on our forums for community support instead - https://forums.xamarin.com/categories/mac - where more members of the community will see it.
If you do end up filing this as a bug or community issue, you'll first need to dig into how mono is loading the libraries in question, using the MONO_LOG_LEVEL=debug MONO_LOG_MASK=asm method I suggested. Once you know where mono is trying to load the library in question, you should have enough info for others to go on.
If you have a Xamarin license with access to Xamarin support or an account manager, they may be able to re-evaluate the issue for you. It's worth reaching out to them even if you haven't purchased Xamarin.Mac.
You need to use the ' --config config ' option of mkbundle, to make a copy of '/Library/Frameworks/Mono.framework/Versions/Current/etc/mono/config' and remove or edit the content for the location of where glib, etc could be found.
If you watch the mkbundle's output log, you will find that '/Library/Frameworks/Mono.framework/Versions/Current/etc/mono/config' is included in the generated bundle. ' --config config ' overrides that, and allows you to specify where glib, etc are in the client's machine. The client still need to have those, but you could put a copy of those in your `pwd` anyway.
The mono people did give you an option, you just need to read mkbundle's doc carefully. This is not a bug, just poorly documented.
$ mkbundle --help
--config F Bundle system config file `F'
FYI, I built the microsoft font validator for mac os this way.
binaries - *.dmg for macs -