Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182459 - <dev-lang/ghc-6.8 does not work with gcc-4.2.0
Summary: <dev-lang/ghc-6.8 does not work with gcc-4.2.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
: 186902 (view as bug list)
Depends on:
Blocks: gcc-4.2
  Show dependency tree
 
Reported: 2007-06-18 14:09 UTC by SpanKY
Modified: 2007-12-13 16:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-util:darcs-1.0.9:20070618-135130.log (dev-util:darcs-1.0.9:20070618-135130.log,85.59 KB, text/plain)
2007-06-18 14:10 UTC, SpanKY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2007-06-18 14:09:15 UTC
...
Linking darcs ...
darcs.o: In function `s4IX_1_alt':
ghc14150.hc:(.text+0x1166): undefined reference to `ThisVersion_darcszuversion_closure'
ghc14150.hc:(.text+0x116a): undefined reference to `ThisVersion_darcszuversion_closure'
darcs.o: In function `s4J4_1_alt':
ghc14150.hc:(.text+0x126a): undefined reference to `ThisVersion_darcszuversion_closure'
ghc14150.hc:(.text+0x126e): undefined reference to `ThisVersion_darcszuversion_closure'
...

Portage 2.1.3_rc4 (default-linux/ppc/ppc32/2006.1, gcc-4.2.0, glibc-2.6-r0, 2.6.20.4 ppc)
=================================================================
System uname: 2.6.20.4 ppc PPC970MP, altivec supported
Gentoo Base System release 1.12.10
Timestamp of tree: Mon, 18 Jun 2007 07:29:01 +0000
distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.15.90.0.3-r5, 2.16.1-r2, 2.16.91.0.3, 2.16.91.0.4, 2.16.91.0.5, 2.16.91.0.6, 2.16.91.0.7, 2.16.92, 2.16.93, 2.16.94, 2.17, 2.17.50.0.2, 2.17.50.0.3, 2.17.50.0.4, 2.17.50.0.5, 2.17.50.0.6, 2.17.50.0.7, 2.17.50.0.8, 2.17.50.0.9, 2.17.50.0.10, 2.17.50.0.11, 2.17.50.0.12, 2.17.50.0.13, 2.17.50.0.14, 2.17.50.0.15, 2.17.50.0.16
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-Wall -O2 -mcpu=970 -pipe"
CHOST="powerpc-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"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-Wall -O2 -mcpu=970 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks metadata-transfer noinfo parallel-fetch sandbox sfperms splitdebug unmerge-orphans"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,-z,relro"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages/powerpc-unknown-linux-gnu"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/manifest1_obsolete"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/enlightenment /usr/portage/local/layman/nouveau"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl alsa altivec amr apache2 arts asf audiofile berkdb bitmap-fonts bonobo boundschecking bzip2 cairo cddb cdparanoia cdr cli cracklib crypt css cups curl directfb divx dri dts dvd dvdr dvdread emboss encode fame ffmpeg firefox flac fontconfig fortran gd gif glitz gpm gstreamer gtk gtkhtml iconv ieee1394 imagemagick ipv6 isdnlog jbig jpeg jpeg2k kde ldap libcaca libg++ libwww lzo mad matroska midi mikmod mjpeg mng modplug mozilla mp3 mp4 mpeg mudflap multislot musepack ncurses nls nptl nptlonly ogg openal opengl openmp pcre pdf perl php png ppc pppd python qt3 qt4 quicktime readline reflection rle samba sdl session sndfile spell spl ssl subversion svg tcl tcltk tcpd tga theora threads tiff tk truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vorbis wmp wxwindows x264 xanim xinerama xinetd xml xorg xosd xpm xprint xrandr xv xvid yv12 zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard joystick void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv nouveau ati r128 radeon sisusb"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 SpanKY gentoo-dev 2007-06-18 14:10:10 UTC
Created attachment 122412 [details]
dev-util:darcs-1.0.9:20070618-135130.log
Comment 2 Duncan Coutts (RETIRED) gentoo-dev 2007-07-10 15:09:10 UTC
What ghc version is this?
Comment 3 SpanKY gentoo-dev 2007-07-10 18:43:39 UTC
dev-lang/ghc-bin-6.4.2
Comment 4 Duncan Coutts (RETIRED) gentoo-dev 2007-07-11 16:40:20 UTC
I suspect it is this upstream bug:
http://hackage.haskell.org/trac/ghc/ticket/1427

basically ghc doesn't like gcc-4.2.x yet. The workaround is to use gcc-4.1 or earlier. This will likely get fixed in ghc-6.8.
Comment 5 Duncan Coutts (RETIRED) gentoo-dev 2007-07-28 19:33:12 UTC
This is now a very commonly reported bug.

We've applied a workaround which is to disable using the ghc "split-objs" feature when using gcc-4.2. This has the downside that executables produced by ghc will be considerably larger than when the libraries are built with split-objs.
Comment 6 Duncan Coutts (RETIRED) gentoo-dev 2007-07-28 19:35:24 UTC
*** Bug 186902 has been marked as a duplicate of this bug. ***
Comment 7 alexandre 2007-07-29 11:26:20 UTC
(In reply to comment #5)
> We've applied a workaround which is to disable using the ghc "split-objs"
> feature when using gcc-4.2.

It worked for me. The ebuild version is still ghc-6.6.1 but it has the fix and i have been able to compile dev-lang/ghc  (that is emerge with '-binary'). 

> This has the downside that executables produced by
> ghc will be considerably larger than when the libraries are built with
> split-objs.
As a side note, the emerge of previous ghc-6.4.2 took 1h36' while this ghc-6.6.1 took 2h27' on my PC.

Thank you for the fix ! 
Comment 8 Ilya Eremin 2007-09-16 19:45:17 UTC
Upstream fix comminted, solution is to add -fno-toplevel-reorder when compiled with gcc-4.2.0
Comment 9 Duncan Coutts (RETIRED) gentoo-dev 2007-12-13 16:26:26 UTC
Closing as the workaround seems to be sufficient. It solves it for ghc-6.6.1 which is the current stable version. ghc-6.4.2 and earlier will still have the problem but we do not intend to fix the earlier versions, the workaround there is to use an older gcc.

If anyone finds this is still a problem please reopen the bug.