Fix ghc --devel build on Lion and Mavericks #26537

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

dholm commented Feb 8, 2014

No description provided.

Contributor

asparagui commented Feb 9, 2014

See also #26459.

Contributor

dholm commented Feb 9, 2014

@MikeMcQuaid I have pushed a version which should resolve this issue (although I cannot verify this myself).

@MikeMcQuaid MikeMcQuaid and 1 other commented on an outdated diff Feb 9, 2014

Library/Formula/ghc.rb
@@ -85,6 +110,8 @@ def install
args << "--with-gcc=#{ENV.cc}"
system "./configure", *args
+ # __thread is not supported on Lion but configure enables it anyway.
+ system "echo '#undef CC_SUPPORTS_TLS' >> config.h" if build.devel? && MacOS.version <= :lion
@MikeMcQuaid

MikeMcQuaid Feb 9, 2014

Owner

Use Pathname.write instead.

@dholm

dholm Feb 9, 2014

Contributor

Pathname.write will append by default? I googled it and couldn't find a conclusive answer.

@MikeMcQuaid

MikeMcQuaid Feb 9, 2014

Owner

My bad. I just just use a Ruby method to write to this instead of echo.

Owner

MikeMcQuaid commented Feb 9, 2014

Still failing. Just check the test results yourself periodically and keep pushing changes until it works, thanks.

Contributor

dholm commented Feb 9, 2014

@MikeMcQuaid

Applying: ghc --devel 7.8-rc1
error: patch failed: Library/Formula/ghc.rb:12
error: Library/Formula/ghc.rb: patch does not apply
Patch failed at 0001 ghc --devel 7.8-rc1
The copy of the patch that failed is found in:
   /usr/local/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: Patch failed to apply: aborted.

Hmm?

Owner

MikeMcQuaid commented Feb 9, 2014

That means it needs rebased.

Contributor

dholm commented Feb 9, 2014

The merged version of 7.8-rc1 has some inconsistencies. For instance, it doesn't require apple-gcc42 when built with --devel even though the install step clearly states that it requires it (and also I was unable to build it using Clang).
It builds the --devel version using the binary version of 7.8-rc1 but IMHO it makes more sense to use the stable version (7.6.3) like is done for ghc stable (which is built using ghc 7.4.2 binaries). I pushed a new version to see if the fix will work on Lion, if it does I will have to change the commit message. :)

dholm closed this Mar 5, 2014

dholm deleted the dholm:recipe/ghc branch Nov 2, 2014

xu-cheng locked and limited conversation to collaborators Feb 17, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.