Bug 36883 - MKBundled Mono Exe checking for Dependency in Library Folder
Summary: MKBundled Mono Exe checking for Dependency in Library Folder
Alias: None
Product: Installers
Classification: Mono
Component: macOS Installer ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Alexis Christoforides
Depends on:
Reported: 2015-12-11 10:31 UTC by cool_rainbow
Modified: 2018-01-02 13:25 UTC (History)
5 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 GitHub or Developer Community 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 cool_rainbow 2015-12-11 10:31:46 UTC
I have bundled an Exe with Mono in Mac using 

    export AS="as -arch i386"
    export CC="cc -arch i386 -framework CoreFoundation -lobjc -liconv"
    export PATH=/Library/Frameworks/Mono.framework/Versions/4.0.3/bin:$PATH
    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*** 

    export DYLD_FALLBACK_LIBRARY_PATH="$VAR/lib:/usr/lib"
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?
Comment 1 Hin-Tak Leung 2016-05-23 13:52:03 UTC
What does "otool -L <yourbinary>" says?
Comment 2 Alexander Köplinger [MSFT] 2018-01-02 13:25:29 UTC
Closing due to no response, if you still see this issue please file a new one at https://github.com/mono/mono/issues. Thanks!