Devin Mullins | 13 Oct 03:01

Error building GHC 6.8.3: "version of ../../compiler/stage1/ghc-inplace could not be determined"

Hi,

I'm trying to build 6.8.3 on Linux PowerPC, based on an old binary of
6.4 (latest build for this arch that I found). stage1 seems to have
built, but from there, building libraries almost immediately fails:

> make -C libraries all
> make[1]: Entering directory `/home/twifkak/arch/ghc/src/ghc-6.8.3/libraries'
> rm -f -f stamp/configure.library.*.base base/unbuildable
> ( cd base && setup/Setup configure \
> 	            --enable-library-profiling --enable-split-objs \
> 	           --prefix=/NONEXISTANT \
> 	           --bindir=/NONEXISTANT \
> 	           --libdir=/NONEXISTANT \
> 	           --libsubdir='$pkgid' \
> 	           --libexecdir=/NONEXISTANT \
> 	           --datadir=/NONEXISTANT \
> 	           --docdir=/NONEXISTANT \
> 	           --htmldir=/NONEXISTANT \
> 	           --interfacedir=/NONEXISTANT \
> 	           --with-compiler=../../compiler/stage1/ghc-inplace \
> 	           --with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace \
> 	           --with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace \
> 	           --with-ld=/usr/bin/ld \
> 	           --haddock-options="--use-contents=../index.html \
> 	                           --use-index=../doc-index.html" \
> 	              --configure-option='--prefix=/usr'  --configure-option='CFLAGS=-mtune=powerpc -O2 -pipe
-mpowerpc-gfxopt' \
> 	           --configure-option=--with-cc=gcc ) \
> 	      && touch stamp/configure.library.build-profiling-splitting.base || touch base/unbuildable
(Continue reading)

Devin Mullins | 13 Oct 06:14

Re: Error building GHC 6.8.3: "version of ../../compiler/stage1/ghc-inplace could not be determined"

On Sun, Oct 12, 2008 at 06:03:30PM -0700, Devin Mullins wrote:
> I'm trying to build 6.8.3 on Linux PowerPC, based on an old binary of
> 6.4 (latest build for this arch that I found). stage1 seems to have
> built, but from there, building libraries almost immediately fails:
> 
> > Configuring base-3.0.2.0...
> > Setup: ghc version >=6.2 is required but the version of ../../compiler/stage1/ghc-inplace could not
be determined.

Okay, for those of you keeping score, here's an update. It looks like
Distribution.Simple.Program.findProgramVersion is swallowing the
exception that Distribution.Simple.Utils.rawSystemStdout is throwing,
leading to the null string in the verbose log. Here's a simple test
program:

> module Main where
> 
> import Prelude hiding (catch)
> import Control.Exception (catch)
> import Distribution.Simple.Utils (rawSystemStdout)
> import Distribution.Verbosity (deafening)
> 
> main :: IO ()
> main = putStrLn =<< rawSystemStdout deafening "/bin/ls" [] `catch` (return . show)

And the output (as compiled by ghc-6.4):
$ ./Main
("/bin/ls",[])
/dev/null: openFile: invalid argument (Invalid argument)

(Continue reading)

Ian Lynagh | 19 Oct 18:13
Gravatar

Re: Error building GHC 6.8.3: "version of ../../compiler/stage1/ghc-inplace could not be determined"


Hi Devin,

On Sun, Oct 12, 2008 at 06:03:30PM -0700, Devin Mullins wrote:
> 
> I'm trying to build 6.8.3 on Linux PowerPC, based on an old binary of
> 6.4 (latest build for this arch that I found). stage1 seems to have
> built, but from there, building libraries almost immediately fails:

You could unpack the Debian package of 6.8.2:
http://packages.debian.org/lenny/powerpc/ghc6/download

"ar -x foo.deb" and then "tar -zxf data.tar.gz" if I remember correctly.
You'll have to manually tweak the paths in package.conf and the shell
script wrappers, though.

Also, when building yourself, an unregisterised build is more likely to
work correctly on PPC/Linux:
http://hackage.haskell.org/trac/ghc/wiki/Building/Unregisterised

> What's going wrong? How do I fix it? Is there a better mailing list to
> ask?

glasgow-haskell-users is a better list for this sort of question.

Thanks
Ian
Devin Mullins | 20 Oct 02:28

Re: Error building GHC 6.8.3: "version of ../../compiler/stage1/ghc-inplace could not be determined"

On Sun, Oct 19, 2008 at 05:13:55PM +0100, Ian Lynagh wrote:
> You could unpack the Debian package of 6.8.2:
> http://packages.debian.org/lenny/powerpc/ghc6/download

Thanks! Indeed, I was able to use this to build 6.8.3.

> Also, when building yourself, an unregisterised build is more likely to
> work correctly on PPC/Linux:
> http://hackage.haskell.org/trac/ghc/wiki/Building/Unregisterised

Yeah, I tried that, too, but ran into an error (and had neither the
time, the energy, nor the knowledge to investigate). Don't matter now.

> glasgow-haskell-users is a better list for this sort of question.

Yeah, I discovered that after I sent.

Thanks,
Devin

Gmane