Few problems with building GHC

Zachary Turner divisortheory at gmail.com
Sun Mar 29 17:56:08 EDT 2009


Hi,

This is my first time trying to compile GHC, so forgive me if these issues
are mentioned somewhere.  I couldn't find them anywhere on the wiki.

First, I had originally installed a binary distribution and then tried to
compile another program (a Haskell editor) that recommended I have source
available for all libraries, since it would be able to give me better info
in the editor.  So this is why I decided to compile GHC from source in the
first place.  So I compiled GHC, and did make install, and I was _expecting_
that all of the library sources would end up in the directories alongside
the binaries as well and that this is how the editor would be able to locate
the source.  But this did not happen, and instead my library folders look
exactly like they do in the binary distribution that I installed by
downloading the prepacked installer from the website.  However, at one point
I had downloaded some packages from Hackage and installed them with
runhaskell configure, runhaskell build, runhaskell install on each of these
new libraries, and the source did end up in the library directories
alongside the binaries.  So I feel like I'm doing something wrong in
building GHC, and that when I install there should be a way to have the
source of the libraries copied to the target directories.  Can someone
elaborate on how this is supposed to work for other programs that depend on
the library sources to be able to find them?  I know that of the 2 Hackage
packages that I installed, the editor printed a message saying that it did
find source for those two, but not for any other libraries.

Second, I cannot create a windows build of GHC under cygwin.  Looking at the
Building Guide on the wiki suggests that this is indeed supported.  However,
when I try to build it I get

cabal-bin.exe: Cannot find the program 'ghc' at
'/cygdrive/c/dev/haskell/ghc/ghc-6.10.1/bin/ghc' or on the path
make[1]: *** [bootstrapping.conf] Error 1
make[1]: Leaving directory
`/cygdrive/c/dev/haskell/ghc/ghc-6.10.1-src/libraries'
make: *** [stage1] Error 2

There seems to be some unix/windows confusion here, because it's looking for
an executable file named "ghc", when the actual executable name is
"ghc.exe".  However, building under MSYS everything works perfectly.  Is
Cygwin just not supported, or do I need to change something here?  I don't
see any point in cluttering up my system with tons of extra software like
MinGW, msys, etc if Cygwin works fine.

Last, after building GHC when I go to run make install, I want the target
location to be the original location of the compiler that I used to build
GHC in the beginning.  In other words, I want to have it overwrite the old
version of GHC instead of going to the default install location under
/usr/bin, etc...  How can I specify the target install location?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20090329/36a901e9/attachment.htm


More information about the Glasgow-haskell-users mailing list