logo       

forkM failed: Declaration for compileC user error (IOEnv failure) (Was: Re:: msg#00123

lang.haskell.glasgow.bugs

Subject: forkM failed: Declaration for compileC user error (IOEnv failure) (Was: Re: GHC API: Access to nativeCodeGen?)

"Simon Marlow" <simonmar@xxxxxxxxxxxxx> writes:

> If the language you want to generate code for is at the level of C--,
> then you could indeed use GHC's native code generator. There isn't an
> interface to it exposed by the GHC API, but you can use the interfaces
> directly: the AsmCodeGen module is the top-level of the native code
> generator, and basically takes Cmm (defined in module Cmm) and produces
> assembly code.

Started looking at this on MacOS X (10.4 I think) with Ghc
6.4. Had a couple of modules named similarily to modules included by
AsmCodeGen, so tried to workaround that by giving
-i$ghcbase/cmm:$ghcbase/nativeGen:...:`pwd`/Glurf to ghc.

Version information and such:

$ uname -a
Darwin sm-mac31 8.2.0 Darwin Kernel Version 8.2.0: Fri Jun
24 17:46:54 PDT 2005; root:xnu-792.2.4.obj~3/RELEASE_PPC Power
Macintosh powerpc
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.4
$ gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1809)

Tail of the log:

Starting fork { Declaration for compileC
Loading decl for Execution.compileC
updating EPS_
Need decl for Config.CfgOpts
Considering whether to load Config {- SYSTEM -}
The interface for `Execution'
Can't find interface-file declaration for Config.CfgOpts
Probable cause: bug in .hi-boot file, or inconsistent .hi file
Use -ddump-if-trace to get an idea of which file caused the error
forkM failed: Declaration for compileC user error (IOEnv failure)
} ending fork (badly) Declaration for compileC
ghc-6.4: panic! (the `impossible' happened, GHC version 6.4):
forkM Declaration for compileC{v}

Please report it as a compiler bug to glasgow-haskell-bugs@xxxxxxxxxxx,
or http://sourceforge.net/projects/ghc/.

There is a Config.{hs,o,hi} in `pwd`/Glurf, named Glurf.Config,
another Config from ghc is in $ghcbase/main.

I switched to fptools/ghc/compiler/ghc-inplace from a checkout of ghc
from Fri Jul 22, that didn't cause a panic. I'll stick to HEAD for
now.

I have a 19000 line output file from -ddump-if-trace that I could
send if anyone wants to look closer at this and needs more details.

/ Peter


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise