runghc failing sometimes on Linux/ppc?

I am seeing some strange failures of runghc on Linux/ppc (Fedora 11 specifically) with ghc-6.10.1 and ghc-6.10.2. For example "cabal install HTTP" works fine but "runghc Setup" failing to run. A workaround (other than using cabal-install) seems to be to compile Setup and then use the output of that to build the package. More strangely this only happens sometimes in the buildsystem, which makes me wonder if it is a fedora issue: most packages built ok in the fedora buildsystem except HTTP and haddock so far. http://koji.fedoraproject.org/koji/getfile?taskID=1319083&name=build.log http://koji.fedoraproject.org/koji/getfile?taskID=1320158&name=build.log On the other hand in a ppc box I tested on runghc seemed to fail consistently. ghci also segfaulted there. Anyway I thought I would ask here if anyone else had experienced something like this. Jens

On Sat, Apr 25, 2009 at 08:17:39PM +1000, Jens Petersen wrote:
I am seeing some strange failures of runghc on Linux/ppc (Fedora 11 specifically) with ghc-6.10.1 and ghc-6.10.2.
For example "cabal install HTTP" works fine but "runghc Setup" failing to run.
Are you using a registerised build? If so, then as PPC/Linux isn't a tier 1 platform, it could well have bitrotted.
http://koji.fedoraproject.org/koji/getfile?taskID=1319083&name=build.log http://koji.fedoraproject.org/koji/getfile?taskID=1320158&name=build.log
These don't seem to contain the output. Thanks Ian

2009/4/26 Ian Lynagh
Are you using a registerised build? If so, then as PPC/Linux isn't a tier 1 platform, it could well have bitrotted.
So Fedora should build ppc unregistered? Is that what other distros are doing? :)
http://koji.fedoraproject.org/koji/getfile?taskID=1319083&name=build.log : These don't seem to contain the output.
There is no output. :) jens

