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 for Bug 58730 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
(originally filed as https://github.com/mono/bockbuild/issues/42)
Mono.framework on Mac has absolute paths in soft links, i.e. if to do ls -l in /Library/Frameworks/Mono.framework, it prints something like following:
> $ ls -l /Library/Frameworks/Mono.framework
> total 40
> lrwxr-xr-x 1 root admin 55 Mar 28 15:53 Commands -> /Library/Frameworks/Mono.framework/Versions/Current/bin
> lrwxr-xr-x 1 root admin 59 Mar 28 15:53 Headers -> /Library/Frameworks/Mono.framework/Versions/Current/include
> lrwxr-xr-x 1 root admin 52 Mar 28 15:53 Home -> /Library/Frameworks/Mono.framework/Versions/Current/
> lrwxr-xr-x 1 root admin 55 Mar 28 15:53 Libraries -> /Library/Frameworks/Mono.framework/Versions/Current/lib
> lrwxr-xr-x 1 root admin 73 Mar 28 15:53 Mono -> /Library/Frameworks/Mono.framework/Versions/Current/lib/libmono-2.0.dylib
> drwxr-xr-x 4 root admin 136 Mar 28 15:53 Versions
Contrary, if do the same for some standard framework like AppKit it prints relative paths in soft links:
> $ ls -l /System/Library/Frameworks/AppKit.framework
> total 40
> lrwxr-xr-x 1 root wheel 23 Sep 26 2016 AppKit -> Versions/Current/AppKit
> lrwxr-xr-x 1 root wheel 24 Jun 13 20:07 Headers -> Versions/Current/Headers
> lrwxr-xr-x 1 root wheel 24 Jun 13 20:07 Modules -> Versions/Current/Modules
> lrwxr-xr-x 1 root wheel 26 Sep 26 2016 Resources -> Versions/Current/Resources
> drwxr-xr-x 4 root wheel 136 Sep 26 2016 Versions
> lrwxr-xr-x 1 root wheel 28 Sep 26 2016 XPCServices -> Versions/Current/XPCServices
The problem with Mono's approach is that it doesn't allow to have several versions of Mono framework on the same machine and compile against the specific one without renaming frameworks. For instanse, if I have Mono 5 framework installed as /Library/Frameworks/Mono.framework and Mono 4.6.2 installed as /Library/Frameworks/Mono-4.6.2.framework I can not easily build my project against 4.6.2 just by setting proper path in a build script, I need to rename Mono.framework to something like Mono-5.0.1.framework and then Mono-4.6.2 to Mono.framework.
That is really a big problem because in the case when we build on a machine to which we have a limited access or which is supposed to run several builds in parallel we can not build for distinct versions of Mono.
I have this issue too.
Another aspect of this is that libmonosgen-2.0.1.dylib uses a static install name rather than a dynamic rpath:
otool -D /Library/Frameworks/Mono.framework/Versions/4.8.0/lib/libmonosgen-2.0.1.dylib /Library/Frameworks/Mono.framework/Versions/4.8.0/lib/libmonosgen-2.0.1.dylib: /Library/Frameworks/Mono.framework/Versions/4.8.0/lib/libmonosgen-2.0.1.dylib
This might work just for building but at run time the correct version of the dylib would need to be available on the correct path unless you used instal_name_tool to patch up the path.
Can @loader_path help in that case?
Yes, or @rpath.