First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 145466
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Haskell Language team <haskell@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Markus Rothe <corsair@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ghc-6.4.2-output.txt ghc-6.4.2-output.txt text/plain Markus Rothe 2006-08-29 05:12 0000 37.68 KB Details
helloworld-gcc-3.4.s helloworld-gcc-3.4.s text/plain Markus Rothe 2006-10-17 03:04 0000 8.98 KB Details
helloworld-gcc-4.1.s helloworld-gcc-4.1.s text/plain Markus Rothe 2006-10-17 03:05 0000 9.63 KB Details
diff-3.4_4.1.diff diff-3.4_4.1.diff text/plain Markus Rothe 2006-10-17 03:05 0000 16.35 KB Details
helloworld-gcc-4.1.s helloworld-gcc-4.1.s text/plain Markus Rothe 2006-10-18 09:05 0000 10.48 KB Details
out_from_ghc-asm_4.1.s out_from_ghc-asm_4.1.s text/plain Markus Rothe 2006-10-18 09:06 0000 10.94 KB Details
ghc-6.4.2.diff Fix regression to old PPC64 tarball patch Andrew John Hughes 2008-10-09 07:59 0000 617 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 145466 depends on: Show dependency tree
Show dependency graph
Bug 145466 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-08-29 05:11 0000
Hello,

I just tried to compile ghc-6.4.2 using gcc-4.1.1, but it failed. it does
compile if I use gcc-3.4.6-r2 (current stable one).

please see (not so short) error log I'll attach to this bug.


# emerge --info
Portage 2.1-r2 (default-linux/ppc/ppc64/2006.1/64bit-userland/power5,
gcc-4.1.1, glibc-2.4-r3, 2.6.16.9 ppc64)
=================================================================
System uname: 2.6.16.9 ppc64 POWER5 (gr)
Gentoo Base System version 1.12.4
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="ppc64"
AUTOCLEAN="yes"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mtune=power5 -mcpu=power5"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -mtune=power5 -mcpu=power5"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ppc64 X alsa altivec apache2 apm arts berkdb bitmap-fonts cli cups
dlloader dri eds emboss encode esd foomaticdb fortran gcj gdbm gif gnome gpm
gstreamer gtk ibm imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod motif
mp3 mpeg ncurses nls nptl nptlonly objc ogg opengl oss pam pcre pdflib perl png
pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl
tcpd truetype truetype-fonts type1-fonts udev unicode vorbis xml xmms xorg xv
zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev
kernel_linux userland_GNU video_cards_ati video_cards_dummy video_cards_fbdev
video_cards_mga video_cards_nv video_cards_sisusb video_cards_v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

------- Comment #1 From Markus Rothe 2006-08-29 05:12:19 0000 -------
Created an attachment (id=95362) [edit]
ghc-6.4.2-output.txt

------- Comment #2 From Duncan Coutts (RETIRED) 2006-10-03 16:52:48 0000 -------
Sigh. The mangler needs updating for gcc-4.1.1. 

------- Comment #3 From Duncan Coutts (RETIRED) 2006-10-16 17:57:48 0000 -------
We have two options. One is to do an unregisterised build. This gives us about
a 50% speed hit, but it should work. The other is to fix the mangler. For the
latter we'll need someone who knows ppc64 assembly and perl. Any volunteers?

------- Comment #4 From Markus Rothe 2006-10-16 22:14:16 0000 -------
mhh.. let's do an unregisterised build and report this issue upstream, as tgall
is the only one from ppc64 team who knows ppc64 assembler, but dunno about his
perl knowledge.

Please let me know if I should report this upstream or you, as you might have
better connections upstream ;-)

------- Comment #5 From Duncan Coutts (RETIRED) 2006-10-17 02:10:05 0000 -------
Aye, we'll take care of that then.

------- Comment #6 From Duncan Coutts (RETIRED) 2006-10-17 02:20:00 0000 -------
Could I ask someone to try this and tell me if it works with gcc-4.1.1?

http://haskell.org/~gentoo/gentoo-haskell/dev-lang/ghc/ghc-6.4.2.ebuild

I've made it turn off the regesterised build. If it does, I'll commit.

Note also that ghc-6.6 is out, though I don't have high hopes that it'll fare
any better:

http://haskell.org/~gentoo/gentoo-haskell/dev-lang/ghc/ghc-6.6.ebuild

------- Comment #7 From Markus Rothe 2006-10-17 03:04:50 0000 -------
Created an attachment (id=99866) [edit]
helloworld-gcc-3.4.s

------- Comment #8 From Markus Rothe 2006-10-17 03:05:07 0000 -------
Created an attachment (id=99867) [edit]
helloworld-gcc-4.1.s

------- Comment #9 From Markus Rothe 2006-10-17 03:05:24 0000 -------
Created an attachment (id=99868) [edit]
diff-3.4_4.1.diff

------- Comment #10 From Markus Rothe 2006-10-17 03:08:02 0000 -------
you told me this on IRC:

<dcoutts> corsair, so by running: /opt/ghc/lib/ghc-asm helloworld-gcc-x.y.s
out.s
<dcoutts> you get the .s file that will really get assembled
<dcoutts> so see if the mangler fails is one thing
<dcoutts> then assemble it with gcc and see if that complains
<dcoutts> and we can work back from there to find roughly what's wrong


and so I did (gcc 3.4 chroot):
(gcc34) power1 ~ # /opt/ghc/lib64/ghc-6.4.2/ghc-asm helloworld.s
out_from_ghc-asm_3.4.s
(gcc34) power1 ~ # diff helloworld.s out_from_ghc-asm_3.4.s
(gcc34) power1 ~ #

and gcc-4.1 chroot:

(gcc41) power1 ~ # /opt/ghc/lib64/ghc-6.4.2/ghc-asm helloworld.s
out_from_ghc-asm_4.1.s
Warning: retaining unknown function `.L.__stginit_ZCMain' in output from C
compiler
Warning: retaining unknown function `.L.__stginit_Main' in output from C
compiler
Warning: retaining unknown function `.L.__stginit_Main_' in output from C
compiler
Warning: retaining unknown function `.L.ZCMain_main_entry' in output from C
compiler
Warning: retaining unknown function `.L.Main_main_entry' in output from C
compiler
Warning: retaining unknown function `.L.s1vE_entry' in output from C compiler
Warning: retaining unknown function `.L.r1vz_entry' in output from C compiler
Warning: retaining unknown function `.L.r1vx_entry' in output from C compiler
(gcc41) power1 ~ # diff helloworld.s out_from_ghc-asm_4.1.s
(gcc41) power1 ~ #


Unfortunatly ghc-asm does not rewrite the assembler code as you can see.


P.S.: that unregisterised build is still going on.

------- Comment #11 From Markus Rothe 2006-10-17 03:22:50 0000 -------
the build failed almost the same way it did before:

[...]
Warning: retaining unknown function `.L.r8VW_entry' in output from C compiler
<<ghc: 1105260088 bytes, 3746 GCs, 20930641/38858040 avg/max bytes residency
(10 samples), 104M in use, 0.00 INIT (0.00 elapsed), 5.62 MUT (25.77 elapsed),
4.47 GC (4.35 elapsed) :ghc>>
/var/tmp/portage/ghc-6.4.2/temp/ghc.sh -o ghc-pkg.bin -H16m -O
-optc-mtune=power5 -opta-mtune=power5 -optc-mcpu=power5 -opta-mcpu=power5
-opta-Wa,--noexecstack -fno-warn-deprecations -cpp -Wall
-fno-warn-name-shadowing -fno-warn-unused-matches -i../../lib/compat
-ignore-package Cabal -Rghc-timing    -L../../lib/compat -lghccompat   Main.o
Version.o
Main.o:(.text+0x0): undefined reference to `__DISCARD__'
Main.o:(.text+0x28): undefined reference to `__DISCARD__'
Main.o:(.text+0x50): undefined reference to `__DISCARD__'
Main.o:(.text+0x160): undefined reference to `__DISCARD__'
Main.o:(.text+0x18c): undefined reference to `__DISCARD__'
Main.o:(.text+0x1b8): more undefined references to `__DISCARD__' follow
collect2: ld returned 1 exit status
<<ghc: 20899560 bytes, 3 GCs, 129792/129792 avg/max bytes residency (1
samples), 15M in use, 0.00 INIT (0.00 elapsed), 0.04 MUT (1.45 elapsed), 0.01
GC (0.02 elapsed) :ghc>>
make[4]: *** [ghc-pkg.bin] Error 1
make[3]: *** [boot] Error 2
make[2]: *** [boot] Error 1
make[1]: *** [boot] Error 1
make[1]: Leaving directory `/var/tmp/portage/ghc-6.4.2/work/ghc-6.4.2/ghc'
make: *** [build] Error 1


I had to build haddock with gcc-3.4 (build failed with a similar message if
compiled with gcc-4.1) and ghc-bin itself is also compiled with gcc-3.4. don't
know what do do know...

------- Comment #12 From Duncan Coutts (RETIRED) 2006-10-17 12:19:43 0000 -------
(In reply to comment #11)
> the build failed almost the same way it did before:

That's because the host ghc is still borked because you're still using
gcc-4.1.1.

ghc needs a version of ghc to build. So we need to do an unregisterised build
while using gcc-3.x and then try that build with gcc-4.x.

------- Comment #13 From Duncan Coutts (RETIRED) 2006-10-17 17:50:11 0000 -------
Oh amd also, because I messed up the change to the ebuild in our overlay. Sorry
about that, you'll have to grab it again: 

http://haskell.org/~gentoo/gentoo-haskell/dev-lang/ghc/ghc-6.4.2.ebuild

------- Comment #14 From Markus Rothe 2006-10-18 09:04:23 0000 -------
yes, that ebuild worked. ghc now compiled.

------- Comment #15 From Markus Rothe 2006-10-18 09:05:10 0000 -------
Created an attachment (id=99946) [edit]
helloworld-gcc-4.1.s

helloworld.hs now compiled with ghc build with gcc 4.1

------- Comment #16 From Markus Rothe 2006-10-18 09:06:58 0000 -------
Created an attachment (id=99947) [edit]
out_from_ghc-asm_4.1.s

I got this with these commands:

(gcc41) power1 ~ # ghc -S helloworld.hs
(gcc41) power1 ~ # /usr/lib64/ghc-6.4.2/ghc-asm helloworld.s
out_from_ghc-asm_4.1.s
Warning: retaining unknown function `.L.__stginit_Main_' in output from C
compiler
Warning: retaining unknown function `.L.__stginit_Main' in output from C
compiler
Warning: retaining unknown function `.L.__stginit_ZCMain' in output from C
compiler
Warning: retaining unknown function `.L.ZCMain_main_entry' in output from C
compiler
Warning: retaining unknown function `.L.Main_main_entry' in output from C
compiler
Warning: retaining unknown function `.L.s1vE_entry' in output from C compiler
Warning: retaining unknown function `.L.r1vz_entry' in output from C compiler
Warning: retaining unknown function `.L.r1vx_entry' in output from C compiler

------- Comment #17 From Markus Rothe 2006-12-01 13:00:30 0000 -------
gcc 4.1 is now stable on ppc64 and so ghc breaks. If I understand the situation
we need to do the following:

- add the ebuild to the ebuild to the tree which builds an unregistered build
on ppc64
- compile a new ghc-bin package (I don't recall which USE flags should be
used..)
- add a new revision of ghc-bin especialy for ppc64 to the tree

comments?

------- Comment #18 From Duncan Coutts (RETIRED) 2006-12-01 14:48:34 0000 -------
(In reply to comment #17)
> comments?

Yes. That sounds right.

------- Comment #19 From Markus Rothe 2006-12-04 11:20:01 0000 -------
which USE flags should I use for building the binary again?

------- Comment #20 From Duncan Coutts (RETIRED) 2006-12-05 03:23:22 0000 -------
(In reply to comment #19)
> which USE flags should I use for building the binary again?

Turn them all off.

There's a script projects/build-ghc-bin.sh in the Haskell overlay. But
basically it just turns off all use flags and uses some ordinary CFLAGS etc.

http://haskell.org/~gentoo/gentoo-haskell/projects/build-ghc-bin.sh

------- Comment #21 From Markus Rothe 2007-03-13 09:19:48 0000 -------
*** Bug 170595 has been marked as a duplicate of this bug. ***

------- Comment #22 From Markus Rothe 2007-03-29 15:01:48 0000 -------
Fixed it. I've added ghc-bin-6.4.2-r1 which includes an unregisterised tarball
and also made the ghc ebuilds build unregisterised builds on ppc64.

------- Comment #23 From Jakub Moc (RETIRED) 2008-02-07 15:33:01 0000 -------
*** Bug 209260 has been marked as a duplicate of this bug. ***

------- Comment #24 From Andrew John Hughes 2008-10-07 11:47:47 0000 -------
The ebuild has regressed to this state again with the move from ghc and ghc-bin
to ghc with USE="binary".  The -r1 tarball is not being downloaded for ppc64.

------- Comment #25 From Andrew John Hughes 2008-10-09 07:59:54 0000 -------
Created an attachment (id=167702) [edit]
Fix regression to old PPC64 tarball

First Last Prev Next    No search results available      Search page      Enter new bug