Bug 58730 - Mono.framework on Mac has absolute paths in soft links
Summary: Mono.framework on Mac has absolute paths in soft links
Status: NEW
Alias: None
Product: Installers
Classification: Mono
Component: macOS Installer ()
Version: 5.2.0 (2017-04)
Hardware: PC Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Alexis Christoforides
URL:
Depends on:
Blocks:
 
Reported: 2017-08-11 20:54 UTC by Alexander Köplinger [MSFT]
Modified: 2017-08-12 03:57 UTC (History)
2 users (show)

Tags:
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 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 original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Alexander Köplinger [MSFT] 2017-08-11 20:54:49 UTC
(originally filed as https://github.com/mono/bockbuild/issues/42)

@aleksandr-skobelev-epam:

"
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.
"

-----

@mugginsoft:

"
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.
"

-----

@aleksandr-skobelev-epam:

"
Can @loader_path help in that case?
"

-----

@mugginsoft:

"
Yes, or @rpath.
"