Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140589 - haskell-cabal.eclass doesn't set the ghc path
Summary: haskell-cabal.eclass doesn't set the ghc path
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Low normal (vote)
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-15 21:05 UTC by Murray Campbell
Modified: 2006-10-16 14:09 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Murray Campbell 2006-07-15 21:05:22 UTC
While emerging dev-haskell/missingh with the "doc" USE-flag set I encountered the following problem:

# emerge dev-haskell/missingh

[... snip lots of successful compiling ...]

Preprocessing executables for MissingH-0.14.4...
Running Haddock for MissingH-0.14.4...
setup: Error: file does not exist: "ghc"

!!! ERROR: dev-haskell/missingh-0.14.4 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  ebuild.sh, line 1248:   Called haskell-cabal_src_compile
  haskell-cabal.eclass, line 212:   Called cabal_src_compile
  haskell-cabal.eclass, line 208:   Called cabal-haddock
  haskell-cabal.eclass, line 122:   Called die

!!! setup haddock failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

---------

I have found the same problem in other cabal-ised libraries (these were from overlays so I looked for one in the main tree.)

If, in haskell-cabal.eclass, I modify the lines:

----

# Libraries require GHC to be installed.
if [[ -n "${CABAL_HAS_LIBRARIES}" ]]; then
        RDEPEND="${RDEPEND} virtual/ghc"
fi

----

to

----

# Libraries require GHC to be installed.
if [[ -n "${CABAL_HAS_LIBRARIES}" ]]; then
        RDEPEND="${RDEPEND} virtual/ghc"
        cabalconf="${cabalconf} --with-compiler=/usr/bin/ghc"
fi

----

then everything works.

I haven't seen any discussion of this. Can anyone enlighten me as to whether this is an appropriate modification or, if not, why the installer can't find ghc in this very obvious place.

Thanks.

----

# emerge --info

Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.3.6, glibc-2.3.6-r4, 2.6.16-suspend2-r8 i686)
=================================================================
System uname: 2.6.16-suspend2-r8 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.6.15
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=pentium4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -pipe -march=pentium4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LANG="en_GB.utf8"
LC_ALL="en_GB.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib acpi alsa audiofile avi berkdb bitmap-fonts bzip2 cairo caps cdparanoia cli crypt cups curl dga dlloader dri dts dv dvd dvdread eds emacs emboss encode expat fam fbcon fftw flac foomaticdb fortran gdbm gif glitz glut gmp gnutls gpm gstreamer gtk gtk2 guile idn ieee1394 imagemagick imlib ipv6 isdnlog jack java jpeg jpeg2k kerberos krb4 ladcca lcms libcaca libg++ libwww mad matroska mikmod mmap mmx mng motif mp3 mpeg nas ncurses nls nptl nsplugin offensive ogg openal opengl osc oss pam pcmcia pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection sdl session slang slp sndfile speex spell spl sse sse2 ssl svg tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb v4l vorbis win32codecs wmf xinerama xml xml2 xorg xosd xprint xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_synaptics kernel_linux userland_GNU video_cards_radeon video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Murray Campbell 2006-07-15 21:15:16 UTC
I thought I should mention that I have all haskell ebuilds in /etc/portage/package.keywords with ~x86
So I have:
dev-lang/ghc-6.4.2
dev-haskell/cabal-1.1.4
dev-haskell/haddock-0.7
dev-haskell/missingh-0.14.4
Comment 2 Duncan Coutts (RETIRED) gentoo-dev 2006-07-16 08:20:46 UTC
I can't reproduce this. Though I have seen this issue with some later versions of Cabal. Could you tel me what versions of Cabal you've got installed, run this:

ghc-pkg list Cabal

I noticed the other day that our ebuilds will actually pick up a later version of Cabal if you installed that manually, even if that version wasn't installed from a portage ebuild.
Comment 3 Murray Campbell 2006-07-16 13:49:35 UTC
(In reply to comment #2)

# ghc-pkg list Cabal
/usr/lib/ghc-6.4.2/package.conf:
    Cabal-1.1.4

I only have ~x86 main-tree ebuilds as far as I'm aware. (I noticed the issue first while trying to install dev-haskell/fps-0.7_pre20060701 from http://haskell.org/~gentoo/gentoo-haskell/portage/ so I then looked for something equivalent in the main tree - I'm not actually using missingh)

# ghc-pkg -l
/usr/lib/ghc-6.4.2/package.conf:
    ALUT-2.0, Cabal-1.1.4, GLUT-2.0, HGL-3.1, HUnit-1.1, OpenAL-1.2,
    OpenGL-2.0, QuickCheck-1.0, X11-1.1, altdata-0.9.10, base-1.0,
    cairo-0.9.10, (concurrent-1.0), (data-1.0), fgl-5.2, glade-0.9.10,
    glib-0.9.10, gtk-0.9.10, haskell-src-1.0, haskell-src-exts-0.2,
    haskell98-1.0, hi-0.9.10, (hssource-1.0), (lang-1.0), mogul-0.9.10,
    mozembed-0.9.10, mtl-1.0, (net-1.0), network-1.0, parsec-1.0,
    plugins-0.9.10, (posix-1.0), readline-1.0, rts-1.0, stm-1.0,
    template-haskell-1.0, (text-1.0), unix-1.0, (util-1.0), wx-0.9.4,
    wxcore-0.9.4

I'll try to check which other packages are affected. (dev-haskell/harp works for example)
Comment 4 Murray Campbell 2006-07-17 00:33:39 UTC
(In reply to comment #2)

AHA!

Emerging dev-haskell/cpphs fixed the problem!

It must need to be there for the pre-haddock processing. Should this be a dependency of dev-haskell/cabal?
Comment 5 Duncan Coutts (RETIRED) gentoo-dev 2006-07-17 04:36:54 UTC
Well done Murray, I can reproduce this now too.

I'll investigate what's going on, it's a rather misleading error message for missing cpphs :-)
Comment 6 Duncan Coutts (RETIRED) gentoo-dev 2006-08-02 13:25:08 UTC
Ok, we've made a change to a couple eclasses which we think will solve this problem.

Murray, would you mind syncing and giving it another go? Cheers.
Comment 7 Duncan Coutts (RETIRED) gentoo-dev 2006-10-16 14:09:49 UTC
I think this is fixed. If anyone thinks otherwise then do please reopen it.