| Summary: | Feature request: bootstrapping Haskell (ghc) | ||
|---|---|---|---|
| Product: | Gentoo/Alt | Reporter: | Dirk Schoenberger <dirk.schoenberger> |
| Component: | Mac OSX | Assignee: | Gentoo for Mac OS X <ppc-macos> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | haskell, wolfgang.thaller |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | OS X | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Dirk Schoenberger
2006-02-18 10:41:07 UTC
See also bug #68930 Having a ghc binary working on your machine to start with is a really good start. To get it realy working may need a bit of fiddling. You should probably start with modifying the ghc ebuild to turn off some features. Take a look at what gets turned off for ppc and alpha. Try the same. What gcc version are you using? ghc is known not to work yet with gcc-4.x. Does the ghc you downloaded build ordinary simple programs? Does ghc complie ok from source manually? ie not using the ebuild. Did the macos build that you downloaded need any special source patches when it was built? You might want to check the darwin ports to see if they're using any patches. (In reply to comment #2) > What gcc version are you using? ghc is known not to work yet with gcc-4.x. That's a problem, as OSX 10.4's default compiler (and the only one we support) is GCC4 Hmm, I wonder how the normal OSX version works then. Perhaps they do have some patches to make it work with gcc 4. Ok, apparently I was wrong. ghc-6.4.1 on FC4 x86/amd64 uses gcc4. I don't know if the OSX release of ghc-6.4.1 was the vanilla source or with patches. So it may be that there is still a problem with gcc4 on ppc. So I guess the experiment would be to try building ghc manually from the tarball. We could also try contacting the chap who built the OSX binary of ghc-6.4.1. Just for my understanding, you always need a Haskell compiler before you can build a new one right? So if we can build one, and make a binary package of that for gentoo, we would have a nice starting point of Gentoo + Haskell + OSX, right? Yes. More specifically ghc requires ghc to build itself. That's why in Gentoo we have both dev-lang/ghc and dev-lang/ghc-bin. The ghc-bin is basically a normal portage .tbz2 file build from the ghc ebuild. So yes, the trick is to start with some non-portage version of ghc. Use that to build the ghc ebuild. And finally use that to make a package for ghc-bin. Eg for sparc & alpha we started with binary packages from debian and used them to bootstrap the gentoo ghc ebuild. For MacOSX you've already got the binary package provided by the ghc hackers. We ought to be able to use that to bootstrap the ghc ebuild. > Unfortunately the emerge failed with [...] > /var/tmp/portage/ghc-6.4.1-r2/temp/ghc8156.hc: In function 'shL9_ret': [...] Could someone re-run the last ghc-inplace command using -keep-tmp-files and send me the temp file ghc????.hc that causes the error? Wolfgang, thanks very much for helping us to look into this. If you have any questions about the ebuild side of things do not hesistate to ask. You can ask questions here or in #gentoo-haskell on irc.freenode.net. Ok, let's see how far I can get this. ok... % install_name_tool -change /usr/local/lib/libreadline.5.0.dylib /Library/Gentoo/usr/lib/libreadline.5.0.dylib ~/Desktop/ghc-6.4.1/lib/powerpc-apple-darwin/ghc-6.4.1 % ~/Desktop/ghc-6.4.1/lib/powerpc-apple-darwin/ghc-6.4.1 dyld: Library not loaded: /Users/wolfgang/GHC/MacPackage/build-dyn/libraries/readline/libHSreadline_dyn.dylib Referenced from: /Users/grobian/Desktop/ghc-6.4.1/lib/powerpc-apple-darwin/ghc-6.4.1 Reason: image not found Trace/BPT trap This is the 'unix style' thing on the download page (http://www.haskell.org/ghc/download_ghc_641.html). I guess I was a bit too optimistic. I see that it tries to load something from /Users/wolfgang (not me), so I will give install_name_tool some more tries... ok, otool -L says everything in the ghc-6.4.1/lib/powerpc-apple-darwin dir is looking for libraries in /Users/wolfgang... so I'm wondering what would be the best solution for now... needs readline really bad, so it's now progressive/prefix stuff (In reply to comment #12) > ok, otool -L says everything in the ghc-6.4.1/lib/powerpc-apple-darwin dir is > looking for libraries in /Users/wolfgang... so I'm wondering what would be the > best solution for now... The Makefile for the binary package should replace those things with whatever is appropriate for your system when you run 'make' or 'make in-place'. Manual install_name_tool doctoring should only be required if your libreadline-5.0 is not in /usr/local/lib and your libgmp is not the GMP.framework/GMP that ships with my other (.pkg) binary distribution. In that case, you'll only need to use it on the executables, not the libraries. I switched to the installer "for dummies" :) to be sure. And compiling semi-manual right now (for a while already) to see what happens. Thanks for your comments, I probably should have read the README or something... > needs readline really bad, so it's now progressive/prefix stuff
I had no big problems yet while package.providing readline 4.3 on Tiger
So prefix is not really needed.
Any news on this? What are we waiting on atm? It'd be nice to get this supported. I think time and solutions. Time because compiling it takes ages, and solutions because it didn't compile in the end, IIRC. There was also a problem on my side getting the haskell binary getting to run. ghc-6.6.1 is in the prefix tree for x86-macos, ppc-macos, x86-solaris and sparc-solaris (untested). A precompiled binary package is available for *-macos for prefix. |