ghc-6.6.1 doesn't compile, it exits with an error and without giving so much to track down the problem. At least for me, which I am not familiar with ghc at all. Reproducible: Always Steps to Reproduce: 1.emerge ghc 2.go make some tea 3.see the error Actual Results: ghc doesn't compile, it halts with a "lexical error". Expected Results: ghc should compile. The emerge output: ../compiler/ghc-inplace -H16m -O -optc-march=athlon64 -opta-march=athlon64 -opta-Wa,--noexecstack -fno-warn-deprecations -optc-O2 -static -I. -#include HCIncludes.h -fvia-C -dcmm-lint -c Apply.cmm -o Apply.o ../compiler/ghc-inplace -H16m -O -optc-march=athlon64 -opta-march=athlon64 -opta-Wa,--noexecstack -fno-warn-deprecations -optc-O2 -static -I. -#include HCIncludes.h -fvia-C -dcmm-lint -c Exception.cmm -o Exception.o <interno>:0:1: lexical error make[1]: *** [Apply.o] Error 1 make[1]: *** Se espera a que terminen otras tareas.... <interno>:0:1: lexical error make[1]: *** [Exception.o] Error 1 make: *** [stage1] Error 1 * * ERROR: dev-lang/ghc-6.6.1 failed. * Call stack: * ebuild.sh, line 46: Called src_compile * environment, line 3160: Called die * The specific snippet of code: * emake all datadir="/usr/share/doc/${P}" || diefunc "$FUNCNAME" "$LINENO" "$?" "make failed"; * The die message: * make failed # emerge --info Portage 2.1.4_rc9 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.7-r1, 2.6.23.9 x86_64) ================================================================= System uname: 2.6.23.9 x86_64 AMD Sempron(tm) Processor 3000+ Timestamp of tree: Thu, 13 Dec 2007 23:30:01 +0000 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] app-shells/bash: 3.2_p17-r1 dev-lang/python: 2.5.1-r4 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23-r2 ACCEPT_KEYWORDS="amd64 x86 ~amd64 ~x86" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=athlon64 -pipe -msse3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -march=athlon64 -pipe -msse3" DISTDIR="/var/portage/distfiles" FEATURES="distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="es_ES.utf8" LC_ALL="es_ES.utf8" LINGUAS="es en" MAKEOPTS="-j2" PKGDIR="/var/portage/packages" PORTAGE_RSYNC_EXTRA_OPTS="--bwlimit=50" 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="/var/portage" PORTDIR_OVERLAY="/var/portage/local/layman/live-ebuilds /var/portage/local" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi alsa amd64 arts berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde kerberos ldap mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es en" USERLAND="GNU" VIDEO_CARDS="nvidia vesa nv nouveau" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Try LC_ALL=C emerge ghc :)
(In reply to comment #1) > Try LC_ALL=C emerge ghc :) > After googling and looking at various forums for around 3 hours I found a similar advise. Recompiling right now, by 5th or 6th time, I can't remember :P In a couple of hours I will know if it worked or not. Thanks for the response. I'll report whatever back :)
(In reply to comment #2) > (In reply to comment #1) > > Try LC_ALL=C emerge ghc :) > > > > After googling and looking at various forums for around 3 hours I found a > similar advise. Recompiling right now, by 5th or 6th time, I can't remember :P > > In a couple of hours I will know if it worked or not. > > Thanks for the response. I'll report whatever back :) > It works. Thanks again.
> > > Try LC_ALL=C emerge ghc :) ... > It works. Thanks again. What locale did you use to achieve reported breakage?
(In reply to comment #4) > > > > Try LC_ALL=C emerge ghc :) > ... > > It works. Thanks again. > > What locale did you use to achieve reported breakage? > It's been quite some time since that post, I don't even use ghc any longer. However I haven't changed the locale settings, for what I can remember. So I guess that they were the same that I have right now: LANG=es_ES.utf8 LC_CTYPE="es_ES.utf8" LC_NUMERIC="es_ES.utf8" LC_TIME="es_ES.utf8" LC_COLLATE="es_ES.utf8" LC_MONETARY="es_ES.utf8" LC_MESSAGES="es_ES.utf8" LC_PAPER="es_ES.utf8" LC_NAME="es_ES.utf8" LC_ADDRESS="es_ES.utf8" LC_TELEPHONE="es_ES.utf8" LC_MEASUREMENT="es_ES.utf8" LC_IDENTIFICATION="es_ES.utf8" LC_ALL=es_ES.utf8
Same issue (lexical error) with 6.8.2-r1 version. Also # LC_ALL=C emerge ghc installs ok the package. My locales: LANG=es_ES.UTF-8 LC_CTYPE="es_ES.UTF-8" LC_NUMERIC="es_ES.UTF-8" LC_TIME="es_ES.UTF-8" LC_COLLATE="es_ES.UTF-8" LC_MONETARY="es_ES.UTF-8" LC_MESSAGES="es_ES.UTF-8" LC_PAPER="es_ES.UTF-8" LC_NAME="es_ES.UTF-8" LC_ADDRESS="es_ES.UTF-8" LC_TELEPHONE="es_ES.UTF-8" LC_MEASUREMENT="es_ES.UTF-8" LC_IDENTIFICATION="es_ES.UTF-8" LC_ALL=es_ES.UTF-8 The error: -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -H16m -O -optc-march=core2 -opta-march=core2 -opta-Wa,--noexecstack -w -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c sm/GCUtils.c -o sm/GCUtils.o ../compiler/ghc-inplace -optc-O -optc-march=core2 -optc-O2 -optc-pipe -optc-Wa,--noexecstack -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -H16m -O -optc-march=core2 -opta-march=core2 -opta-Wa,--noexecstack -w -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c sm/MBlock.c -o sm/MBlock.o ../compiler/ghc-inplace -optc-O -optc-march=core2 -optc-O2 -optc-pipe -optc-Wa,--noexecstack -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -H16m -O -optc-march=core2 -opta-march=core2 -opta-Wa,--noexecstack -w -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c sm/MarkWeak.c -o sm/MarkWeak.o sm/Evac.c: En la función ‘evacuate’: sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:452:0: aviso: llamado desde aquí sm/Evac.c:97:0: aviso: falló la inclusión en línea en la llamada a ‘copy_noscav_tag’: call is unlikely and code size would grow sm/Evac.c:471:0: aviso: llamado desde aquí sm/Evac.c:43:0: aviso: falló la inclusión en línea en la llamada a ‘copy_tag’: call is unlikely and code size would grow sm/Evac.c:477:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:481:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:493:0: aviso: llamado desde aquí sm/Evac.c:43:0: aviso: falló la inclusión en línea en la llamada a ‘copy_tag’: call is unlikely and code size would grow sm/Evac.c:500:0: aviso: llamado desde aquí sm/Evac.c:97:0: aviso: falló la inclusión en línea en la llamada a ‘copy_noscav_tag’: call is unlikely and code size would grow sm/Evac.c:503:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:506:0: aviso: llamado desde aquí sm/Evac.c:43:0: aviso: falló la inclusión en línea en la llamada a ‘copy_tag’: call is unlikely and code size would grow sm/Evac.c:514:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:517:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:531:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:541:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:593:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:596:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:599:0: aviso: llamado desde aquí sm/Evac.c:97:0: aviso: falló la inclusión en línea en la llamada a ‘copy_noscav_tag’: call is unlikely and code size would grow sm/Evac.c:205:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:636:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:670:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:673:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:676:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:679:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:682:0: aviso: llamado desde aquí sm/Evac.c:198:0: aviso: falló la inclusión en línea en la llamada a ‘copy’: call is unlikely and code size would grow sm/Evac.c:685:0: aviso: llamado desde aquí ../compiler/ghc-inplace -optc-O -optc-march=core2 -optc-O2 -optc-pipe -optc-Wa,--noexecstack -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -H16m -O -optc-march=core2 -opta-march=core2 -opta-Wa,--noexecstack -w -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c sm/Scav.c -o sm/Scav.o ../compiler/ghc-inplace -optc-O -optc-march=core2 -optc-O2 -optc-pipe -optc-Wa,--noexecstack -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -H16m -O -optc-march=core2 -opta-march=core2 -opta-Wa,--noexecstack -w -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c sm/Storage.c -o sm/Storage.o ../compiler/ghc-inplace -H16m -O -optc-march=core2 -opta-march=core2 -opta-Wa,--noexecstack -w -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c Apply.cmm -o Apply.o <interno>:0:1: lexical error make[1]: *** [Apply.o] Error 1 make[1]: *** Se espera a que terminen otras tareas.... sm/Scav.c: En la función ‘scavenge_mark_stack’: sm/Scav.c:66:0: aviso: falló la inclusión en línea en la llamada a ‘scavenge_srt’: call is unlikely and code size would grow sm/Scav.c:123:0: aviso: llamado desde aquí sm/Scav.c:66:0: aviso: falló la inclusión en línea en la llamada a ‘scavenge_srt’: call is unlikely and code size would grow sm/Scav.c:112:0: aviso: llamado desde aquí sm/Scav.c:66:0: aviso: falló la inclusión en línea en la llamada a ‘scavenge_srt’: call is unlikely and code size would grow sm/Scav.c:123:0: aviso: llamado desde aquí sm/Scav.c:66:0: aviso: falló la inclusión en línea en la llamada a ‘scavenge_srt’: call is unlikely and code size would grow sm/Scav.c:112:0: aviso: llamado desde aquí sm/Scav.c:66:0: aviso: falló la inclusión en línea en la llamada a ‘scavenge_srt’: call is unlikely and code size would grow sm/Scav.c:123:0: aviso: llamado desde aquí sm/Scav.c:66:0: aviso: falló la inclusión en línea en la llamada a ‘scavenge_srt’: call is unlikely and code size would grow sm/Scav.c:112:0: aviso: llamado desde aquí make: *** [stage1] Error 1 * * ERROR: dev-lang/ghc-6.8.2-r1 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3437: Called die * The specific snippet of code: * emake all || die "make failed" * The die message: * make failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/dev-lang/ghc-6.8.2-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/ghc-6.8.2-r1/temp/environment'. * >>> Failed to emerge dev-lang/ghc-6.8.2-r1, Log file: >>> '/var/tmp/portage/dev-lang/ghc-6.8.2-r1/temp/build.log' * Messages for package dev-lang/ghc-6.8.2-r1: * * ERROR: dev-lang/ghc-6.8.2-r1 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3437: Called die * The specific snippet of code: * emake all || die "make failed" * The die message: * make failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/dev-lang/ghc-6.8.2-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/ghc-6.8.2-r1/temp/environment'. * localhost distfiles #
Yay! I have managed to reproduce it for 6.8.2-r1 too (needs LANGUAGE as well here): LANGUAGE=es LC_ALL=es_ES.UTF-8 PORTAGE_TMPDIR="$(pwd)/tmp" ebuild ghc-6.8.2-r1.ebuild clean compile ... ../compiler/ghc-inplace -optc-O -optc-O2 -optc-pipe -optc-Wa,--noexecstack -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -H16m -O -opta-Wa,--noexecstack -w -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c sm/Storage.c -o sm/Storage.o ../compiler/ghc-inplace -H16m -O -opta-Wa,--noexecstack -w -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c Apply.cmm -o Apply.o <interno>:0:1: lexical error make[1]: *** [Apply.o] Error 1 make[1]: *** Se espera a que terminen otras tareas.... make: *** [stage1] Error 1
And the same holds for 6.12.3: "inplace/bin/ghc-stage1" -H64m -O0 -fasm -w -package-name integer-gmp-0.2.0.1 -hide-all-packages -i -ilibraries/integer-gmp/. -ilibraries/integer-gmp/dist-install/build -ilibraries/integer-gmp/dist-install/build/autogen -Ilibraries/integer-gmp/dist-install/build -Ilibraries/integer-gmp/dist-install/build/autogen -Ilibraries/integer-gmp/. -optP-include -optPlibraries/integer-gmp/dist-install/build/autogen/cabal_macros.h -package ghc-prim-0.2.0.0 -package-name integer-gmp -XCPP -XMagicHash -XUnboxedTuples -XNoImplicitPrelude -XForeignFunctionInterface -XUnliftedFFITypes -O0 -fasm -fno-warn-deprecated-flags -c libraries/integer-gmp/cbits/gmp-wrappers.cmm -o libraries/integer-gmp/dist-install/build/cbits/gmp-wrappers.o <interno>:0:1: lexical error make[1]: *** [libraries/integer-gmp/dist-install/build/cbits/gmp-wrappers.o] Error 1 make: *** [all] Error 2
Reported upstream: http://hackage.haskell.org/trac/ghc/ticket/4207
Pushed forced 'LC_ALL=C' for all ghc ebuilds. Please reopen if the build problem still exists. Thank you, guys!