2009/5/1 Jens Petersen
2009/4/26 Ian Lynagh
: Are you using a registerised build? If so, then as PPC/Linux isn't a tier 1 platform, it could well have bitrotted.
So I tried doing an unregisterised ppc build with: echo "GhcUnregisterised=YES" >> mk/build.mk echo "GhcWithNativeCodeGen=NO" >> mk/build.mk echo "SplitObjs=NO" >> mk/build.mk but this failed with: make -C ../ghc stage=2 make[3]: Entering directory `/builddir/build/BUILD/ghc-6.10.2/ghc' /builddir/build/BUILD/ghc-6.10.2/libraries/cabal-bin /usr/bin/ghc /builddir/build/BUILD/ghc-6.10.2/libraries/bootstrapping.conf 1.6.0.3 configure --distpref dist-stage2 \ --prefix=/NONEXISTENT --bindir=/NONEXISTENT --libdir=/NONEXISTENT --libexecdir=/NONEXISTENT --datadir=/NONEXISTENT --docdir=/NONEXISTENT --haddockdir=/NONEXISTENT --htmldir=/NONEXISTENT \ --flags=ghci --with-compiler=/builddir/build/BUILD/ghc-6.10.2/ghc/stage1-inplace/ghc --with-hc-pkg=/builddir/build/BUILD/ghc-6.10.2/utils/ghc-pkg/install-inplace/bin/ghc-pkg --ghc-option=-O2 \ --libsubdir='$pkgid' --with-gcc=gcc --with-ld=/usr/bin/ld --with-happy="/usr/bin/happy" --configure-option='--prefix=/usr' --configure-option='--exec-prefix=/usr' --configure-option='--bindir=/usr/bin' --configure-option='--sbindir=/usr/sbin' --configure-option='--sysconfdir=/etc' --configure-option='--datadir=/usr/share' --configure-option='--includedir=/usr/include' --configure-option='--libdir=/usr/lib' --configure-option='--libexecdir=/usr/libexec' --configure-option='--localstatedir=/var' --configure-option='--sharedstatedir=/var/lib' --configure-option='--mandir=/usr/share/man' --configure-option=--with-cc="gcc" --with-hsc2hs=/builddir/build/BUILD/ghc-6.10.2/utils/hsc2hs/install-inplace/bin/hsc2hs \ --libsubdir=. \ --datadir='$libdir' \ --datasubdir=. Configuring ghc-bin-6.10.2... /builddir/build/BUILD/ghc-6.10.2/libraries/cabal-bin /usr/bin/ghc /builddir/build/BUILD/ghc-6.10.2/libraries/bootstrapping.conf 1.6.0.3 build --distpref dist-stage2 --ghc-option=-H32m --ghc-option=-O --ghc-option=-H32m --ghc-option=-O Preprocessing executables for ghc-bin-6.10.2... Building ghc-bin-6.10.2... [1 of 1] Compiling Main ( Main.hs, dist-stage2/build/ghc/ghc-tmp/Main.o ) Linking dist-stage2/build/ghc/ghc ... /usr/lib/gcc/ppc64-redhat-linux/4.4.0/../../../../lib/crt1.o: In function `_start': (.text+0x20): relocation truncated to fit: R_PPC_REL24 against symbol `__libc_start_main@@GLIBC_2.0' defined in .glink section in /usr/lib/gcc/ppc64-redhat-linux/4.4.0/../../../../lib/crt1.o /usr/lib/gcc/ppc64-redhat-linux/4.4.0/crtbegin.o:(.fini+0x0): relocation truncated to fit: R_PPC_REL24 against `.text' /usr/lib/gcc/ppc64-redhat-linux/4.4.0/crtend.o:(.init+0x0): relocation truncated to fit: R_PPC_REL24 against `.text' /usr/lib/libc_nonshared.a(elf-init.oS): In function `__libc_csu_init': (.text+0x54): relocation truncated to fit: R_PPC_PLTREL24 against symbol `_init' defined in .init section in /usr/lib/gcc/ppc64-redhat-linux/4.4.0/../../../../lib/crti.o+8000 collect2: ld returned 1 exit status make[3]: *** [build.stage.2] Error 1 make[3]: Leaving directory `/builddir/build/BUILD/ghc-6.10.2/ghc' make[2]: Leaving directory `/builddir/build/BUILD/ghc-6.10.2/compiler' make[2]: *** [build.stage.2] Error 2 make[1]: *** [stage2] Error 2 make[1]: Leaving directory `/builddir/build/BUILD/ghc-6.10.2' make: *** [bootstrap2] Error 2 see http://koji.fedoraproject.org/koji/getfile?taskID=1332447&name=build.log for the full buildlog.

2009/5/2 Jens Petersen
So I tried doing an unregisterised ppc build with:
echo "GhcUnregisterised=YES" >> mk/build.mk echo "GhcWithNativeCodeGen=NO" >> mk/build.mk echo "SplitObjs=NO" >> mk/build.mk
Are these the right build config settings?
but this failed with: : Linking dist-stage2/build/ghc/ghc ... : (.text+0x20): relocation truncated to fit: R_PPC_REL24 against symbol `__libc_start_main@@GLIBC_2.0' defined in .glink section in /usr/lib/gcc/ppc64-redhat-linux/4.4.0/../../../../lib/crt1.o /usr/lib/gcc/ppc64-redhat-linux/4.4.0/crtbegin.o:(.fini+0x0): relocation truncated to fit: R_PPC_REL24 against `.text'
I thought maybe it was a gcc44 issue, but similar with gcc43: Building ghc-bin-6.10.2... [1 of 1] Compiling Main ( Main.hs, dist-stage2/build/ghc/ghc-tmp/Main.o ) Linking dist-stage2/build/ghc/ghc ... /usr/lib/gcc/ppc64-redhat-linux/4.3.2/../../../../lib/crt1.o: In function `_start': (.text+0x20): relocation truncated to fit: R_PPC_REL24 against symbol `__libc_start_main@@GLIBC_2.0' defined in .glink section in /usr/lib/gcc/ppc64-redhat-linux/4.3.2/../../../../lib/crt1.o /usr/lib/gcc/ppc64-redhat-linux/4.3.2/crtbegin.o:(.fini+0x0): relocation truncated to fit: R_PPC_REL24 against `.text' /usr/lib/gcc/ppc64-redhat-linux/4.3.2/crtend.o:(.init+0x0): relocation truncated to fit: R_PPC_REL24 against `.text' dist-stage2/build/ghc/ghc-tmp/Main.o: In function `r6Xf_entry': ghc5050_0.hc:(.text+0x448): relocation truncated to fit: R_PPC_REL24 against symbol `newCAF' defined in .text section in /builddir/build/BUILD/ghc-6.10.2/rts/libHSrts.a(Storage.o) dist-stage2/build/ghc/ghc-tmp/Main.o: In function `r6Xj_entry': ghc5050_0.hc:(.text+0x5ac): relocation truncated to fit: R_PPC_REL24 against symbol `newCAF' defined in .text section in /builddir/build/BUILD/ghc-6.10.2/rts/libHSrts.a(Storage.o) dist-stage2/build/ghc/ghc-tmp/Main.o: In function `r6Xn_entry': ghc5050_0.hc:(.text+0x6dc): relocation truncated to fit: R_PPC_REL24 against symbol `newCAF' defined in .text section in /builddir/build/BUILD/ghc-6.10.2/rts/libHSrts.a(Storage.o) dist-stage2/build/ghc/ghc-tmp/Main.o: In function `r6Xp_entry': ghc5050_0.hc:(.text+0x7c4): relocation truncated to fit: R_PPC_REL24 against symbol `newCAF' defined in .text section in /builddir/build/BUILD/ghc-6.10.2/rts/libHSrts.a(Storage.o) dist-stage2/build/ghc/ghc-tmp/Main.o: In function `r6Xr_entry': ghc5050_0.hc:(.text+0x8ac): relocation truncated to fit: R_PPC_REL24 against symbol `newCAF' defined in .text section in /builddir/build/BUILD/ghc-6.10.2/rts/libHSrts.a(Storage.o) dist-stage2/build/ghc/ghc-tmp/Main.o: In function `r6Xv_entry': ghc5050_0.hc:(.text+0xbe8): relocation truncated to fit: R_PPC_REL24 against symbol `newCAF' defined in .text section in /builddir/build/BUILD/ghc-6.10.2/rts/libHSrts.a(Storage.o) dist-stage2/build/ghc/ghc-tmp/Main.o: In function `Main_a13_entry': ghc5050_0.hc:(.text+0xcd0): relocation truncated to fit: R_PPC_REL24 against symbol `newCAF' defined in .text section in /builddir/build/BUILD/ghc-6.10.2/rts/libHSrts.a(Storage.o) dist-stage2/build/ghc/ghc-tmp/Main.o: In function `Main_a14_entry': ghc5050_0.hc:(.text+0xdb8): additional relocation overflows omitted from the output collect2: ld returned 1 exit status http://koji.fedoraproject.org/koji/taskinfo?taskID=1333608 Any thoughts? Jens

On Sun, May 03, 2009 at 03:02:50PM +1000, Jens Petersen wrote:
2009/5/2 Jens Petersen
: So I tried doing an unregisterised ppc build with:
echo "GhcUnregisterised=YES" >> mk/build.mk echo "GhcWithNativeCodeGen=NO" >> mk/build.mk echo "SplitObjs=NO" >> mk/build.mk
Are these the right build config settings?
Yes.
but this failed with: : Linking dist-stage2/build/ghc/ghc ... : (.text+0x20): relocation truncated to fit: R_PPC_REL24 against symbol `__libc_start_main@@GLIBC_2.0' defined in .glink section in /usr/lib/gcc/ppc64-redhat-linux/4.4.0/../../../../lib/crt1.o /usr/lib/gcc/ppc64-redhat-linux/4.4.0/crtbegin.o:(.fini+0x0): relocation truncated to fit: R_PPC_REL24 against `.text'
Does using -mlongcall help? e.g.: SRC_CC_OPTS += -mlongcall SRC_HC_OPTS += -optc-mlongcall (you can probably get away with something rather more specific, but hopefully this will work). Thanks Ian
participants (2)
-
Ian Lynagh
-
Jens Petersen