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 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. if ifBuildable/ifBuildable base; then \ cd base && \ cmp -s ../Makefile.local Makefile.local || cp ../Makefile.local .; \ mv GNUmakefile GNUmakefile.tmp; \ setup/Setup makefile -f GNUmakefile; \ cmp -s GNUmakefile GNUmakefile.tmp && mv GNUmakefile.tmp GNUmakefile; \ make -wr && \ setup/Setup register --inplace; \ fi mv: cannot stat `GNUmakefile': No such file or directory Setup: error reading dist/setup-config; run "setup configure" command?
make[2]: Entering directory `/home/twifkak/arch/ghc/src/ghc-6.8.3/libraries/base' make[2]: *** No targets specified and no makefile found. Stop. make[2]: Leaving directory `/home/twifkak/arch/ghc/src/ghc-6.8.3/libraries/base' make[1]: *** [make.library.base] Error 2 make[1]: Leaving directory `/home/twifkak/arch/ghc/src/ghc-6.8.3/libraries' make: *** [stage1] Error 2
(This particular transcript is from an unclean build, but the same error occurred on a freshly untarred ghc.) The subsequent errors seems to stem from the root one of being unable to configure:
[twifkak@ponyride base]$ setup/Setup configure -v3 Configuring base-3.0.2.0... Creating dist (and its parents) /home/twifkak/usr/bin/ghc --numeric-version Warning: cannot determine version of /home/twifkak/usr/bin/ghc : "" Setup: ghc version >=6.2 is required but the version of /home/twifkak/usr/bin/ghc could not be determined. [twifkak@ponyride base]$ ghc --numeric-version 6.4 [twifkak@ponyride base]$ setup/Setup configure --with-compiler=../../compiler/stage1/ghc-inplace -v3 Configuring base-3.0.2.0... Creating dist (and its parents) ../../compiler/stage1/ghc-inplace --numeric-version Warning: cannot determine version of ../../compiler/stage1/ghc-inplace : "" Setup: ghc version >=6.2 is required but the version of ../../compiler/stage1/ghc-inplace could not be determined. [twifkak@ponyride base]$ ../../compiler/stage1/ghc-inplace --numeric-version 6.8.3
What's going wrong? How do I fix it? Is there a better mailing list to ask? Thanks, 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:
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) Whuh? Perhaps I should try bootstrapping 6.6 first...

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

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
participants (2)
-
Devin Mullins
-
Ian Lynagh