Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

mono: Fix compile/runtime error on El Cap Beta 3 #41537

Conversation

felixbuenemann
Copy link
Sponsor Contributor

This fixes the error "could not discover the mach TLS offset" which
prohibits both running and compiling mono on OS X 10.11 (15A216g).

The patch was backported from current mono/mono master. Because the
problem also affects binaries compiled before upgrading to El Capitan
the patch is not scoped to MacOS.version >= :el_capitan.

See Xamarin Bugzilla Bug 31761 and PR mono/mono#1919 for more info.

@bfontaine bfontaine added the 10.11 label Jul 9, 2015
@felixbuenemann
Copy link
Sponsor Contributor Author

Is there a reason that the brew test-bot is requesting access to my github account's associated organizations and it's repos when I click on the Details or build result links?

@DomT4
Copy link
Member

DomT4 commented Jul 9, 2015

We have it set at the least amount of permissions we're told the plugins require, I believe.

CC @MikeMcQuaid

@andrewbranch
Copy link

You, sir, are a life saver.

@MikeMcQuaid
Copy link
Member

@felixbuenemann screen shot 2015-07-09 at 23 59 01

The only thing it requests is to see what organisation teams you're a member of (to see if you're in the Homebrew owners team).

@felixbuenemann
Copy link
Sponsor Contributor Author

@MikeMcQuaid Thanks for the clarification. I thought it was requesting access to organization repos.

@felixbuenemann
Copy link
Sponsor Contributor Author

@jonlbauer The compile will fail if there is an unfixed version of mono in your path. In the normal update case the old homebrew version is unlinked before the compile is started, so that's not an issue. But if you have multiple mono versions installed that might be the problem.

@felixbuenemann
Copy link
Sponsor Contributor Author

@jonlbauer I think you can install from a url, try brew install https://raw.githubusercontent.com/felixbuenemann/homebrew/fix-mono-el-cap-tls-offset/Library/Formula/mono.rb

@@ -14,6 +15,10 @@ class Mono < Formula
sha256 "80bddaefcd9c136bc763797cff98f3aa07ec758e348037fd24f07d2b1b795fbb" => :mountain_lion
end

# Fix compile and runtime error on OS X 10.11 Beta 3
# See: https://github.com/mono/mono/pull/1919
patch :DATA
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use https://github.com/mono/mono/pull/1919 as the patch URL, thanks!

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't think of that. I'll push a new rev, thanks!

@felixbuenemann
Copy link
Sponsor Contributor Author

@jonlbauer You could install homebrew, uninstall your current mono and install using the command posted above or using brew install mono as soon as this pull request is merged. Please take some time to get yourself aquainted with how homebrew works, a pull request is for developer discussions not user support and using it as such causes a lot of noise for the devs involved. Thanks!

This fixes the error "could not discover the mach TLS offset" which
prohibits both running and compiling mono on OS X 10.11 (15A216g).

The patch was backported from current mono/mono master. Because the
problem also affects binaries compiled before upgrading to El Capitan
the patch is *not* scoped to `MacOS.version >= :el_capitan`.
@felixbuenemann
Copy link
Sponsor Contributor Author

Pushed a new commit to address @MikeMcQuaid's feedback.

@MikeMcQuaid
Copy link
Member

Thanks @felixbuenemann!

@felixbuenemann felixbuenemann deleted the fix-mono-el-cap-tls-offset branch July 11, 2015 16:11
@bosmacs
Copy link

bosmacs commented Jul 18, 2015

FYI, you may also want to include the x86 patch for the same problem:

  # and for x86
  patch do
    url "https://github.com/mono/mono/pull/1924.diff"
    sha256 "62e9d2ad134558c3fcf9c75e260c6091e390b23b4f320e79184136b76c021a39"
  end

@felixbuenemann
Copy link
Sponsor Contributor Author

@bosmacs Is there a case where mono would compile as x86 on El Cap?

@bosmacs
Copy link

bosmacs commented Jul 19, 2015

I thought it might affect code generation for 32-bit assemblies, but in brief testing that appears not to be the case. So perhaps it’s not needed after all.

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants