This repository has been archived by the owner. It is now read-only.

ghc: 7.4.2 build from source #14455

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
Contributor

2bits commented Aug 25, 2012

Following the discussion in #13519, ghc gets a major overhaul:

  • Add a subformula that installs the ghc binary like before
  • Use the ghc binary to build ghc from source
  • Force ENV['LD'] = 'ld' to stop an assertion linking with llvm.
  • Add an option to run the testsuite. 9 unexpected fails atm

Fixes #13519

Contributor

2bits commented Aug 25, 2012

Though I'm not sure this is conceptually correct to install cabal-install only temporarily like the gist did, there it is. I suppose one could still install cabal-install afterwards.

@Sharpie Sharpie and 3 others commented on an outdated diff Aug 26, 2012

Library/Formula/ghc.rb
+ # standard buildpath so that the two subformula can be extracted into
+ # the buildpath also, giving us proper cleanup on exit.
+ (buildpath+'Ghcsource').install Dir['*']
+
+ # Define where the subformula will temporarily install themselves
+ subprefix = buildpath+'subs'
+
+ Ghcbinary.new.brew do
+ system "./configure", "--prefix=#{subprefix}"
+ system 'make install'
+ ENV.prepend 'PATH', subprefix/'bin', ':'
+ end
+
+ Cabalsource.new.brew do
+ ENV['PREFIX'] = "#{subprefix}"
+ system 'rm', '-rf', '~/.cabal', '~/.ghc'
@Sharpie

Sharpie Aug 26, 2012

Contributor

We can't do this. Nuking files outside of the installation prefix, especially silently, is a big problem.

@MikeMcQuaid

MikeMcQuaid Aug 26, 2012

Owner

Can you force it to put its dotfiles somewhere else?

@dysinger

dysinger Aug 27, 2012

Contributor

Be careful. This rm -rf was just my being paranoid. If you do that to a real user, they may get upset. I would just remove this line.

@2bits

2bits Aug 27, 2012

Contributor

Thanks for the info. I had already changed it to a Requirement asking the user to do that. But I will just remove it as you say because it's not needed.

Contributor

2bits commented Aug 26, 2012

Yea, that's why I put it in the commit comments. I didn't think it would fly. I just followed the gist. If removing those directories is critical to getting it to build, we can make a Requirement that they are removed before the install I suppose.

Contributor

2bits commented Aug 26, 2012

@dysinger does the user always need to rm -rf ~/.ghc ~/.cabal before building?

Owner

MikeMcQuaid commented Aug 26, 2012

@2bits To confirm: this bootstraps/does a complete build without binaries? If so: awesome and when it's looking ok we'll bottle it.

@MikeMcQuaid MikeMcQuaid commented on the diff Aug 26, 2012

Library/Formula/ghc.rb
@@ -13,9 +13,7 @@ def message; <<-EOS.undent
end
end
-class Ghc < Formula
- homepage 'http://haskell.org/ghc/'
- version '7.4.2'
+class Ghcbinary < Formula
if Hardware.is_64_bit? and not build.build_32_bit?
@MikeMcQuaid

MikeMcQuaid Aug 26, 2012

Owner

Is it possible to build Ghc without any binaries i.e. a full bootstrap?

@Sharpie

Sharpie Aug 27, 2012

Contributor

Not possible. GHC is written in Haskell, so one has to start with some binary distribution of a GHC to build it from source.

That is unless there is a sufficiently advanced Haskell compiler written in C that can do the job.

@MikeMcQuaid

MikeMcQuaid Aug 27, 2012

Owner

Weird; I guess I'm just used to self-bootstrapping things. Seems fine though as long as it works and we ship bottles.

Contributor

2bits commented Aug 26, 2012

This uses the binary ghc to build cabal-install, then it uses both the binary ghc and cabal to build ghc from source. Only ghc from source gets installed into prefix in the end. I need to know if that makes a functional system, as I suppose people will brew install cabal-install when they want it.

Contributor

2bits commented Aug 27, 2012

I got rid of the rm -rf ~/.ghc and ~/.cabal in the 7018ada that I just uploaded. Still no complaints, but I'm not sure that anyone else has even tried it yet.

Contributor

Sharpie commented Aug 28, 2012

Do we even need to jump through the hoop of installing Cabal, Happy and Alex? According to the GHC page on building from source, these are not needed if starting from a source tarball:

http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Tools

Contributor

2bits commented Aug 28, 2012

I'll try it without those.

Contributor

2bits commented Aug 28, 2012

Works

Contributor

dysinger commented Aug 28, 2012

I guess I was just installing those out of habit of building from DVCS.

On Tue, Aug 28, 2012 at 9:36 AM, 2bits notifications@github.com wrote:

Works


Reply to this email directly or view it on GitHubhttps://github.com/mxcl/homebrew/pull/14455#issuecomment-8104209.

Contributor

Sharpie commented Aug 28, 2012

Allright, I guess we should pull the Cabal bits from the process then.

Contributor

dysinger commented Aug 28, 2012

yeah straight GHC doesn't include cabal-install

On Aug 28, 2012, at 11:45 AM, Charlie Sharpsteen notifications@github.com wrote:

Allright, I guess we should pull the Cabal bits from the process then.


Reply to this email directly or view it on GitHub.

Contributor

2bits commented Aug 29, 2012

After testing my edits I uploaded a new version w/o cabal-install.

Contributor

Sharpie commented Aug 29, 2012

Is there a testsuite that we can optionally run? Since this is a compiler, it seems prudent that we should test any build that is going to be bottled.

Contributor

2bits commented Aug 30, 2012

Here are the test results on my corei5 10.8.1, 4.4.1+CLT, at a commit just before superenv, 894f668

OVERALL SUMMARY for test run started at Wed Aug 29 19:28:21 PDT 2012
    3036 total tests, which gave rise to
   12716 test cases, of which
       0 caused framework failures
    9956 were skipped

    2672 expected passes
      79 expected failures
       0 unexpected passes
       9 unexpected failures

Unexpected failures:
   driver                    dynHelloWorld [bad exit code] (dyn)
   dynlibs                   T3807 [bad exit code] (normal)
   dynlibs                   T5373 [bad stdout] (normal)
   lib/Time                  T5430 [bad stdout] (normal)
   perf/compiler             T1969 [stat not good enough] (normal)
   perf/compiler             T4801 [stat not good enough] (normal)
   perf/compiler             parsing001 [stat not good enough] (normal)
   simplCore/should_compile  spec-inline [stderr mismatch] (optasm)
   typecheck/should_fail     T5300 [stderr mismatch] (normal)

real       300.79
user       646.59
sys        283.69
Contributor

Sharpie commented Aug 30, 2012

Right, but could we get a make check option built into the formula? That way we can run the testsuite before bottling.

Contributor

2bits commented Aug 30, 2012

Rebased and pushed a new commit that adds --tests as an option. I used this commit for my own tests, and it was meant to be part of the formula that goes out if that's acceptable.

Contributor

2bits commented Aug 30, 2012

To head off some possible dismay, after 45 min or so of building and 5 min of testing, you will find that running the tests corrupts the source tree somehow and make install will fail. Not sure if everyone will be okay with that. Also their docs say there shouldn't be any testsuite fails from make fast like we get. Their make fulltest will have errors often they also said.

Member

mxcl commented Sep 1, 2012

I get:

Reading package info from "rts/package.conf.install" ... done.
"utils/ghc-cabal/dist-install/build/tmp/ghc-cabal" install "/private/tmp/brew-ghc-7.4.2-S0Vi/ghc-7.4.2/subfo/lib/ghc-7.4.2/ghc" "/private/tmp/brew-ghc-7.4.2-S0Vi/ghc-7.4.2/subfo/lib/ghc-7.4.2/ghc-pkg" "strip" "/private/tmp/brew-ghc-7.4.2-S0Vi/ghc-7.4.2/subfo/lib/ghc-7.4.2" libraries/ghc-prim dist-install '' '/private/tmp/brew-ghc-7.4.2-S0Vi/ghc-7.4.2/subfo' '/private/tmp/brew-ghc-7.4.2-S0Vi/ghc-7.4.2/subfo/lib/ghc-7.4.2' '/private/tmp/brew-ghc-7.4.2-S0Vi/ghc-7.4.2/subfo/share/doc/ghc/html/libraries' NO  
Installing library in
/private/tmp/brew-ghc-7.4.2-S0Vi/ghc-7.4.2/subfo/lib/ghc-7.4.2/ghc-prim-0.2.0.0
make[1]: *** [install_packages] Error 127
make: *** [install] Error 2

With this and the existing GHC formula. Superenv, obv. Not tested with stdenv.

Contributor

2bits commented Sep 1, 2012

It works for me with superenv. I just built it.

Member

mxcl commented Sep 1, 2012

I don't grok my error for sure. It tries to install something into its own build directory and fails. I'd ignore my issue, but I can't push this since it doesn't build for me. Hopefully another collaborator will be willing to build it and push.

Contributor

2bits commented Sep 1, 2012

I need to diagnose the testsuite failure for sharpie and report them. Then he's going to consider bottling it.

Contributor

adamv commented Sep 9, 2012

7.6.1 was released.

This was referenced Sep 12, 2012

@Sharpie Sharpie commented on the diff Sep 13, 2012

Library/Formula/ghc.rb
@@ -40,9 +51,56 @@ class Ghc < Formula
EOS
end
+ def patches
+ # Explained: http://hackage.haskell.org/trac/ghc/ticket/7040
+ # Discussed: https://github.com/mxcl/homebrew/issues/13519
+ # Remove: version > 7.4.2
+ 'http://hackage.haskell.org/trac/ghc/raw-attachment/ticket/7040/ghc7040.patch'
+ end
@Sharpie

Sharpie Sep 13, 2012

Contributor

We should probably update to 7.6.1, pull this patch and see if the testsuite situation has improved.

Contributor

2bits commented Sep 14, 2012

Working on it now.

Contributor

2bits commented Sep 14, 2012

Here are the results:

OVERALL SUMMARY for test run started at Fri Sep 14 08:54:17 PDT 2012
    3402 total tests, which gave rise to
   14436 test cases, of which
       0 caused framework failures
   11363 were skipped

    2982 expected passes
      47 had missing libraries
      35 expected failures
       0 unexpected passes
       9 unexpected failures

Unexpected failures:
   codeGen/should_run     cgrun071 [bad exit code] (normal)
   concurrent/should_run  conc070 [bad stdout or stderr] (ghci)
   ghci/should_run        3171 [bad stdout] (normal)
   perf/compiler          T4801 [stat too good] (normal)
   perf/compiler          T6048 [stat not good enough] (optasm)
   perf/compiler          T783 [stat not good enough] (normal)
   perf/haddock           haddock.Cabal [stat not good enough] (normal)
   perf/haddock           haddock.base [stat not good enough] (normal)
   perf/haddock           haddock.compiler [stat not good enough] (normal)

Contributor

jacknagel commented Sep 14, 2012

Is it possible to run tests against the binary distribution so that we can compare the results?

Contributor

Sharpie commented Sep 14, 2012

Apologies, but I completely spaced an important detail:

Is haskell-platform compatible with GHC 7.6.1? If not, then the stable version has to stay at 7.4.2.

Contributor

2bits commented Sep 14, 2012

@jacknagel testsuite run against x86_64 ghc-7.6.1 binary using a regular bash shell:

OVERALL SUMMARY for test run started at Fri Sep 14 11:53:18 PDT 2012
    3142 total tests, which gave rise to
   12420 test cases, of which
       0 caused framework failures
    9558 were skipped

    2777 expected passes
      39 had missing libraries
      34 expected failures
       0 unexpected passes
      12 unexpected failures

Unexpected failures:
   codeGen/should_run     cgrun071 [bad exit code] (normal)
   concurrent/should_run  conc070 [bad stdout or stderr] (ghci)
   driver                 dynHelloWorld [bad exit code] (dyn)
   dynlibs                T3807 [bad exit code] (normal)
   dynlibs                T5373 [bad stdout] (normal)
   ghci/scripts           T5979 [bad stderr] (ghci)
   ghci/should_run        3171 [bad stdout] (normal)
   perf/compiler          T4801 [stat too good] (normal)
   perf/compiler          T6048 [stat not good enough] (optasm)
   perf/compiler          T783 [stat not good enough] (normal)
   typecheck/should_fail  T5300 [stderr mismatch] (normal)
   typecheck/should_fail  T5691 [stderr mismatch] (normal)
Contributor

2bits commented Sep 14, 2012

@Sharpie ghc-7.6.1 didn't work to build haskell-platform. I'll have to revert.

Contributor

2bits commented Sep 16, 2012

@adamv why did you add this code to the ghc formula? I've not been using it. So I'm curious.

Contributor

adamv commented Sep 16, 2012

ghc was blacklisted in the superenv code itself; I moved all blacklists into the DSL.

Contributor

2bits commented Sep 16, 2012

Well something's broken because it won't make install. Some docs problem. Maybe it's because I easy_install'd dblatex.

Contributor

2bits commented Sep 17, 2012

Works again. Don't easy_install dblatex if you ever want ghc to compile :-)

Contributor

adamv commented Sep 17, 2012

Do we know why that breaks it? Should we check for it?

I'm building 7.4.2 from source using homebrew, and make install fails with what looks like an openFile has an issue:

ghc-cabal: /usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/settings: openFile: does
not exist (No such file or directory)
make[1]: *** [install_packages] Error 1
...
Error: Failed executing: make install (ghc.rb:43)

The failure message then said that this issue might help me. Thoughts?

Contributor

2bits commented Sep 25, 2012

Use the ghc.rb from this pull request. Build ghc. Profit. :-)

brew install https://raw.github.com/2bits/homebrew/57e95f9d65634add58f3d7e3d6d6b09cdbd7ead2/Library/Formula/ghc.rb

I can build it in 45min on a Corei5 using 3 cores and watching videos.

Contributor

adamv commented Sep 25, 2012

GitHub claims "This pull request cannot be automatically merged."

Contributor

2bits commented Sep 25, 2012

I did a rebase. It should work now. I don't know why dblatex caused problems. I could make the TeX requirement already in the formula do two things: check that TeX is installed and check the dblatex is not. I have no idea how to do that with python, though.

The current version of GHC in 2bit's repo does not work for me, with a clean install of latest OS X, xcode and homebrew.

02.make log https://gist.github.com/3790926.

Ends with

...
/usr/bin/install -c -m 644  utils/haddock/html/Ocean.std-theme/plus.gif "/usr/local/Cellar/ghc/7.4.2/lib/ghc-    7.4.2/html/Ocean.std-theme/"  
/usr/bin/install -c -m 644  utils/haddock/html/Ocean.std-theme/synopsis.png "/usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/html/Ocean.std-theme/"  
/usr/bin/install -c -m 644  utils/haddock/latex/haddock.sty "/usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/latex/"
make: *** [install] Error 2

Edit: I'll just make it clear, this was both the master (commit 21a7055) and fixGhc (commit e41c29ab17) branches.

Contributor

mistydemeo commented Sep 26, 2012

I got the same build error on 10.6.8/Xcode 3.2.6.

Contributor

2bits commented Sep 27, 2012

It's a weird error. I can't tell if it's during make install because you didn't post your complete install log.

"rm" -f "/usr/local/Cellar/ghc/7.4.2/bin/ghci-7.4.2"
install: mkdir /usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/include: File exists
/usr/bin/install -c -m 644 rts/dist/build/ffi.h rts/dist/build/ffitarget.h "/usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/include/"
make[1]: *** [install_includes] Error 71
make[1]: *** Waiting for unfinished jobs....

It could be a simple race condition. You might try adding ENV.j1 before the system 'make install'

Adding ENV.j1 solved the install for GHC for me (after I did a brew update)

ENV.j1 also works for me.

However... haskell-platform from the same repo then doesn't work.

