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
Created attachment 408934 [details] build.log
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.
It compiles and works with +ghcbootstrap, provided that you already have ghc installed.
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.
*** Bug 558076 has been marked as a duplicate of this bug. ***
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?
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.
(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?
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.
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?
(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
I'll rebootstrap a ghc-7.10.2-r1 today without ncurses dependency.
(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!
(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 *
Yeah, things are still broken at least on amd64.
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.
*** Bug 559016 has been marked as a duplicate of this bug. ***