Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 326237 - dev-lang/ghc-6.12.3 fails to build due to assumption of ncurses +unicode
Summary: dev-lang/ghc-6.12.3 fails to build due to assumption of ncurses +unicode
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 22:47 UTC by Josh Cartwright
Modified: 2011-04-10 13:16 UTC (History)
1 user (show)

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


Attachments
build.log of failed ghc 6.12.3 build (build.log,4.38 KB, text/plain)
2010-07-27 02:35 UTC, Josh Cartwright
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Cartwright 2010-06-29 22:47:00 UTC
When emerging dev-lang/ghc-6.12.3, the configure step attempts to get version information from the bootstrapping compiler, and fails because it will not run (its dependent on libncursesw which is not installed)

ldd /var/tmp/portage/work/ghc.../lib64/ghc shows unsatisfied libncursesw dependency

Reproducible: Always

Steps to Reproduce:
1. USE=-unicode emerge ncurses
2. emerge ghc
3.

Actual Results:  
ghc fails to build/install

Expected Results:  
ghc being successfully installed, or crap out saying that a version of ncurses needs to be installed with unicode support
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2010-07-01 10:51:45 UTC
emerge --info and full build.log please
Comment 2 Ivan 2010-07-26 01:58:12 UTC
What USE flags are you using with GHC?

This has arisen before with USE=binary (but we never ended up resolving how to fix it); I haven't heard of it being a problem with USE=-binary though.
Comment 3 Josh Cartwright 2010-07-26 02:38:30 UTC
Sorry it took me awhile to follow up.  Here is my 'emerge --info':

# emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.3.5, glibc-2.11.2-r0, 2.6.34-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.34-gentoo-r1-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-gentoo-2.0.1
Timestamp of tree: Sat, 24 Jul 2010 14:30:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r3, 3.1.2-r4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.5, 4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="alsa amd64 crypt cups dvd emul-linux-x86 fbcon flac jpeg mmx mp3 mpeg mplayer multilib mysql ncurses nptl nptlonly offensive ogg oggvorbis opengl pam pcre session sse sse2 ssl threads usb userlocales vorbis xbip2 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 mmap_emul 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" 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, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

I don't have a build log of the particular failure, but I _was_ able to solve the problem by building ncurses +unicode, and then emerging ghc.  None of the ghc USE flags are set:

# emerge -av ghc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-lang/ghc-6.12.3  USE="-bash-completion -binary -doc -ghcbootstrap" 0 kB
Comment 4 Josh Cartwright 2010-07-27 02:35:54 UTC
Created attachment 240263 [details]
build.log of failed ghc 6.12.3 build

It seems to me that the most important line of the build log is this failure:

/var/tmp/portage/dev-lang/ghc-6.12.3/work/usr/lib64/ghc-6.12.3/ghc-pkg: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

# ldd /var/tmp/portage/dev-lang/ghc-6.12.3/work/usr/lib64/ghc-6.12.3/ghc-pkg 
        linux-vdso.so.1 =>  (0x00007fffdf6f8000)
        libncursesw.so.5 => not found
        librt.so.1 => /lib/librt.so.1 (0x00007fd6060d9000)
        libutil.so.1 => /lib/libutil.so.1 (0x00007fd605ed6000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007fd605cd2000)
        libgmp.so.3 => /usr/lib/libgmp.so.3 (0x00007fd605a79000)
        libm.so.6 => /lib/libm.so.6 (0x00007fd6057f6000)
        libc.so.6 => /lib/libc.so.6 (0x00007fd60549a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007fd60527d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd6062e2000)
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2010-11-06 20:56:54 UTC
Yeah. We'll add required dep on ncurses[unicode] when we update minimal EAPI for ghc ebuild.

It's nontrivial as we rely on eclass functions' call order (EAPI dependant): in pkg_prerm().

This part will become way simpler when ghc-6.12.3 will go stable on all arches.
Comment 6 Ron OHara 2010-12-04 16:13:20 UTC
This still an issue - even though the 6.12.3 is on the 'x86' ebuild is on stable.

eg.
# /var/tmp/portage/dev-lang/ghc-6.12.3/work/usr/bin/ghc -?
/var/tmp/portage/dev-lang/ghc-6.12.3/work/usr/lib/ghc-6.12.3/ghc: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-03-22 11:14:17 UTC
Still a problem today, please fix, possibly by making it depend on ncurses w/ +unicode.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2011-04-10 13:16:43 UTC
Added mandatory dep in version starting from:

> *ghc-6.12.3-r1 (27 Mar 2011)
> 
>   27 Mar 2011; Sergei Trofimovich <slyfox@gentoo.org> +ghc-6.12.3-r1.ebuild,
>   +files/ghc-6.12.3-ticket-2615-linker-script.patch:
>   Migrated to EAPI=3: initial PREFIX support (based on work of grobian);
>   USE=unicode for ncurses is a required depend (bug #326237 by Josh
>   Cartwright and others). Added linker script support to workaround bug
>   #311361 by Maciej Piechotka.

Thanks everyone!