Re: Error compiling GHC/Num.lhs

2007-05-03 Thread Bas van Dijk

On 5/2/07, Bertram Felgenhauer [EMAIL PROTECTED] wrote:

...
I have two patches that should fix this:
...


Thanks, I applied base-install-includes.patch.
(Cabal-fix-installIncludeFiles.patch was already applied according to
darcs.)

However, in order to apply the patches I did a new checkout of GHC
without the --partial. This seemed to have pulled a few new patches
that break my build again.

I fixed the first error (I darcs send the patch):

./compiler/coreSyn/CoreUtils.lhs 262
-mkAltExpr DEFAULT = panic mkAltExpr
+mkAltExpr DEFAULT _ _ = panic mkAltExpr


This leaves the second error when building base:

Building base-2.1...

GHC/Exts.hs:29:1:
   Not in scope: type constructor or class `IsString'

If I import Data.String in GHC/Exts.hs I get the following error:

Building base-2.1...
ghc-6.7.20070502: panic! (the 'impossible' happened)
 (GHC version 6.7.20070502 for i386-unknown-linux):
   mkWWcpr: not a product base:Data.Typeable.TypeRep{tc r3eN}

What can be the problem?

regards,

Bas van Dijk
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


RE: Error compiling GHC/Num.lhs

2007-05-03 Thread Simon Peyton-Jones
the base library is in a bit of a sad state.

I think I have fixed it.  Try pulling (both compiler and libraries) and try 
again

S

| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
| Behalf Of Bas van Dijk
| Sent: 03 May 2007 11:32
| To: Bertram Felgenhauer
| Cc: glasgow-haskell-users@haskell.org
| Subject: Re: Error compiling GHC/Num.lhs
|
| On 5/2/07, Bertram Felgenhauer [EMAIL PROTECTED] wrote:
|  ...
|  I have two patches that should fix this:
|  ...
|
| Thanks, I applied base-install-includes.patch.
| (Cabal-fix-installIncludeFiles.patch was already applied according to
| darcs.)
|
| However, in order to apply the patches I did a new checkout of GHC
| without the --partial. This seemed to have pulled a few new patches
| that break my build again.
|
| I fixed the first error (I darcs send the patch):
|
| ./compiler/coreSyn/CoreUtils.lhs 262
| -mkAltExpr DEFAULT = panic mkAltExpr
| +mkAltExpr DEFAULT _ _ = panic mkAltExpr
|
|
| This leaves the second error when building base:
|
| Building base-2.1...
|
| GHC/Exts.hs:29:1:
| Not in scope: type constructor or class `IsString'
|
| If I import Data.String in GHC/Exts.hs I get the following error:
|
| Building base-2.1...
| ghc-6.7.20070502: panic! (the 'impossible' happened)
|   (GHC version 6.7.20070502 for i386-unknown-linux):
| mkWWcpr: not a product base:Data.Typeable.TypeRep{tc r3eN}
|
| What can be the problem?
|
| regards,
|
| Bas van Dijk
| ___
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users@haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error compiling GHC/Num.lhs

2007-05-03 Thread Bas van Dijk

On 5/3/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote:

I think I have fixed it...


You did, thanks very much!

GHC now builds and install without any errors, jippy!

Thanks,

Bas van Dijk
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error compiling GHC/Num.lhs

2007-05-02 Thread Simon Marlow

Bas van Dijk wrote:


However the build now crashes when running Haddock on Cabal:
...
ifBuildable/ifBuildable Cabal setup/Setup haddock
Preprocessing library Cabal-1.1.7...
Running Haddock for Cabal-1.1.7...
Warning: cannot use package base-2.1:
  ghc-pkg failed
