
On 30/10/2010 16:52, David Fox wrote:
On Sat, Oct 30, 2010 at 4:43 AM, Serge D. Mechveliani
wrote: Dear GHC developers,
I am testing this fresh ghc-7.0.0.20101028 on Debian Linux, i386-family. Making it from source by ghc-6.12.3 is all right. Then, making it from source by itself reports (here I abbreviate the messages by inserting `...')
--------------------------------------------------------------------- + test -f mk/config.mk.old + cp -p mk/config.mk mk/config.mk.old ... ... "inplace/bin/mkdirhier" utils/ghc-cabal/dist/build/tmp//. "inplace/bin/mkdirhier" bootstrapping/. "/home/mechvel/ghc/7.01pre/inst1/bin/ghc" -H32m -O --make utils/ghc-cabal/ghc-cabal.hs -o utils/ghc-cabal/dist/build/tmp/ghc-cabal ... ... "rm" -f compiler/stage1/ghc_boot_platform.h Creating compiler/stage1/ghc_boot_platform.h... Done. "/usr/bin/gcc" -fno-stack-protector -DTABLES_NEXT_TO_CODE -Iincludes -Irts -DGEN_HASKELL -c includes/mkDerivedConstants.c -o includes/dist-ghcconstants/build/mkDerivedConstants.o ... ... ... utils/genprimopcode/dist/build/Lexer.o: In function `s2yT_info': (.text+0x1e1d): undefined reference to `__stginit_arrayzm0zi3zi0zi2_DataziArray_' ... ... utils/genprimopcode/dist/build/Parser.o: In function `s4pK_info': (.text+0x5691): undefined reference to `__stginit_arrayzm0zi3zi0zi2_DataziArray_' collect2: ld returned 1 exit status make[1]: *** [utils/genprimopcode/dist/build/tmp/genprimopcode] Error 1 make: *** [all] Error 2 ---------------------------------------------------------------------
Why cannot it make itself?
genprimopcode now needs -package array to build. We'll fix this in the build system but it raises an interesting point that we probably haven't publicised much. Previously we linked the haskell98 package by default, which also caused its dependencies (include array) to also be linked, but in 7.0.1 we don't link haskell98 by default, only base. If you're using --make (which is now the default in 7.0.1), you won't notice any difference, because all package dependencies are automatically linked, so this only makes a differences in "one-shot" mode where you compile each module to .o files first and then link by saying ghc Main.o Foo.o Bar.o -o prog So if you're doing this, and the program has dependencies on modules not in base, then you need to list them explicitly, e.g. ghc -package haskell98 Main.o Foo.o Bar.o -o prog This is part of moving from Haskell 98 to Haskell 2010 as our default base language. Cheers, Simon