Few problems with building GHC

Zachary Turner divisortheory at gmail.com
Sun Mar 29 19:01:11 EDT 2009


On Sun, Mar 29, 2009 at 5:35 PM, Claus Reinke <claus.reinke at talk21.com>wrote:

>
> Getting the source that actually matches the installed binaries is
> not straightforward (unrecorded compilation options). Sometimes,
> one "accurate in spirit" version of the source might be sufficient
> independent of the details of the installed binary packages. There are
> tickets pending, with discussion of the issues:
>
> http://hackage.haskell.org/trac/ghc/ticket/2630
> http://hackage.haskell.org/trac/hackage/ticket/364
>
> Also, Cabal has recently acquired an 'unpack' command, which
> allows to unpack the source for a package into a local directory.
>
> But someone still needs to connect the pieces, either for each
> tool, or for a common framework that all source-dependent
> tools could use.

I see, so I guess the short answer is "there's just no easy way to do it for
now".  Perhaps I'll write a Perl script that will do it for me while waiting
for a standardized solution.  The issue of source/binary version mismatches
shouldn't be a problem as long as the source I copy over is the same source
I built from right?  Or are you suggesting that sometimes the source is
transformed during the build process before being compiled?




>
>
>  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.
>>
>
> Personally, I last built the head version
>
> $ ghc --version
> The Glorious Glasgow Haskell Compilation System, version 6.11.20090320
>
> that way. The buildbots seem to succeed most of the time recently,
> with some recent issues in stable:
>
> http://darcs.haskell.org/buildbot/
>
> (whenever windows head/stable builds there, it is a good time to pull
> patches;-)
>
>  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".
>>
>
> Not just that. Cabal is also trying to find ghc via a cygwin path
> (about which ghc-compiled binaries like Cabal don't know a thing).
>
> Are you sure you've configured for mingw? Otherwise the build
> system will try to proceed in cygwin, as if for a unix platform.

I'm pretty sure I'm NOT configured for MinGW when I was trying to build
under Cygwin.  I just assumed that the process would be completely
independent of the mingw process.  What do I need to do configure the cygwin
environment for MinGW?



>
>
>  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.
>>
>
> Mingw provides the C compiler, msys or cygwin the build tools.
> Even under cygwin, you still need to configure to use the mingw
> C compiler and linker (not the cygwin versions of these).
>
> Simon Marlow has recently cleaned up the build instructions
> http://hackage.haskell.org/trac/ghc/wiki/Building
>
> If there's still anything missing or ambiguous in there, please provide
> details, questions, or improve the wiki pages. We all like those
> instructions to be accurate, for the next time we start from scratch!-)


Is there a way to download a windows binary distribution of GCC myself and
have Cygwin use my version of GCC and Cygwin's version of all tools?  It
just seems a little superfluous to have two unix environments (Cygwin and
mingw) and two separate copies of GCC installed (since I already use windows
GCC for other reasons)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20090329/2aef33c2/attachment.htm


More information about the Glasgow-haskell-users mailing list