dist/build/tmp/Distribution/PreProcess.hs:Distribution/PreProcess.hs:
115:1: parse error in doc string: [TokSpecial '/',TokString
build,TokSpecial '']
make[1]: *** [doc.library.Cabal] Error 1
make[1]: Leaving directory `/home/bas/development/haskell/ghc/libraries'
make: *** [stage1] Error 2


Thanks, I think I've fixed this one now.

Cheers,
Simon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error compiling GHC/Num.lhs

2007-05-02 Thread Bas van Dijk

On 5/2/07, Simon Marlow [EMAIL PROTECTED] wrote:

Thanks, I think I've fixed this one now.


You did indeed, thanks!

Now I get another error when compiling main/GHC.hs:

../compiler/stage1/ghc-inplace -H64m -Onot -fasm -optc-march=athlon64
-opta-march=athlon64  -istage2/utils  -istage2/basicTypes
-istage2/types  -istage2/hsSyn  -istage2/prelude  -istage2/rename
-istage2/typecheck  -istage2/deSugar  -istage2/coreSyn
-istage2/specialise  -istage2/simplCore  -istage2/stranal
-istage2/stgSyn  -istage2/simplStg  -istage2/codeGen  -istage2/main
-istage2/profiling  -istage2/parser  -istage2/cprAnalysis
-istage2/ndpFlatten  -istage2/iface  -istage2/cmm  -istage2/nativeGen
-istage2/ghci -Istage2 -DGHCI -package template-haskell
-DGHCI_TABLES_NEXT_TO_CODE -threaded -package readline -DUSE_READLINE
-cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -Iparser -package
unix -package Cabal -ignore-package lang -recomp -Rghc-timing -Onot
-fasm -H16M '-#include cutils.h' -package-name  ghc-6.7.20070502
-fgenerics-c main/GHC.hs -o stage2/main/GHC.o  -ohi
stage2/main/GHC.hi

main/GHC.hs:2223:50:
   Couldn't match expected type `InteractiveContext'
  against inferred type `[Name]'
   In the sixth argument of `ResumeHandle', namely `names'
   In the expression:
   ResumeHandle
 breakMVar statusMVar final_names final_ic resume_ic names
   In the definition of `res':
   res = ResumeHandle
   breakMVar statusMVar final_names final_ic resume_ic names

main/GHC.hs:2230:54:
   Couldn't match expected type `InteractiveContext'
  against inferred type `[Name]'
   In the `hsc_IC' field of a record
   In the second argument of `writeIORef', namely
   `hsc_env {hsc_IC = final_ic}'
   In the expression: writeIORef ref (hsc_env {hsc_IC = final_ic})

main/GHC.hs:2270:26:
   Constructor `ResumeHandle' should have 7 arguments, but has been given 6
   In the pattern:
   ResumeHandle breakMVar
statusMVar
final_names
final_ic
resume_ic
names
   In the definition of `resume':
   resume (Session ref)
  (res@(ResumeHandle breakMVar
 statusMVar
 final_names
 final_ic
 resume_ic
 names))
= do hsc_env - readIORef ...
 writeIORef ... (...)
 
ghc: 119216100 bytes, 25 GCs, 6699552/13740056 avg/max bytes
residency (4 samples), 27M in use, 0.00 INIT (0.00 elapsed), 0.49 MUT
(0.54 elapsed), 0.33 GC (0.34 elapsed) :ghc
make[2]: *** [stage2/main/GHC.o] Error 1
make[2]: Leaving directory `/home/bas/development/haskell/ghc/compiler'
make[1]: *** [stage2] Error 2
make[1]: Leaving directory `/home/bas/development/haskell/ghc'
make: *** [bootstrap2] Error 2

regards,

Bas van Dijk
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error compiling GHC/Num.lhs

2007-05-02 Thread Simon Marlow

Bas van Dijk wrote:

On 5/2/07, Simon Marlow [EMAIL PROTECTED] wrote:

Thanks, I think I've fixed this one now.


You did indeed, thanks!

Now I get another error when compiling main/GHC.hs:

../compiler/stage1/ghc-inplace -H64m -Onot -fasm -optc-march=athlon64
-opta-march=athlon64  -istage2/utils  -istage2/basicTypes
-istage2/types  -istage2/hsSyn  -istage2/prelude  -istage2/rename
-istage2/typecheck  -istage2/deSugar  -istage2/coreSyn
-istage2/specialise  -istage2/simplCore  -istage2/stranal
-istage2/stgSyn  -istage2/simplStg  -istage2/codeGen  -istage2/main
-istage2/profiling  -istage2/parser  -istage2/cprAnalysis
-istage2/ndpFlatten  -istage2/iface  -istage2/cmm  -istage2/nativeGen
-istage2/ghci -Istage2 -DGHCI -package template-haskell
-DGHCI_TABLES_NEXT_TO_CODE -threaded -package readline -DUSE_READLINE
-cpp -fglasgow-exts -fno-generics -Rghc-timing -I. -Iparser -package
unix -package Cabal -ignore-package lang -recomp -Rghc-timing -Onot
-fasm -H16M '-#include cutils.h' -package-name  ghc-6.7.20070502
-fgenerics-c main/GHC.hs -o stage2/main/GHC.o  -ohi
stage2/main/GHC.hi

main/GHC.hs:2223:50:
   Couldn't match expected type `InteractiveContext'
  against inferred type `[Name]'
   In the sixth argument of `ResumeHandle', namely `names'
   In the expression:
   ResumeHandle
 breakMVar statusMVar final_names final_ic resume_ic names
   In the definition of `res':
   res = ResumeHandle
   breakMVar statusMVar final_names final_ic resume_ic names


I believe this one is now fixed, sorry about that.

Cheers,
Simon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error compiling GHC/Num.lhs

2007-05-02 Thread Bas van Dijk

On 5/2/07, Simon Marlow [EMAIL PROTECTED] wrote:

I believe this one is now fixed, sorry about that.


No problem. I'm now able to successfully make GHC. Thanks about that!

However 'make install' fails:


$ make install
...
ifBuildable/ifBuildable base setup/Setup install
copy directory 'dist/doc/html/base' to '/home/bas/share/ghc/doc/html/base'.
...
copy dist/build/HSbase-2.1.o to
/home/bas/lib/base-2.1/ghc-6.7.20070502/HSbase-2.1.o

Registering base-2.1...
Reading package info from .installed-pkg-config ... done.
ghc-pkg: /home/bas/lib/base-2.1/ghc-6.7.20070502/include doesn't exist
or isn't a directory (use --force to override)
make[1]: *** [install.library.base] Error 1
make: *** [install] Error 1


The directory: /home/bas/lib/base-2.1/ghc-6.7.20070502/include indeed
does not exists.

What can be the problem?

regards,

Bas van Dijk
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error compiling GHC/Num.lhs

2007-05-02 Thread Bertram Felgenhauer
[Note: Sorry if this is a duplicate. I originally sent the patches
inline in the mail, but the resulting mail grew rather big and is
awaiting moderators approval now. (moderators: no need to approve it)]

Bas van Dijk wrote:
 On 5/2/07, Simon Marlow [EMAIL PROTECTED] wrote:
 I believe this one is now fixed, sorry about that.
 
 No problem. I'm now able to successfully make GHC. Thanks about that!
 
 However 'make install' fails:
 
 
 $ make install
 ...
 ifBuildable/ifBuildable base setup/Setup install
 copy directory 'dist/doc/html/base' to '/home/bas/share/ghc/doc/html/base'.
 ...
 copy dist/build/HSbase-2.1.o to
 /home/bas/lib/base-2.1/ghc-6.7.20070502/HSbase-2.1.o
 
 Registering base-2.1...
 Reading package info from .installed-pkg-config ... done.
 ghc-pkg: /home/bas/lib/base-2.1/ghc-6.7.20070502/include doesn't exist
[...]

I'm sorry, that's my fault.

I have two patches that should fix this:

One for libraries/Cabal,
   http://int-e.home.tlink.de/haskell/Cabal-fix-installIncludeFiles.patch
and another for libraries/base:
   http://int-e.home.tlink.de/haskell/base-install-includes.patch

The semantics for the includes: and install-includes: fields in cabal
files has changed; the patch against base adds an install-includes
field to the base.cabal file that uses the new semantics. I was going
to send this patch in now anyway.

I'm afraid I missed the interaction of the install directory and the
package registration, and obviously I didn't test this properly. So
I revert the behaviour back to always creating the include directory.

Bertram
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error compiling GHC/Num.lhs

2007-05-01 Thread Bas van Dijk

On 4/29/07, Ian Lynagh [EMAIL PROTECTED] wrote:


Hi Bas,

On Sun, Apr 29, 2007 at 11:54:35AM +, Bas van Dijk wrote:

 I'm trying to build GHC from darcs. Unfortunately compilation fails
 with the following error:

 ...
 cpphs: #error Please define LEFTMOST_BIT to be 2^(SIZEOF_HSWORD*8-1)
 in GHC/Num.lhs  at line 27 col 1
 make[1]: *** [doc.library.base] Error 1
 make[1]: Leaving directory `/home/bas/development/haskell/ghc/libraries'
 make: *** [stage1] Error 2
 ...

 The following is the part where the error occurs in
 libraries/base/GHC/Num.lhs :
 ...
 #include MachDeps.h
 #if SIZEOF_HSWORD == 4

This is a cpphs bug - IIRC it wasn't recursively expanding
SIZEOF_HSWORD. Either install cpphs from darcs (I don't think there is a
release with the fix yet) or uninstall it so that cpp is used instead.


Thanks
Ian


After uninstalling cpphs the error no longer occurs, thanks!

However the build now crashes when running Haddock on Cabal:
...
ifBuildable/ifBuildable Cabal setup/Setup haddock
Preprocessing library Cabal-1.1.7...
Running Haddock for Cabal-1.1.7...
Warning: cannot use package base-2.1:
  ghc-pkg failed
dist/build/tmp/Distribution/PreProcess.hs:Distribution/PreProcess.hs:
115:1: parse error in doc string: [TokSpecial '/',TokString
build,TokSpecial '']
make[1]: *** [doc.library.Cabal] Error 1
make[1]: Leaving directory `/home/bas/development/haskell/ghc/libraries'
make: *** [stage1] Error 2

The respected code from libraries/Cabal/Distribution/PreProcess.hs
(line 115 and onwards a bit):

data PreProcessor = PreProcessor {

 -- Is the output of the pre-processor platform independent? eg happy
output
 -- is portable haskell but c2hs's output is platform dependent.
 -- This matters since only platform independent generated code can
be
 -- inlcuded into a source tarball.
 platformIndependent :: Bool,

 -- TODO: deal with pre-processors that have implementaion dependent
output
 --   eg alex and happy have --ghc flags. However we can't really
inlcude
 --   ghc-specific code into supposedly portable source tarballs.

 runPreProcessor :: (FilePath, FilePath) -- Location of the source
file relative to a base dir
 - (FilePath, FilePath) -- Output file name,
relative to an output base dir
 - Int  -- verbosity
 - IO ()-- Should exit if the preprocessor fails
 }

Do I maybe need a newer Haddock for this? Currently I have version
0.8. Installing darcs version right now...

Thanks,

Bas van Dijk
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Error compiling GHC/Num.lhs

2007-04-29 Thread Ian Lynagh

Hi Bas,

On Sun, Apr 29, 2007 at 11:54:35AM +, Bas van Dijk wrote:
 
 I'm trying to build GHC from darcs. Unfortunately compilation fails
 with the following error:
 
 ...
 cpphs: #error Please define LEFTMOST_BIT to be 2^(SIZEOF_HSWORD*8-1)
 in GHC/Num.lhs  at line 27 col 1
 make[1]: *** [doc.library.base] Error 1
 make[1]: Leaving directory `/home/bas/development/haskell/ghc/libraries'
 make: *** [stage1] Error 2
 ...
 
 The following is the part where the error occurs in 
 libraries/base/GHC/Num.lhs :
 ...
 #include MachDeps.h
 #if SIZEOF_HSWORD == 4

This is a cpphs bug - IIRC it wasn't recursively expanding
SIZEOF_HSWORD. Either install cpphs from darcs (I don't think there is a
release with the fix yet) or uninstall it so that cpp is used instead.


Thanks
Ian

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users