RE: installing ghc without already having ghc
On 11 April 2005 16:44, Jessica Brennan wrote:
cd H/ghc && make boot && make in section 10.2.1 of the build guide.
Actually I just double checked and I don't get those lines of the error when doing cross-compiling. Sorry grabbed the first set of errors I saw. It is the same minus those test messages for the cross-compiling:
------------------------------------------------------------------------
==fptools== gmake all -r; in /devel/build/NetBSD/ghc/ghc-6.4-host/ghc/compiler
------------------------------------------------------------------------
/usr/local/bin/ghc -H16m -O -H32m -istage1/utils -istage1/basicTypes -istage1/types -istage1/hsSyn -istage1/prelude -istage1/rename -istage1/typecheck -istage1/deSugar -istage1/coreSyn -istage1/specialise -istage1/simplCore -istage1/stranal -istage1/stgSyn -istage1/simplStg -istage1/codeGen -istage1/main -istage1/profiling -istage1/parser -istage1/cprAnalysis -istage1/compMan -istage1/ndpFlatten -istage1/iface -istage1/cmm -Istage1 -DOMIT_NATIVE_CODEGEN -cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -IcodeGen -InativeGen -Iparser -package unix -recomp -Rghc-timing -O -fasm -H16M '-#include "hschooks.h"' -i../lib/compat -c utils/PrimPacked.lhs -o stage1/utils/PrimPacked.o -ohi stage1/utils/PrimPacked.hi
utils/PrimPacked.lhs:244: Warning: foreign declaration uses deprecated non-standard syntax
utils/PrimPacked.lhs:248: Warning: foreign declaration uses deprecated non-standard syntax
utils/PrimPacked.lhs:251: Warning: foreign declaration uses deprecated non-standard syntax
utils/PrimPacked.lhs:254: Warning: foreign declaration uses deprecated non-standard syntax
utils/PrimPacked.lhs:257: Warning: foreign declaration uses deprecated non-standard syntax ghc-6.2.1: panic! (the `impossible' happened, GHC version 6.2.1): This compiler was built without a native code generator Use -fvia-C instead
Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org, or http://sourceforge.net/projects/ghc/.
Ok, the instructions have a slight mistake, we shouldn't be using the -fasm flag to build stage 1. I'm not sure how that crept in, sorry. Just remove -fasm from GhcStage1HcOpts in mk/build.mk, that should fix it. By the way, I'm guessing you're on a Sparc box, is that right? If so, others have reported problems on Sparc with 6.4, so you might run into difficulties. We're lacking a Sparc guru at the moment. Cheers, Simon
Ok, the instructions have a slight mistake, we shouldn't be using the -fasm flag to build stage 1. I'm not sure how that crept in, sorry.
Just remove -fasm from GhcStage1HcOpts in mk/build.mk, that should fix it.
By the way, I'm guessing you're on a Sparc box, is that right? If so, others have reported problems on Sparc with 6.4, so you might run into difficulties. We're lacking a Sparc guru at the moment.
I am using Netbsd-2.0. You were correct that removing the -fasm flag fixed the error I was getting, though now I am getting the following errors. ghc-6.4-host/libraries/readline NetBSD-2.0 0 # gmake boot ------------------------------------------------------------------------ ==fptools== gmake boot -r; in /devel/build/NetBSD/ghc/ghc-6.4-host/libraries/readline ------------------------------------------------------------------------ ../../ghc/utils/hsc2hs/hsc2hs-inplace -Iinclude -I. System/Console/Readline.hsc Readline.hsc: In function `main': Readline.hsc:677: error: `UNDO_DELETE' undeclared (first use in this function) Readline.hsc:677: error: (Each undeclared identifier is reported only once Readline.hsc:677: error: for each function it appears in.) Readline.hsc:678: error: `UNDO_INSERT' undeclared (first use in this function) Readline.hsc:679: error: `UNDO_BEGIN' undeclared (first use in this function) Readline.hsc:680: error: `UNDO_END' undeclared (first use in this function) Readline.hsc:1021: error: `MULT_MATCH' undeclared (first use in this function) Readline.hsc:1044: error: `SINGLE_MATCH' undeclared (first use in this function) gmake: *** [System/Console/Readline.hs] Error 1 I have tried this with readline-5.0 both shared and static versions though I prefer to use the static version. -Jessica ~~~~~~~~~~~~~~ jib@panix.com Panix Staff
I was able to fix my previous errors by adding -I/usr/local/bin. However I am getting more errors later in the build. In stage 2 of the cross compiling build I am getting errors at this phase: $ cd H/ghc/lib $ make clean $ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files' ------------------------------------------------------------------------ ===fptools== Recursively making `all' in compat ... PWD = /devel/build/NetBSD/ghc/ghc-6.4-host/ghc/lib ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== gmake all -rk; in /devel/build/NetBSD/ghc/ghc-6.4-host/ghc/lib/compat ------------------------------------------------------------------------ ../../../ghc/compiler/stage1/ghc-inplace -H16m -O -H32m -I. -Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp -O -fvia-C -keep-hc-files -c System/Directory/Internals.hs -o System/Directory/Internals.o -ohi System/Directory/Internals.hi System/Directory/Internals.hs:1:0: Module `System.Directory.Internals' is a member of package base-1.0. To compile this module, please use -ignore-package base-1.0. <<ghc: 13436620 bytes, 3 GCs, 47324/47324 avg/max bytes residency (1 samples), 31M in use, 0.00 INIT (0.01 elapsed), 0.22 MUT (2.29 elapsed), 0.04 GC (0.29 elapsed) :ghc>> gmake[1]: *** [System/Directory/Internals.o] Error 1 If I do as it suggests and add "-ignore-package base-1.0", I get the following errors: ------------------------------------------------------------------------ ==fptools== gmake all -rk; in /devel/build/NetBSD/ghc/ghc-6.4-host/ghc/lib/compat ------------------------------------------------------------------------ ../../../ghc/compiler/stage1/ghc-inplace -H16m -O -H32m -I. -Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp -O -fvia-C -keep-hc-files -ignore-package base-1.0 -c System/Directory/Internals.hs -o System/Directory/Internals.o -ohi System/Directory/Internals.hi System/Directory/Internals.hs:1:0: Failed to load interface for `Prelude': Could not find module `Prelude': use -v to see a list of the files searched for <<ghc: 6701220 bytes, 2 GCs, 47456/47456 avg/max bytes residency (1 samples), 24M in use, 0.00 INIT (0.03 elapsed), 0.07 MUT (2.84 elapsed), 0.01 GC (0.30 elapsed) :ghc>> gmake[1]: *** [System/Directory/Internals.o] Error 1 gmake[1]: Target `all' not remade because of errors. Any suggestions? -Jessica ~~~~~~~~~~~~~~ jib@panix.com Panix Staff
On Tue, 3 May 2005, Jessica Brennan [staff] wrote:
I was able to fix my previous errors by adding -I/usr/local/bin. However I am getting more errors later in the build.
Sorry just for clerification it isn't -I/usr/local/bin it should be -I/usr/local/include. Just incase anyone has the same problem and is looking at what the fix could be. -Jessica
In stage 2 of the cross compiling build I am getting errors at this phase: $ cd H/ghc/lib $ make clean $ make -k UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files'
------------------------------------------------------------------------ ===fptools== Recursively making `all' in compat ... PWD = /devel/build/NetBSD/ghc/ghc-6.4-host/ghc/lib ------------------------------------------------------------------------ ------------------------------------------------------------------------ ==fptools== gmake all -rk; in /devel/build/NetBSD/ghc/ghc-6.4-host/ghc/lib/compat ------------------------------------------------------------------------ ../../../ghc/compiler/stage1/ghc-inplace -H16m -O -H32m -I. -Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp -O -fvia-C -keep-hc-files -c System/Directory/Internals.hs -o System/Directory/Internals.o -ohi System/Directory/Internals.hi
System/Directory/Internals.hs:1:0: Module `System.Directory.Internals' is a member of package base-1.0. To compile this module, please use -ignore-package base-1.0. <<ghc: 13436620 bytes, 3 GCs, 47324/47324 avg/max bytes residency (1 samples), 31M in use, 0.00 INIT (0.01 elapsed), 0.22 MUT (2.29 elapsed), 0.04 GC (0.29 elapsed) :ghc>> gmake[1]: *** [System/Directory/Internals.o] Error 1
If I do as it suggests and add "-ignore-package base-1.0", I get the following errors:
------------------------------------------------------------------------ ==fptools== gmake all -rk; in /devel/build/NetBSD/ghc/ghc-6.4-host/ghc/lib/compat ------------------------------------------------------------------------ ../../../ghc/compiler/stage1/ghc-inplace -H16m -O -H32m -I. -Rghc-timing -I../../../libraries -fglasgow-exts -no-recomp -O -fvia-C -keep-hc-files -ignore-package base-1.0 -c System/Directory/Internals.hs -o System/Directory/Internals.o -ohi System/Directory/Internals.hi
System/Directory/Internals.hs:1:0: Failed to load interface for `Prelude': Could not find module `Prelude': use -v to see a list of the files searched for <<ghc: 6701220 bytes, 2 GCs, 47456/47456 avg/max bytes residency (1 samples), 24M in use, 0.00 INIT (0.03 elapsed), 0.07 MUT (2.84 elapsed), 0.01 GC (0.30 elapsed) :ghc>> gmake[1]: *** [System/Directory/Internals.o] Error 1 gmake[1]: Target `all' not remade because of errors.
Any suggestions?
-Jessica
~~~~~~~~~~~~~~ jib@panix.com Panix Staff _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
~~~~~~~~~~~~~~ jib@panix.com Panix Staff
participants (2)
-
Jessica Brennan [staff] -
Simon Marlow