Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 561276 - dev-lang/ghc-7.8.4 - failed to update cache after relocation - usr/lib64/ghc-7.8.4/bin/ghc-pkg: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
Summary: dev-lang/ghc-7.8.4 - failed to update cache after relocation - usr/lib64/ghc-...
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:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-23 15:26 UTC by Erich Seifert
Modified: 2017-07-11 20:47 UTC (History)
2 users (show)

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


Attachments
build.log (dev-lang:ghc-7.8.4:20150923-150847.log,2.64 KB, text/plain)
2015-09-23 15:28 UTC, Erich Seifert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Seifert 2015-09-23 15:26:54 UTC
Emerging dev-lang/ghc-7.8.4 aborts early with the error "failed to update cache after relocation". It seems that a particlar version of sys-libs/ncurses (:0/5) is required, but not specified in DEPEND (I have :0/6).

Reproducible: Always

Steps to Reproduce:
1. emerge =dev-lang/ghc-7.8.4

Actual Results:  
Emerge fails when trying to prepare the source with:

/var/tmp/portage/dev-lang/ghc-7.8.4/work/usr/lib64/ghc-7.8.4/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.8.4::gentoo failed (prepare phase):
 *   failed to update cache after relocation
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_prepare
 *   environment, line 3745:  Called relocate_ghc '/var/tmp/portage/dev-lang/ghc-7.8.4/work'
 *   environment, line 3507:  Called die
 * The specific snippet of code:
 *       "$gp_back" recache || die "failed to update cache after relocation";


Expected Results:  
Installation without error.

$ emerge -pqv '=dev-lang/ghc-7.8.4::gentoo'
[ebuild     U ] dev-lang/ghc-7.8.4 [7.6.3-r1] USE="gmp -binary -doc -ghcbootstrap -ghcmakebinary (-llvm%)"
Comment 1 Erich Seifert 2015-09-23 15:28:43 UTC
Created attachment 412656 [details]
build.log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2015-09-27 20:28:06 UTC
The report is correct, but the solution is a bit hard.
If we restrict ghc-7.8.4 to ncurses-5 you won't be able
to update ncurses to 6 without major hurdle.

I'll rebuild booting binary without ncurses depend
or you can use unstable ghc-7.10.2 which already
does not have a depend on ncurses.
Comment 3 Oleh 2016-06-13 08:52:00 UTC
merging of stub ebuild (trimmed) ncurses-5.9-r101 is enough for resolving this. this ebuild can be co-installed with ncurses-6 and does not pollute the systems.

!!! existing preserved libs:
>>> package: sys-libs/ncurses-5.9-r101
 *  - /usr/lib64/libtinfow.so.5
 *  - /usr/lib64/libncursesw.so.5
 *      used by /usr/lib64/ghc-7.10.3/termi_6iVf4EBnOgfIaaOCLRs8jl/libHSterminfo-0.4.0.1-6iVf4EBnOgfIaaOCLRs8jl-ghc7.10.3.so (dev-lang/ghc-7.10.3)
Use emerge @preserved-rebuild to rebuild packages using these libraries

This is output from the system, where sys-libs/ncurses-5.9-r101 removed manually.
merging it back is sufficient. I use ghc[binary] aswell.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2017-07-03 19:58:42 UTC
Added ncurses:5/5 dependency for ghc-7.8.4 and ghc-7.10.3 as: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43fbec44acb0b56b2443f99e0994d5636c98d916
Comment 5 Zac Medico gentoo-dev 2017-07-11 18:30:19 UTC
> !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )

Should that "!ghcbootstrap?" conditional inverted? I've add ghc-7.10.3 installed since April 11, without ncurses-5.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2017-07-11 20:47:54 UTC
(In reply to Zac Medico from comment #5)
> > !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
> 
> Should that "!ghcbootstrap?" conditional inverted? I've add ghc-7.10.3
> installed since April 11, without ncurses-5.

Oh. I've completely forgot I've got rid of required
ncurses depend for prebuilt binary. It should not be
in build depends anymore for ghc-7.10.3 and upper.

My apologies. Fixed as and add a fat comment:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9caff4ab10a45797edba0d91ee4991613301d57d