$ brew install https://raw.github.com/2bits/homebrew/fixGhc/Library/Formula/haskell-platform.rb
######################################################################## 100.0%
==> Downloading http://lambda.haskell.org/platform/download/2012.2.0.0/haskell-platform-2012.2.0.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/haskell-platform-2012.2.0.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/haskell-platform/2012.2.0.0 --enable-unsupported-ghc-version
==> EXTRA_CONFIGURE_OPTS="--libdir=/usr/local/Cellar/haskell-platform/2012.2.0.0/lib/ghc" make install
sh: -c: line 0: unexpected EOF while looking for matching `"'
sh: -c: line 1: syntax error: unexpected end of file

Strangley, when I look in the logs folder there is the file 02.ghc" -- including that trailing double quote. https://gist.github.com/3794167.

Contributor

2bits commented Sep 27, 2012

In 2c9ffff I changed only one thing, I made the install j1 for 10.6. Thanks for the feedback. Sorry it doesn't do what you wanted, though. I don't know what the "1" was from in that command line that fails when you use ghc to install haskell-platform on 10.6.

Contributor

2bits commented Sep 27, 2012

7cb1bcc was cosmetic, adjusting only some comments.

Contributor

mistydemeo commented Sep 27, 2012

haskell-platform builds using a ghc from @2bits's updated formula for me when I brew install haskell-platform -v, but I see the same failure as @chrisseaton when compiling non-verbose. Which is surely one of the odder bugs I've seen in some time.

Contributor

mistydemeo commented Sep 27, 2012

The haskell-platform build issue isn't related to GHC, I'm taking that to another issue.

Contributor

mistydemeo commented Sep 27, 2012

I'm able to install haskell-platform and cabal install packages using this formula now. I think we're ready to pull. @MikeMcQuaid, are you free to build the bottles?

Contributor

wonbyte commented Oct 2, 2012

Is Haskell-platform installing now with homebrew?

Yeah, installs and I can build and install Pandoc which is a pretty good test.

Contributor

wonbyte commented Oct 2, 2012

@chrisseaton Thanks!

Contributor

wonbyte commented Oct 3, 2012

Tried installing haskell-platform and it failed with below:

(gps ~)$ brew install haskell-platform
==> Installing haskell-platform dependency: ghc
==> Downloading http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-x86_64-apple-dar
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/ghc/7.4.2
==> make install
ranlib: file: /usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/libHSrts_thr_p.a(RBH.thr_p_o) has no symbols
ranlib: file: /usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/libHSrts_thr_p.a(Sanity.thr_p_o) has no symbols
ranlib: file: /usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/libHSrts_thr_p.a(EventLog.thr_p_o) has no symbols
ranlib: file: /usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/libHSrts_thr_p.a(Select.thr_p_o) has no symbols
make: *** [install] Error 2

Error: ghc did not build
Logs: /Users/gps/Library/Logs/Homebrew/ghc/
Help: https://github.com/mxcl/homebrew/wiki/troubleshooting
mxcl#14455

Contributor

wonbyte commented Oct 3, 2012

Verbose error output.

https://gist.github.com/3826786

Contributor

wonbyte commented Oct 3, 2012

Just in case:

(gps ~)$ brew doctor
Your system is raring to brew.

(gps ~)$ brew update
Already up-to-date.

Contributor

adamv commented Oct 3, 2012

@wonbyte gist that!

Contributor

wonbyte commented Oct 3, 2012

@adamv gisted :)

Contributor

wonbyte commented Oct 3, 2012

Is this just a matter of getting @mistydemeo fix pulled in?

Contributor

mistydemeo commented Oct 3, 2012

@wonbyte Just to make sure, are you installing @2bits's version of ghc from this pull request, not the normal version that's currently in Homebrew?

That said, I did get a similar error when I tried to reinstall just now, while running make install on the ghc binary. Possible parallelization issue in that make install step?

@MikeMcQuaid Ping - are you available to bottle?

Contributor

wonbyte commented Oct 3, 2012

@mistydemeo So I need to install ghc from @2bits repo and then install haskell-platform from the main homebrew repo? Can we get @2bits ghc bottled so users can just use the standard homebrew?

Contributor

Sharpie commented Oct 3, 2012

Well, we are trying to get this bottled. We've found a lot of bugs along the way, so it has been a bit of a long process.

That being said, please don't post any Haskell bug reports in this thread unless you are testing the GHC build that is presented in this pull request. Otherwise, we will spend more time chasing false negatives.

Contributor

wonbyte commented Oct 3, 2012

@Sharpie cool. glad to hear it's being worked out.

Contributor

2bits commented Oct 3, 2012

@wonbyte yes you would install this formula for ghc, then Homebrew's haskell. Once this gets pulled into the main repo, everything will be back to normal. It is ready to be pulled, but we are waiting for it to be bottled. In the meantime, you can proceed like this:

brew rm -f ghc haskell-platform
brew install https://github.com/2bits/homebrew/raw/7cb1bcc9e5092bf309d18fd875d55c7ff8df9e01/Library/Formula/ghc.rb
brew install haskell-platform

Do it over lunch, and you should come back to it finished. If ghc doesn't build, let us know here. If you still have problems with haskell after installing this, open a new issue, okay? Thanks man.

Contributor

wonbyte commented Oct 3, 2012

@2bits Thanks for your help!!! I'll give it a shot tonight. I assume once it gets bottled any updates will work normally with brew upgrade correct?

Contributor

2bits commented Oct 3, 2012

Yes upgrading and all other functions will work normally because you have not changed any Homebrew system files by installing with a url.

Contributor

wonbyte commented Oct 3, 2012

Thanks for your help!

Sent from my iPhone

On Oct 3, 2012, at 4:31 PM, 2bits notifications@github.com wrote:

Yes upgrading and all other functions will work normally because you have not changed any Homebrew system files by installing with a url.


Reply to this email directly or view it on GitHub.

Contributor

mistydemeo commented Oct 3, 2012

@2bits I'm getting intermittent build failures during the GhcBinary build; I also see that in the current ghc formula. Can we deparallelize its make install phase?

ghc: 7.4.2 build from source
Following the discussion in #13519, ghc gets a major overhaul:

* Add a subformula that installs the ghc binary like before
* Use the ghc binary to build ghc from source
* Force ENV['LD'] = 'ld' to stop an assertion linking with llvm
* Add an option to run the testsuite. 9 unexpected fails atm
* Add a `j1` for an occasional install race
* Remove the patch which was fixed in two commits in Apr 2011.
        47ac5d859493ae0cd8dd02e1b4848f993acc3d5c
        a8d4731456ac3da0a70399e4ab821a763a4c04fb

Fixes #13519
Contributor

2bits commented Oct 3, 2012

Sure no problem. I just made that change in 01f20c8. Thanks for trying it out.

Owner

MikeMcQuaid commented Oct 3, 2012

@mistydemeo Yes, I can bottle this. Once it's "ready" someone ping me and I'll do it.

Contributor

wonbyte commented Oct 4, 2012

@2bits @mistydemeo

(gps ~)$ brew install https://github.com/2bits/homebrew/raw/7cb1bcc9e5092bf309d18fd875d55c7ff8df9e01/Library/Formula/ghc.rb
######################################################################## 100.0%
==> Downloading http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-src.tar.bz2
######################################################################## 100.0%
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file rts/Linker.c
==> Downloading http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-x86_64-apple-dar
######################################################################## 100.0%
==> ./configure --prefix=/private/tmp/ghc-otEO/ghc-7.4.2/subfo
==> make install
ranlib: file: /private/tmp/ghc-otEO/ghc-7.4.2/subfo/lib/ghc-7.4.2/libHSrts_thr_p.a(RBH.thr_p_o) has no symbols
ranlib: file: /private/tmp/ghc-otEO/ghc-7.4.2/subfo/lib/ghc-7.4.2/libHSrts_thr_p.a(Sanity.thr_p_o) has no symbols
ranlib: file: /private/tmp/ghc-otEO/ghc-7.4.2/subfo/lib/ghc-7.4.2/libHSrts_thr_p.a(EventLog.thr_p_o) has no symbols
ranlib: file: /private/tmp/ghc-otEO/ghc-7.4.2/subfo/lib/ghc-7.4.2/libHSrts_thr_p.a(Select.thr_p_o) has no symbols
make: *** [install] Error 2

Error: ghc did not build
Logs: /Users/gps/Library/Logs/Homebrew/ghc/
Help: https://github.com/mxcl/homebrew/wiki/troubleshooting
mxcl#14455

Contributor

wonbyte commented Oct 4, 2012

@2bits attempt 2:

brew install https://github.com/2bits/homebrew/raw/7cb1bcc9e5092bf309d18fd875d55c7ff8df9e01/Library/Formula/ghc.rb
######################################################################## 100.0%
==> Downloading http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-src.tar.bz2
######################################################################## 100.0%
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file rts/Linker.c
==> Downloading http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-x86_64-apple-dar
######################################################################## 100.0%
==> ./configure --prefix=/private/tmp/ghc-gWcL/ghc-7.4.2/subfo
==> make install
/usr/bin/install -c -m 644 docs/man/ghc.1 "/private/tmp/ghc-gWcL/ghc-7.4.2/subfo/share/man/man1"
echo '$TABLES_NEXT_TO_CODE = "YES";' >> driver/split/dist/ghc-split
cat driver/split/dist/ghc-split.prl >> driver/split/dist/ghc-split
/usr/bin/install -c -m 644 includes/ghcautoconf.h includes/ghcplatform.h includes/dist-ghcconstants/header/GHCConstants.h includes/dist-derivedconstants/header/DerivedConstants.h "/private/tmp/ghc-gWcL/ghc-7.4.2/subfo/lib/ghc-7.4.2/include/"
make: *** [install] Error 2

Error: ghc did not build
Logs: /Users/gps/Library/Logs/Homebrew/ghc/
Help: https://github.com/mxcl/homebrew/wiki/troubleshooting
mxcl#14455

Contributor

2bits commented Oct 4, 2012

@wonbyte I made an update before you posted, and to use that newer version of the formula you have to specify it on the install line. Currently this would be

brew install https://github.com/2bits/homebrew/raw/01f20c8177add22cab0fe70bbb604f6b3824d8ef/Library/Formula/ghc.rb

Let us know how it goes.

Contributor

wonbyte commented Oct 4, 2012

@2bits Thanks! will report back tonight.

Contributor

mistydemeo commented Oct 4, 2012

@MikeMcQuaid Really I think this is ready to go now. The remaining build issues have been fixed, the testsuite passes (at least for me on 10.6, needs to be tested on 10.7/10.8), and it appears to compile haskell-platform and haskell-platform software fine.

One remaining thing I noticed - when I built it myself (on 10.6), gmp was picked up and linked against. Which I suppose is harmless. It looks like ghc can use gmp currently but is in the process of replacing it, while the binary distribution is compiled without gmp. I guess we should just be careful while bottling.

Contributor

wonbyte commented Oct 4, 2012

@mistydemeo @MikeMcQuaid I'll report back on 10.8 tonight.

Contributor

mistydemeo commented Oct 4, 2012

@wonbyte Thanks! If you don't mind waiting the extra five minutes, can you use the --tests option to make sure the testsuite passes?

Contributor

wonbyte commented Oct 4, 2012

@mistydemeo I won't even start until probably 6pm tonight so just give me the commands you want me to run and i'll report back the results.

Contributor

mistydemeo commented Oct 4, 2012

@wonbyte That's right.

If it works, great! Just let us know it built, and maybe if it builds haskell-platform/cabal install works. If not then post the verbose output to a gist.

Contributor

wonbyte commented Oct 4, 2012

@mistydemeo will do. I appreciate the work you guys put into this! Thanks a bunch!

Contributor

2bits commented Oct 4, 2012

Thanks for helping. If you also brew it with the -d option too, it will shell out to a command prompt if it fails the tests. At the prompt you can finish the install and save yourself an hour (of rebrewing without the tests).

brew install -vd --tests https://github.com/2bits/homebrew/raw/01f20c8177add22cab0fe70bbb604f6b3824d8ef/Library/Formula/ghc.rb
make -j1 install
exit 0
Contributor

wonbyte commented Oct 4, 2012

@2bits kicking it off now. results to follow.

Contributor

wonbyte commented Oct 5, 2012

Contributor

mistydemeo commented Oct 5, 2012

@wonbyte Fantastic! Thanks for checking!

@MikeMcQuaid We're ready to bottle then. I've got a 10.6 bottle uploaded.

Owner

MikeMcQuaid commented Oct 5, 2012

@mistydemeo On it.

Owner

MikeMcQuaid commented Oct 6, 2012

Merged and bottled.

@MikeMcQuaid MikeMcQuaid closed this Oct 6, 2012

Owner

MikeMcQuaid commented Oct 6, 2012

(In 3cf0db7 and 13953f5).

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

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