
Hi, I am trying to build ghc-6.4.2 under solaris x86 (10.0). I mainly followed http://www.haskell.org/ghc/docs/latest/html/building/sec-porting-ghc.html, but now I am stuck. I managed to build an unregistered ghc at the target. I build the .hc files on a x86 Linux box. It compiles hello world .hs programs fine. This are the steps I am using to build the ghc with the unregistered build: PATH=/var/tmp/gsauthof/bin:/usr/sfw/bin:$PATH ./configure --with-gcc=/usr/sfw/bin/gcc --with-ghc="/var/tmp/gsauthof/src/ghc-6.4.2/ghc/compiler/ghc-inplace" --prefix=/var/tmp/gsauthof/ghc-6.4.2 2>&1 | tee log PATH=/var/tmp/gsauthof/bin:/usr/sfw/bin:$PATH make 2>&1 | tee log2 After some minutes the build process stops, i.e. in top I see a 0.2% consuming ghc and no more output, the last one is: ../../ghc/compiler/ghc-inplace -optc-O -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wbad-function-cast -optc-I../includes -optc-I. -optc-Iparallel -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-Wno-uninitialized -H16m -O -O2 -static -I. -#include Prelude.h -#include Rts.h -#include RtsFlags.h -#include RtsUtils.h -#include StgRun.h -#include Schedule.h -#include Printer.h -#include Sanity.h -#include STM.h -#include Storage.h -#include SchedAPI.h -#include Timer.h -#include Itimer.h -#include ProfHeap.h -#include LdvProfile.h -#include Profiling.h -#include Apply.h -fvia-C -dcmm-lint -c GC.c -o GC.o If I go into ghc/rts and manually execute the last command, it terminates sometimes. I.e. if I execute it manually 20 times, 1 time it hangs and 19 times it terminates ... Is this a known problem? While building at the target I noticed some minor things: - ctime_r from time.h at solaris without posix define is not posix conform; configure could check this (dumb patch attached) - a whitespace problem in mk/target.mk (simple patch attached) (I got: /bin/sh: syntax error at line 1: `;' unexpected) - I get a link error because of the missing symbol yield_sched (see dumb patch) - I missed a --disable-readline switch While building the unregistered version: - /usr/sfw/bin/gcc -o stage1/ghc-6.4.2 -fno-defer-pop -fomit-frame-pointer -DNO_REGS -DUSE_MINIINTERPRETER -DDONT_WANT_WIN32_DLL_SUPPORT -D_ ... ld: fatal: library -lghccompat: not found => SUBDIRS = includes rts docs compiler lib utils driver switched docs and lib - make: *** No rule to make target `Compat/Directory.o', needed by `libghccompat.a'. Stop. => at the host at H/ghc/lib/compat instead make boot UseStage1=YES execute make boot UseStage1=YES EXTRA_HC_OPTS='-O -fvia-C -keep-hc-files' and get the .hc files, too - I missed a --disable-opengl switch While trying to build a registered version: - configure does not check im 'as' is a GNU as - e.g. the solaris as rejects some asm source, gas accepts (i.e. Illegal subtraction - symbols from different sections); configure could check this and provide a --with-as switch Regards Georg Sauthoff