porting using unregisterised build: x86->amd64 solaris

Karel Gardas karel.gardas at centrum.cz
Sat Oct 2 15:14:15 EDT 2010


Hello,

this email below is originally from September 22 so are also the source
code which I comment in it.
Originally this email was rejected being sent from unsubscribed email
address and I noted this just today so I resent it again especially when
seeing the email `Attempt at building on OpenBSD/sparc64 - failure at
"make	all_ghc_stage2"' by Benjamin Jansen who seems to get into the same
troubles as me.

Thanks,
Karel

On 10/02/10 20:25, Karel Gardas wrote:
> 
> Hello,
> 
> I'm attempting to make unregisterised build of recent GHC head on
> Solaris/x86 for Solaris/amd64 platform. I'm closely following:
> 
> http://hackage.haskell.org/trac/ghc/wiki/Building/Porting#Cross-compilingtoproduceanunregisterisedGHC
> 
> with the only one issue:
> mentioned: echo compiler/main/Config.hs >> list
> 
> seems to be incorrect due to missing compiler/main/Config.hs file which
> means gtar will fail on it later.
> 
> However I've got to the: <T>$ make all_ghc_stage2      2>&1 | tee c.log
> step which fails with:
> 
> gmake -r --no-print-directory -f ghc.mk phase=0 just-makefiles
> "" configure --with-ghc="/export/home/karel/vcs/ghc-target/"
> --with-ghc-pkg="/export/home/karel/vcs/ghc-target/"
> --with-gcc="/usr/bin/gcc" --configure-option=--with-cc="/usr/bin/gcc"
> --ghc-option=-DOMIT_NATIVE_CODEGEN --ghc-option=-DNO_REGS --flags=stage2
> --ghc-option=-DSTAGE=2 --disable-library-for-ghci
> --with-hscolour="/usr/local/bin/HsColour" --configure-option=CFLAGS="-g
> -O0 -DNO_REGS -DUSE_MINIINTERPRETER -D__GLASGOW_HASKELL__=613 -Iincludes
>   " --configure-option=LDFLAGS="  " -- stage2 compiler
> /bin/sh: line 1: : cannot execute [Is a directory]
> gmake[1]: *** [compiler/stage2/package-data.mk] Error 126
> gmake: *** [all_ghc_stage2] Error 2
> 
> 
> To me it looks like it's perhaps expecting to have `ghc' binary in
> /export/home/karel/vcs/ghc-target/ but there is only `ghc' subdirectory
> there hence failing.
> 
> Also I'm not sure I've detected correctly mentioned "unimportant build
> failures in the RTS" as I've got one which looks like:
> 
> gmake -r --no-print-directory -f ghc.mk all
> "inplace/bin/ghc-stage1" -optc-Wall -optc-Wextra
> -optc-Wstrict-prototypes -optc-Wmissing-prototypes
> -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return
> -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs
> -optc-Wredundant-decls -optc-Iincludes -optc-Irts -optc-DCOMPILING_RTS
> -optc-DNOSMP -optc-fno-strict-aliasing -optc-fno-common
> -optc-Ilibffi/build/include -optc-fomit-frame-pointer
> -optc-DRtsWay=\"rts_v\"   -H32m -O -H32m -Iincludes -Irts
> -DCOMPILING_RTS -package-name rts -optc-DNOSMP  -dcmm-lint
> -Ilibffi/build/include     -i -irts -irts/dist/build
> -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen
>     -keep-hc-files   -c rts/Linker.c -o rts/dist/build/Linker.o
> rts/Linker.c: In function `do_Elf_Rel_relocations':
> 
> rts/Linker.c:3784:0:
>      warning: cast from pointer to integer of different size
> 
> rts/Linker.c:3785:0:
>      warning: cast to pointer from integer of different size
> 
> rts/Linker.c:3807:0:
>      warning: cast from pointer to integer of different size
> 
> rts/Linker.c:3815:0:
>      warning: cast from pointer to integer of different size
> 
> rts/Linker.c:3819:0:
>      warning: cast from pointer to integer of different size
> rts/Linker.c: In function `do_Elf_Rela_relocations':
> 
> rts/Linker.c:3866:0:
>      warning: cast from pointer to integer of different size
> 
> rts/Linker.c:3903:0:
>      warning: cast from pointer to integer of different size
> 
> rts/Linker.c:3915:0:
>      warning: cast from pointer to integer of different size
> 
> rts/Linker.c:4028:0:
>      error: `R_X86_64_64' undeclared (first use in this function)
> 
> rts/Linker.c:4028:0:
>      error: (Each undeclared identifier is reported only once
> 
> rts/Linker.c:4028:0:  error: for each function it appears in.)
> 
> rts/Linker.c:4029:0:
>      warning: cast to pointer from integer of different size
> 
> rts/Linker.c:4032:0:
>      error: `R_X86_64_PC32' undeclared (first use in this function)
> 
> rts/Linker.c:4038:0:
>      warning: comparison between signed and unsigned
> 
> rts/Linker.c:4048:0:
>      warning: cast to pointer from integer of different size
> 
> rts/Linker.c:4056:0:
>      warning: cast to pointer from integer of different size
> 
> rts/Linker.c:4060:0:
>      error: `R_X86_64_32' undeclared (first use in this function)
> 
> rts/Linker.c:4074:0:
>      warning: cast to pointer from integer of different size
> 
> rts/Linker.c:4078:0:
>      error: `R_X86_64_32S' undeclared (first use in this function)
> 
> rts/Linker.c:4082:0:
>      warning: comparison between signed and unsigned
> 
> rts/Linker.c:4092:0:
>      warning: cast to pointer from integer of different size
> 
> rts/Linker.c:4096:0:
>      error: `R_X86_64_GOTPCREL' undeclared (first use in this function)
> 
> rts/Linker.c:4100:0:
>      warning: cast to pointer from integer of different size
> 
> rts/Linker.c:4104:0:
>      error: `R_X86_64_PLT32' undeclared (first use in this function)
> 
> rts/Linker.c:4110:0:
>      warning: comparison between signed and unsigned
> 
> rts/Linker.c:4115:0:
>      warning: cast to pointer from integer of different size
> gmake[1]: *** [rts/dist/build/Linker.o] Error 1
> gmake: *** [all] Error 2
> karel at silence:~/vcs/ghc-host$
> 
> 
> I do have two questions:
> 
> 1) is the url above describing cross-compiling GHC for porting up-to-date?
> 2) is there any trick how to get my last step (i.e. <T>$ make
> all_ghc_stage2      2>&1 | tee c.log) working?
> 
> Thanks!
> Karel
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
> 
> 



More information about the Glasgow-haskell-users mailing list