Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 452442 - dev-lang/ghc: CFLAGS=-Os: unable to load package `base' ghc: ghc-*/base-*/HSbase-*.o: unknown symbol `stat' (for example 'dev-haskell/vector-0.10.0.1' fails to emerge)
Summary: dev-lang/ghc: CFLAGS=-Os: unable to load package `base' ghc: ghc-*/base-*/HSb...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Haskell Language team
URL: http://ghc.haskell.org/trac/ghc/ticke...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-16 07:30 UTC by Jason Mours
Modified: 2013-08-01 13:16 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,5.80 KB, text/plain)
2013-01-16 07:30 UTC, Jason Mours
Details
logs asked by error return. (vector.log,119.63 KB, text/plain)
2013-02-25 13:19 UTC, Zhu Sha Zang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mours 2013-01-16 07:30:16 UTC
Created attachment 335774 [details]
build.log

Emerging haskell components and vector fails to compile with ghc: unable to load package `base'. Posting build log
Comment 1 Jason Mours 2013-01-16 07:31:07 UTC
Portage 2.1.11.42 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.16.0, 3.7.2-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.7.2-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.2
Timestamp of tree: Tue, 15 Jan 2013 20:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p42
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories:

gentoo
    location: /usr/portage
    sync: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ABI="amd64"
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ALSA_CARDS="hda-intel cmipci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol"
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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"
ARCH="amd64"
AUTOCLEAN="yes"
BOOTSTRAP_USE="cxx unicode multilib"
CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump"
CAMERAS="ptp2"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -Os -pipe -ggdb"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -Os -pipe -ggdb"
DEFAULT_ABI="amd64"
DISTDIR="/usr/portage/distfiles"
EDITOR="/usr/bin/vi"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--verbose --color=y --complete-graph=y --quiet-build=n"
EMERGE_WARNING_DELAY="10"
EPREFIX=""
EROOT="/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec sftp -P \${port} \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
FFLAGS="-O2 -pipe"
GCC_SPECS=""
GENTOO_MIRRORS="http://gentoo.netnitco.net http://gentoo.mirrors.tds.net/gentoo http://ftp.dei.uc.pt/pub/linux/gentoo/ http://gentoo.channelx.biz/"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx"
GRUB_PLATFORMS=""
GUILE_LOAD_PATH="/usr/share/guile/1.8"
HOME="/root"
HUSHLOGIN="FALSE"
INFOPATH="/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.23.1/info"
INPUT_DEVICES="evdevi keyboard mouse"
IUSE_IMPLICIT="prefix"
KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe %s"
LIBDIR_amd64="lib64"
LIBDIR_amd64_fbsd="lib64"
LIBDIR_n32="lib32"
LIBDIR_n64="lib64"
LIBDIR_o32="lib"
LIBDIR_ppc="lib32"
LIBDIR_ppc64="lib64"
LIBDIR_s390="lib32"
LIBDIR_s390x="lib64"
LIBDIR_sparc32="lib32"
LIBDIR_sparc64="lib64"
LIBDIR_x32="libx32"
LIBDIR_x86="lib32"
LIBDIR_x86_fbsd="lib32"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
LOGNAME="root"
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"
MAIL="/var/mail/root"
MAKEOPTS="-j10"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.23.1/man"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev)"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
NOCOLOR="false"
OLDPWD="/home/bugs"
OPENGL_PROFILE="xorg-x11"
PAGER="/bin/more"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
PHP_TARGETS="php5-3"
PKGDIR="/usr/portage/packages"
PORTAGE_ARCHLIST="ppc sparc64-freebsd ppc-openbsd x86-openbsd ppc64 x86-winnt x86-fbsd ppc-aix alpha arm x86-freebsd s390 amd64 arm-linux x86-macos x64-openbsd ia64-hpux hppa x86-netbsd ppc64-linux x86-cygwin amd64-linux ia64-linux x86 sparc-solaris x64-freebsd sparc64-solaris x86-linux x64-macos sparc m68k-mint ia64 mips ppc-macos x86-interix hppa-hpux amd64-fbsd x64-solaris m68k sh x86-solaris sparc-fbsd"
PORTAGE_BIN_PATH="/usr/lib64/portage/bin"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary:log,warn,error,qa echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_OVERRIDE_EPREFIX=""
PORTAGE_PYM_PATH="/usr/lib64/portage/pym"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="-1"
PORTAGE_SYNC_STALE="30"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
PORT_LOGDIR_CLEAN="find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete"
PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
PWD="/home/bugs/dev-haskell/vector-0.10.0.1"
PYTHIA8DATA="/usr/share/pythia/xmldoc"
PYTHONDONTWRITEBYTECODE="1"
PYTHONPATH="/usr/lib/portage/pym"
PYTHON_SINGLE_TARGET="python2_7"
PYTHON_TARGETS="python2_7 python3_2"
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
RPMDIR="/usr/portage/rpm"
RUBY_TARGETS="ruby18 ruby19"
SHELL="/bin/bash"
SHLVL="1"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
TERM="linux"
UNINSTALL_IGNORE="/lib/modules/*"
USE="3dnow X acl amd64 berkdb bzip2 cli cracklib crypt cups cx16 cxx dri dwarves fortran gdbm gpm graphite iconv ipv6 mmx modules mudflap multilib ncurses nls nptl numa openmp pam pcre pppd readline session sse sse2 sse4a ssl tcpd threads unicode zlib" ALSA_CARDS="hda-intel cmipci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdevi keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USER="root"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CROSSCOMPILE_OPTS CURL_SSL DRACUT_MODULES DVB_CARDS ELIBC ENLIGHTENMENT_MODULES FCDSL_CARDS FFTOOLS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL OFED_DRIVERS OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS RUBY_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos ppc-openbsd s390 sh sparc sparc64-freebsd sparc64-solaris sparc-fbsd sparc-solaris x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
USE_EXPAND_VALUES_ELIBC="AIX Cygwin Darwin FreeBSD glibc HPUX Interix mintlib NetBSD OpenBSD SunOS uclibc Winnt"
USE_EXPAND_VALUES_KERNEL="AIX Cygwin Darwin FreeBSD freemint HPUX Interix linux NetBSD OpenBSD SunOS Winnt"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
VIDEO_CARDS="radeon"
VISUAL="/usr/bin/vi"
XDG_CONFIG_DIRS="/etc/xdg"
XDG_DATA_DIRS="/usr/local/share:/usr/share"
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
_="/usr/bin/emerge"
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2013-01-16 17:45:40 UTC
Interesting. You are one of those who has got
base with stat incorrectly linked in base.

It's sympthomes are 'ghci -package base' failing.

We don't have sane workaround yet. Only using 'USE=binary ghc'.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2013-01-16 17:46:28 UTC
Another instance of the same problem: https://github.com/gentoo-haskell/gentoo-haskell/issues/202
Comment 4 Jason Mours 2013-01-16 19:46:49 UTC
Thanks, lol, yeah I started with [source] not [binary]. I have most off the other necessary components added. I'm going to stick with my current installation as I've compiled it around 13 times. (24+hrs cooking) and I don't think it's contaminating my system. I was trying to get dev-haskell/glib on, and vector a dependency for a few others. Thanks again for looking into it and let me know if you'd like my environment file.
Comment 5 Jason Mours 2013-01-17 05:59:25 UTC
I also have a mlton bug that's related if it helps

ref: bug 452558
Comment 6 Jason Mours 2013-02-14 10:48:03 UTC
Still having this issue after upgrade, GHC - 7.6.2 linking :

ghc: /usr/lib64/ghc-7.6.2/base-4.6.0.1/HSBASE-4.6.0.1.o: unknown symbol 'stat'
Comment 7 Zhu Sha Zang 2013-02-25 13:19:43 UTC
Created attachment 340076 [details]
logs asked by error return.
Comment 8 Philipp Riegger 2013-07-15 13:45:53 UTC
Same here.
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-27 20:47:29 UTC
Does the error still occur for any of you
after rebuilding ghc against current gcc/binutils/glibc?
Comment 10 Jason Mours 2013-07-28 05:57:19 UTC
I can confirm that I still get this error with dev-haskell/vector-0.10.0.1. I'm using the following packages:

sci-mathematics/glpk-4.50
sys-devel/binutils-2.23.2
sys-libs/glibc-2.17
sys-devel/gcc-4.6.4
dev-lang/ghc-7.6.3

I'm not sure if using the masked glpk or binutils rules me out, but I can't roll back on either. Let me know if you'd like my current dev-haskell/* merge list. I've compiled almost everything except vector and packages dependent upon.
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-28 08:29:42 UTC
(In reply to Jason Mours from comment #10)
> I can confirm that I still get this error with dev-haskell/vector-0.10.0.1.
> I'm using the following packages:
> 
> sci-mathematics/glpk-4.50
> sys-devel/binutils-2.23.2
> sys-libs/glibc-2.17
> sys-devel/gcc-4.6.4
> dev-lang/ghc-7.6.3
> 
> I'm not sure if using the masked glpk or binutils rules me out, but I can't
> roll back on either. Let me know if you'd like my current dev-haskell/*
> merge list. I've compiled almost everything except vector and packages
> dependent upon.

Oh, both of you and Zhu Sha Zang have gcc-4.6 and -Os in CFLAGS.

Philipp Riegger, do you happen to use -Os?
I'd like to see your emerge --info as well.

Trying to reproduce here.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-28 10:44:56 UTC
> Oh, both of you and Zhu Sha Zang have gcc-4.6 and -Os in CFLAGS.
> 
> Philipp Riegger, do you happen to use -Os?
> I'd like to see your emerge --info as well.
> 
> Trying to reproduce here.

Reproduced successfully on gcc-4.6.3 / CFLAGS="-Os -march=native".
Will try to investivate what exactly triggers a bug.
Looks like uninlined __hscore_stat being weak symbol at -Os confuses ghci loader.
Comment 13 Philipp Riegger 2013-07-28 21:05:16 UTC
Yes, I am using -Os as well.

emerge --info:

Portage 2.2.0_alpha188 (hardened/linux/x86, gcc-4.7.3, glibc-2.17, 3.10.2-gentoo i686)
=================================================================
System uname: Linux-3.10.2-gentoo-i686-Intel-R-_Xeon-R-_CPU_E3-1220L_V2_@_2.30GHz-with-gentoo-2.2
KiB Mem:     1030660 total,     29444 free
KiB Swap:    1001468 total,    993744 free
Timestamp of tree: Sun, 28 Jul 2013 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r1, 3.2.5-r1, 3.3.2-r1
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.6, 1.14
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo wacfg gamerlay science lisp stoile_overlay eigenlay bitcoin
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -pipe -mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-Os -pipe -mno-tls-direct-seg-refs"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --alphabetical --binpkg-respect-use y --load-average=3 --with-bdeps y --dynamic-deps n"
FCFLAGS="-march=i686 -O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS="-march=i686 -O2 -pipe"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo http://gentoo.inode.at/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1 -s"
PKGDIR="/var/cache/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cache/portage/tree"
PORTDIR_OVERLAY="/var/lib/layman/wacfg /var/lib/layman/gamerlay /var/lib/layman/science /var/lib/layman/lisp /var/lib/layman/stoile /var/lib/layman/eigenlay /var/lib/layman/bitcoin"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="acl bash-completion berkdb bzip2 caps cli cracklib crypt cxx dri gmp gs hardened iconv idn ipv6 jpeg logrotate lzma lzo modules mudflap ncurses nls nptl pam pax_kernel pcre pic png readline session snmp ssl svg tcpd tiff udev unicode urandom vhosts x86 xattr zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-29 09:39:08 UTC
Ok then. The current simplest workaround is to use -O2 instead of -Os for ghc:

For example via portage's package.env subsystem:
  /etc/portage/env/O2.conf:
    CFLAGS="${CFLAGS} -O2"
    CXXFLAGS="${CXXFLAGS} -O2"
  /etc/portage/package.env/ghc-bug-452442
    # workaround http://bugs.gentoo.org/452442
    dev-lang/ghc O2.conf

Meanwhile i'll try to grab ghc patches from ticket #3333 and fix it properly.
Comment 15 Sergei Trofimovich (RETIRED) gentoo-dev 2013-07-31 21:38:01 UTC
(In reply to Sergei Trofimovich from comment #14)
> Ok then. The current simplest workaround is to use -O2 instead of -Os for
> ghc:
> 
> For example via portage's package.env subsystem:
>   /etc/portage/env/O2.conf:
>     CFLAGS="${CFLAGS} -O2"
>     CXXFLAGS="${CXXFLAGS} -O2"
>   /etc/portage/package.env/ghc-bug-452442
>     # workaround http://bugs.gentoo.org/452442
>     dev-lang/ghc O2.conf
> 
> Meanwhile i'll try to grab ghc patches from ticket #3333 and fix it properly.

I've pushed ghc-7.6.3-r1 to gentoo-haskell overlay (not in the main tree yet)
It has 2 major fixes:

    1. weak symbol support for ghci: https://github.com/gentoo-haskell/gentoo-haskell/commit/42eae8a9b61450d658549ecb0417f8585eeb4f8d
    2. gross workaround for missing libc_nonshared.a symbols: https://github.com/gentoo-haskell/gentoo-haskell/commit/ac1f0cf97724d0f719746d919120bcf20d1a1112

It seems to fix -Os ghci issue here and does not break anythong obvious.
If you have a change to test it in overlay please do and i'll move it to main tree.
Comment 16 Jason Mours 2013-08-01 00:26:38 UTC
I've added the haskell layover and have installed dev-lang/ghc-7.6.3-r1 successfully with MAKEOPTS="-j6". I am also able to confirm, on my end, that dev-haskell/vector-0.10.0.1 emerges successfully. So I think it's o.k to push -r1 over to the main tree. I'm going to stay on the overlay unless things get too buggy.

I'm going to try and emerge it with MAKEOPTS="-j10" where I have it set at in /etc/portage/make.conf regarding bug 456386. Doesn't look related but will post an update.
Comment 17 Sergei Trofimovich (RETIRED) gentoo-dev 2013-08-01 13:16:47 UTC
(In reply to Jason Mours from comment #16)
> I've added the haskell layover and have installed dev-lang/ghc-7.6.3-r1
> successfully with MAKEOPTS="-j6". I am also able to confirm, on my end, that
> dev-haskell/vector-0.10.0.1 emerges successfully. So I think it's o.k to
> push -r1 over to the main tree. I'm going to stay on the overlay unless
> things get too buggy.

Thanks for the test! Pushed as:

>*ghc-7.6.3-r1 (01 Aug 2013)
>
>  01 Aug 2013; Sergei Trofimovich <slyfox@gentoo.org>
>  +files/ghc-7.6.3-trac-3333-weak-syms.patch, +ghc-7.6.3-r1.ebuild:
>  Fixed CFLAGS=-Os ghci failure (bug #452442 by Jason Mours). Added weak symbol
>  processing into ghci. Limit maximum parallel job count down to 4 workers (-j1
>  is too slow on mmodern boxes, but -j12 kills the build almost always). Does
>  not eliminate failures completely, but reduces them significantly (bug
>  #456386).