The file libreadline.so.4 that ghc-bin is looking for doesn't exist because readline-4 isn't installed; libreadline.so.5 does exist. This shows up in the emerge of at least haddock; also, revdep-rebuild shows ghc-bin as broken because it needs libreadline.so.4. Here is the specific error message for the emerge: /opt/ghc/lib/ghc-6.2.2/ghc-6.2.2: error while loading shared libraries: libreadline.so.4: cannot open shared object file: No such file or directory make[2]: *** [depend] Error 127 make[1]: *** [boot] Error 1 make[1]: Leaving directory `/var/tmp/portage/haddock-0.6-r3/work/haddock-0.6/haddock' make: *** [build] Error 1 !!! ERROR: dev-haskell/haddock-0.6-r3 failed. !!! Function src_compile, Line 45, Exitcode 2 !!! make failed !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1. install >=sys-apps/readline-5 2. make sure sys-apps/readline-4 is not installed 3. try to emerge haddock or possibly other applications Actual Results: the emerge (of haddock) fails because it can't find libreadline.so.4 Expected Results: the emerge (of haddock) should complete successfully Quaoar ~ # emerge --info Portage 2.0.51-r3 (default-x86-2004.2, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-nitro2 i686) ================================================================= System uname: 2.6.9-nitro2 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz Gentoo Base System version 1.6.5 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r6 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -momit-leaf-frame-pointer -fprefetch-loop-arrays -ftracer -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -momit-leaf-frame-pointer -fprefetch-loop-arrays -ftracer -fomit-frame-pointer -pipe -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="candy ccache distlocks sandbox userpriv usersandbox" GENTOO_MIRRORS="ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://mirror.datapipe.net/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi acpi4linux alsa arts artswrappersuid audiofile avi cdparanoia cdr cdrom chroot codecs crypt cups curl doc dvd encode flac foomaticdb fs gif gstreamer gtk gtk2 imlib ipv6 java jikes jpeg kde ldap libwww mime mmx mono mozdevelop moznocompose moznoirc moznomail mozsvg mozxmlterm mpeg nls no-old-linux nomac nomultilib nptl offensive oggvorbis opengl pdflib perl pic png python qt quicktime radeon readline real sasl scanner spell sse sse2 ssl svg tcpd tetex tiff truetype unicode usb userlocales x86 xine xml xml2 xprint xscreensaver xsl xv xvid zlib"
I guess we could fix this by making the ghc-bin depend on the exact version of readline it was built against. In the meantime you can get ghc to work either by installing readline 4.x or emerge ghc since that will build ghc from source to use whatever version of readline you've got installed.
Emerging ghc is probably not an option, because it requires ghc-bin to work, which it doesn't at the moment. Emerging (and depending on) readline-4 is probably possible, but bad as well, because readline isn't slotted, and sooner or later people won't want to downgrade readline just to install ghc. grrr ... this convinces me once more that binary packages are evil. Duncan, do you see any chance that we'd get bootstrap from .hc up and running for the current ghc's? Then, I guess, we would nicely circumvent this kind of problem. ks
I'll ask Ian about bootstrapping from .hc files. I'm doubtful however. I believe it is quite complex. We could build ghc-bin without readline support, and require people to emerge ghc proper to get full readline support.
This is easily fixed on a per system basis - just emerge \<sys-libs/readline-5.0, and then emerge readline. This means that you'll still finish up with the same version of readline installed, but when you re-emerge the newer version the older libraries are kept, as you can see from the ebuild: pkg_postinst() { if [ -e ${ROOT}/$(get_libdir)/libreadline.so.4 ] ; then ewarn "Your old readline libraries have been copied over." ewarn "You should run 'revdep-rebuild --soname libreadline.so.4' asap." ewarn "Once you have, you can safely delete /$(get_libdir)/libreadline.so.4*" fi } As for a fix that requires no user intervention, how about putting libreadline.so.4 on the mirrors, and telling make to look for libraries in the directory that it does now, and in ${DISTDIR} (i.e. change libdir in the Makefile).
*** Bug 88558 has been marked as a duplicate of this bug. ***
*** Bug 98984 has been marked as a duplicate of this bug. ***
Ok, we're building ghc-bin against readline-5 now since readline-5 is now stable on all arches. This should fix everything (we hope!). corsair: could you (or another ppc person) do another build on ppc using readline-5? Cheers. We're building the .tbz2 file like so: CFLAGS="-O2" USE="-doc -opengl -tetex" emerge --buildpkgonly =ghc-6.2.2 or for ghc 6.4: CFLAGS="-O2" USE="-doc -opengl -java" emerge --buildpkgonly =ghc-6.4
I have built a new binary package for ppc64 (version 6.4). But I'm unsure, how to update the ebuild. Just updating the digest? or make a revision bump?
(In reply to comment #8) > I have built a new binary package for ppc64 (version 6.4). But I'm unsure, how > to update the ebuild. Just updating the digest? or make a revision bump? We're not bumping the ebuild revision, however the .tbz2 files must be changed (ie add "-r1") or they will clash with the ones already on the mirrors. I'll update x86, amd64 and sparc. You'll see the pattern to follow. It'll be like so: SRC_URI="x86? ( mirror://gentoo/${P}-r1-x86.tbz2 ) with the "-r1".
Ok, the new binaries for x86,amd64 and sparc of ghc-bin-6.2.2-r1 and ghc-bin-6.4 should be on the mirrors now and the ebuild hase been updated. Marksu, feel free to add the updated "ghc-bin-6.4-r1-ppc64.tbz2" to the mirrors and update the SRC_URI in the ebuild. Thanks very much.
Built a package for ghc-bin-6.2.2-r1 for ppc and keyworded ~ppc. I'll look into 6.4 tomorrow.
ghc-bin-6.4 for ppc is in.
Thanks Gustavo. I'm closing this bug now. If anyone finds it's still not quite right then re-open this bug (or open a new one as appropriate).