Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[overlay, haskell] ghc-7.2.1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 378

PostPosted: Fri Sep 02, 2011 1:00 pm    Post subject: [overlay, haskell] ghc-7.2.1 Reply with quote

Hi,

I'm trying to build GHC-7.2.1 from "haskell" overlay. The compiler itself builds OK (with USE=ghcbootstrap), but there's a problem with Cabal. No version of Cabal would build.

Cabal-1.10.2.0 emerge fails with this message:
Code:
Linking setup ...
Configuring Cabal-1.10.2.0...
setup: At least the following dependencies are missing:
base >=4 && <3 && >=2 && <5, unix >=2.0 && <2.5


This is strange, as "base >=4 && <3" looks like an empty set of versions. "unix < 2.5" also looks strange. GHC-7.2.1 includes unix-2.5.0.0, how cabal is supposed to work with it?

Cabal-1.11.1.20110721 installs, but then cabal-install won't, because the latest cabal-install requires cabal < 1.11, and again unix < 2.5.

Here's the list of GHC packages, just after emerging ghc and syb:
Code:
ghc-pkg list
/usr/lib/ghc-7.2.1/package.conf.d
   Cabal-1.12.0
   array-0.3.0.3
   base-4.4.0.0
   bin-package-db-0.0.0.0
   binary-0.5.0.2
   bytestring-0.9.2.0
   containers-0.4.1.0
   directory-1.1.0.1
   extensible-exceptions-0.1.1.3
   ffi-1.0
   filepath-1.2.0.1
   ghc-7.2.1
   ghc-prim-0.2.0.0
   haskell2010-1.1.0.0
   haskell98-2.0.0.0
   hoopl-3.8.7.1
   hpc-0.5.1.0
   integer-gmp-0.3.0.0
   old-locale-1.0.0.3
   old-time-1.0.0.7
   pretty-1.1.0.0
   process-1.1.0.0
   rts-1.0
   syb-0.3.2
   template-haskell-2.6.0.0
   time-1.2.0.5
   unix-2.5.0.0


What I'm doing wrong? 7.2.1 works on ubuntu...
_________________
!זה הכי, אחי Gentoo
Back to top
View user's profile Send private message
unK
l33t
l33t


Joined: 06 Feb 2007
Posts: 769

PostPosted: Sun Sep 11, 2011 8:27 am    Post subject: Reply with quote

Get cabal darcs repository (cabal-1.12.0 sits there), rename cabal dir to Cabal-1.12.0 and pack it in tar.gz archive (the same way it's done with cabal-1.11.1.20110721), put it in /usr/portage/distfiles and use this ebuild to install it:

Code:
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:  $

# ebuild generated by hackport 0.2.12

EAPI="3"

CABAL_FEATURES="bootstrap lib profile"
inherit haskell-cabal eutils

MY_PN="Cabal"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="A framework for packaging Haskell software"
HOMEPAGE="http://www.haskell.org/cabal/"
SRC_URI="http://hackage.haskell.org/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
IUSE="doc"

DEPEND=">=dev-lang/ghc-6.10.1"
RDEPEND="${DEPEND}
      dev-util/pkgconfig"
# cabal uses dev-util/pkgconfig using runtime to resolve C dependencies, so
# repoman's RDEPEND.suspect QA does not apply here

S="${WORKDIR}/${MY_P}"

CABAL_CORE_LIB_GHC_PV="7.2.1"

src_configure() {
   if ! cabal-is-dummy-lib; then
      einfo "Bootstrapping Cabal..."
      $(ghc-getghc) -i -i. -i"${WORKDIR}/${FP_P}" -cpp --make Setup.hs \
         -o setup || die "compiling Setup.hs failed"
      cabal-configure
   fi
}

src_compile() {
   if ! cabal-is-dummy-lib; then
      cabal-build
   fi
}


If it comes to cabal-install, you need to apply this patch to it to make it work with ghc-7.2.1.
_________________
ncmpcpp - featureful ncurses based MPD client inspired by ncmpc
Back to top
View user's profile Send private message
pygoscelis
Guru
Guru


Joined: 07 Jun 2003
Posts: 378

PostPosted: Fri Sep 30, 2011 10:02 am    Post subject: Reply with quote

Thanks, I'll try that when I attempt to go to 7.2 next time. For the time being I'm back at 7.0...
_________________
!זה הכי, אחי Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum