Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 557478 - dev-lang/ghc-7.10.2 fails to build with >=sys-libs/ncurses-6.0
Summary: dev-lang/ghc-7.10.2 fails to build with >=sys-libs/ncurses-6.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
: 558076 559016 (view as bug list)
Depends on:
Blocks: ncurses-6
  Show dependency tree
 
Reported: 2015-08-13 16:43 UTC by Josh Holmer
Modified: 2015-09-01 14:36 UTC (History)
10 users (show)

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


Attachments
build.log (build.log,2.48 KB, text/x-log)
2015-08-13 16:43 UTC, Josh Holmer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Holmer 2015-08-13 16:43:26 UTC
Build log shows: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

Package is specifically requesting ncurses version 5.x. Perhaps ghc's ebuild needs to specify that <sys-libs/ncurses-6.0 is required unless a fix can be made to allow building against ncurses 6.x.

Reproducible: Always

Steps to Reproduce:
1. Have >=sys-libs/ncurses-6.0 installed on system
2. emerge ghc
Actual Results:  
Build fails almost immediately with:

>>> Preparing source in /var/tmp/portage/dev-lang/ghc-7.10.2/work/ghc-7.10.2 ...
 *      /var/tmp/portage/dev-lang/ghc-7.10.2/work/usr/lib64/ghc-7.10.2/bin/ghc
 TYPE    PAX   FILE 
ET_EXEC --mxe- /var/tmp/portage/dev-lang/ghc-7.10.2/work/usr/lib64/ghc-7.10.2/bin/ghc 
/var/tmp/portage/dev-lang/ghc-7.10.2/work/usr/lib64/ghc-7.10.2/bin/ghc-pkg: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
 * ERROR: dev-lang/ghc-7.10.2::gentoo failed (prepare phase):
 *   failed to update cache after relocation
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_prepare
 *   environment, line 3736:  Called relocate_ghc '/var/tmp/portage/dev-lang/ghc-7.10.2/work'
 *   environment, line 3483:  Called die
 * The specific snippet of code:
 *       "$gp_back" recache || die "failed to update cache after relocation";


Expected Results:  
ghc should build

Emerge --info:

Portage 2.2.20.1 (python 3.4.3-final-0, default/linux/amd64/13.0/systemd, gcc-4.9.3, glibc-2.21-r1, 4.1.5-gentoo x86_64)
=================================================================
System uname: Linux-4.1.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770HQ_CPU_@_2.20GHz-with-gentoo-2.2
KiB Mem:    16340240 total,   2932692 free
KiB Swap:    2047996 total,   2047996 free
Timestamp of repository gentoo: Thu, 13 Aug 2015 12:30:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25.1 p1.0) 2.25.1
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.3.0::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

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

drdim
    location: /var/lib/layman/drdim
    sync-type: laymansync
    sync-uri: https://github.com/drdim/layman.git
    masters: gentoo
    priority: 50

ennui
    location: /var/lib/layman/ennui
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/user/ennui.git
    masters: gentoo
    priority: 50

sublime-text
    location: /var/lib/layman/sublime-text
    sync-type: laymansync
    sync-uri: git://github.com/DamnWidget/sublime-text.git
    masters: gentoo
    priority: 50

timboudreau
    location: /var/lib/layman/timboudreau
    sync-type: laymansync
    sync-uri: git://github.com/timboudreau/gentoo.git
    masters: gentoo
    priority: 50

tmacedo
    location: /var/lib/layman/tmacedo
    sync-type: laymansync
    sync-uri: git://github.com/tmacedo/portage.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs 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 usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl acpi alsa amd64 berkdb bluetooth branding bzip2 cjk cli colord corefonts cracklib crypt cups cxx dbus dri ffmpeg flac fortran gdbm gif iconv icu ipv6 ithreads jemalloc jpeg json libnotify lock mmx mmxext modules multilib ncurses networkmanager nls nptl nsplugin opengl openmp optimization pam pcre pdf png policykit pulseaudio readline session sqlite sse sse2 ssl startup-notification strong-optimization symlink systemd tcpd threads thunar truetype udev udisks unicode usb vim-syntax wifi zlib" ABI_X86="64" 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" 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" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev synaptics keyboard mouse" 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-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20 ruby22" USERLAND="GNU" VIDEO_CARDS="intel i915" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Josh Holmer 2015-08-13 16:43:44 UTC
Created attachment 408934 [details]
build.log
Comment 2 Josh Holmer 2015-08-13 17:22:09 UTC
For what it's worth, the above is with USE="-binary" (the default).

With USE="binary" the emerge succeeds, but ghc produces a runtime error with the same message (error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory)

Emerge with USE="-binary" works with sys-libs/ncurses-5.9-r4. I've hard-masked >=sys-libs/ncurses-6.0 as a temporary fix.
Comment 3 Andrzej Rybczak 2015-08-14 15:57:47 UTC
It compiles and works with +ghcbootstrap, provided that you already have ghc installed.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2015-08-14 18:33:40 UTC
Yeah, bootstrapping binary is built against stable stage3 (and as a result stable ncurses).
It is a long wish to pull all shared libraries with unstable
ABI into bootstrapping package.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2015-08-18 20:11:07 UTC
*** Bug 558076 has been marked as a duplicate of this bug. ***
Comment 6 Juergen Rose 2015-08-27 07:43:38 UTC
I also suffer from this bug. 'emerge -v --update --newuse --deep --with-bdeps=y --backtrack=30 @world' fails due to this error and 'emerge -v --update --newuse --deep --with-bdeps=y --backtrack=30 --exclude ghc @world' fails as well with
...

!!! All ebuilds that could satisfy ">=dev-lang/ghc-7.4.1:0/7.10.2=" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-lang/ghc-7.10.2::gentoo (masked by: exclude option)

(dependency required by "app-text/pandoc-1.15.0.6::gentoo" [installed])
(dependency required by "app-doc/root-docs-6.02.05::science" [installed])
(dependency required by "sci-physics/root-6.02.05-r2::gentoo[doc]" [ebuild])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

root@caiman:/root(96)#


'USE=ghcbootstrap emerge -v1 ghc' fails, because I already deleted ghc.

Is there not any patch?
Comment 7 Juergen Rose 2015-08-27 08:55:06 UTC
At the next system 'USE=ghcbootstrap emerge -v1 ghc' worked, but the subsequent 'emerge -v --update --newuse --deep --with-bdeps=y --backtrack=30 @world' wants to emerge ghc again and fails as before.
Comment 8 Dennis Schridde 2015-08-27 11:15:59 UTC
(In reply to Juergen Rose from comment #7)
> At the next system 'USE=ghcbootstrap emerge -v1 ghc' worked, but the
> subsequent 'emerge -v --update --newuse --deep --with-bdeps=y --backtrack=30
> @world' wants to emerge ghc again and fails as before.

Did you echo dev-lang/ghc ghcbootstrap >> /etc/portage/package.use?
Comment 9 Tobias Klausmann (RETIRED) gentoo-dev 2015-08-27 12:14:18 UTC
Another option is to install the slot-5 ncurses alongside slot 0 (which is now ncurses-6). This will enable you to build ghc without ghcbootstrap.
Comment 10 Todd Goodman 2015-08-27 15:23:20 UTC
As Tobias says, I solved this by emerging the slotted ncurses:5.  Shouldn't the ebuild DEPEND on ncurses:5 if it's shipping the binary tar file linked against it?
Comment 11 Carlos Salvador Pérez Salgado 2015-08-27 15:52:38 UTC
(In reply to Andrzej Rybczak from comment #3)
> It compiles and works with +ghcbootstrap, provided that you already have ghc
> installed.

This solution worked for me. Yet I asked emerge to install ncurses-5 and ncurses-6, my problem was a segmentation fault when compiling
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2015-08-27 20:10:05 UTC
I'll rebootstrap a ghc-7.10.2-r1 today without ncurses dependency.
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2015-08-27 22:26:12 UTC
(In reply to Sergei Trofimovich from comment #12)
> I'll rebootstrap a ghc-7.10.2-r1 today without ncurses dependency.

Pushed as:
    https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fdbbebbdc4b18e4078870a6a579834c64177219

Thank you!
Comment 14 Juergen Rose 2015-08-28 07:47:49 UTC
(In reply to Sergei Trofimovich from comment #13)
> (In reply to Sergei Trofimovich from comment #12)
> > I'll rebootstrap a ghc-7.10.2-r1 today without ncurses dependency.
> 
> Pushed as:
>    
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=0fdbbebbdc4b18e4078870a6a579834c64177219
> 
> Thank you!

It still fails here, at least if I do not set ghcbootstrap USE flag in /etc/portage/package.use:

root@lynx:/root(109)# MAKEOPTS=-j1 emerge -v1 ghc

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

Calculating dependencies... done!
[ebuild     U  ] dev-lang/ghc-7.10.2-r1:0/7.10.2::gentoo [7.10.2:0/7.10.2::gentoo] USE="doc gmp -binary -ghcbootstrap* -ghcmakebinary" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-lang/ghc-7.10.2-r1::gentoo
 * ghc-7.10.2-src.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                             [ ok ]
 * ghc-bin-7.10.2-r1-amd64.tbz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                       [ ok ]
 * binary-0.7.5.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                              [ ok ]
 * hoopl-3.10.1.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                              [ ok ]
 * transformers-0.4.3.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                        [ ok ]
>>> Unpacking source...
>>> Unpacking ghc-7.10.2-src.tar.bz2 to /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work
>>> Unpacking ghc-bin-7.10.2-r1-amd64.tbz2 to /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work

bzip2: /var/tmp/portage/dev-lang/ghc-7.10.2-r1/distdir/ghc-bin-7.10.2-r1-amd64.tbz2: trailing garbage after EOF ignored
>>> Unpacking binary-0.7.5.0.tar.gz to /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work
>>> Unpacking hoopl-3.10.1.0.tar.gz to /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work
>>> Unpacking transformers-0.4.3.0.tar.gz to /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work
>>> Source unpacked in /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work
>>> Preparing source in /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work/ghc-7.10.2 ...
 *      /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work/usr/lib64/ghc-7.10.2/bin/ghc
 * PT PaX marking -m /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work/usr/lib64/ghc-7.10.2/bin/ghc with paxctl
 *      /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work/usr/lib64/ghc-7.10.2/bin/ghc
 * XT PaX marking -me /var/tmp/portage/dev-lang/ghc-7.10.2-r1/work/usr/lib64/ghc-7.10.2/bin/ghc with setfattr
/var/tmp/portage/dev-lang/ghc-7.10.2-r1/work/usr/lib64/ghc-7.10.2/bin/ghc-pkg: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
 * ERROR: dev-lang/ghc-7.10.2-r1::gentoo failed (prepare phase):
 *   failed to update cache after relocation
 *
Comment 15 Sergei Trofimovich (RETIRED) gentoo-dev 2015-08-28 08:21:10 UTC
Yeah, things are still broken at least on amd64.
Comment 16 Sergei Trofimovich (RETIRED) gentoo-dev 2015-08-28 22:49:16 UTC
Pushed now with ghc-pkg purified from ncurses:

    https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6fa6889c4c19340c23b8cd5c34cff167e1953ba

That should fix it for real.
Apologies for back-and-forth changes and long delays.
Comment 17 Brian Evans (RETIRED) gentoo-dev 2015-09-01 14:36:09 UTC
*** Bug 559016 has been marked as a duplicate of this bug. ***