Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125389 - new ghc-bin-6.4.1 build for hppa
Summary: new ghc-bin-6.4.1 build for hppa
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: HPPA Linux
: High normal (vote)
Assignee: HPPA Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-07 11:39 UTC by Chris Parrott (RETIRED)
Modified: 2006-03-13 10:30 UTC (History)
3 users (show)

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


Attachments
ghc-bin-6.4.1 ebuild keyworded for ~hppa (ghc-bin-6.4.1.ebuild,1.26 KB, text/plain)
2006-03-07 11:50 UTC, Chris Parrott (RETIRED)
Details
ghc-6.4.1-r2 ebuild keyworded for ~hppa (ghc-6.4.1-r2.ebuild,6.80 KB, text/plain)
2006-03-07 11:53 UTC, Chris Parrott (RETIRED)
Details
cabal-1.1.3-r1 ebuild keyworded for ~hppa (cabal-1.1.3-r1.ebuild,2.08 KB, text/plain)
2006-03-07 11:55 UTC, Chris Parrott (RETIRED)
Details
haskell-cabal eclass modified to support ~hppa (haskell-cabal.eclass,6.37 KB, text/plain)
2006-03-07 11:57 UTC, Chris Parrott (RETIRED)
Details
"hello world" example program to test (Hello.hs,58 bytes, text/plain)
2006-03-07 12:12 UTC, Chris Parrott (RETIRED)
Details
example factorial program to test (Factorial.hs,611 bytes, text/plain)
2006-03-07 12:14 UTC, Chris Parrott (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Parrott (RETIRED) gentoo-dev 2006-03-07 11:39:12 UTC
Starting with Debian's HPPA port of ghc (Glasgow Haskell Compiler), I keyworded dev-lang/ghc-6.4.1-r2 with ~hppa, added a few tests for hppa to disable certain unsupported features on the hppa architecture, and then successfully completed a build of dev-lang/ghc-6.4.1-r2 on hppa.  I then used the instructions from Duncan Coutts in bug 88362, comment #20 to produce a binary package of my build for distfiles to be used as dev-lang/ghc-bin-6.4.1, which is needed to bootstrap your own native build of ghc.

I can make my ghc-bin-6.4.1 binpkg for hppa available, or here are the steps you would take to reproduce my efforts for yourself:

1.  Download http://ftp.debian.org/debian/pool/main/g/ghc6/ghc6_6.4.1-1_hppa.deb, which is the Debian hppa binary package of ghc for hppa.

2.  Use alien to convert this archive to a tgz file.  Then repack it as a .tbz2 file for the ghc-bin ebuild.

3.  Move the .tbz2 file to /usr/portage/distfiles/ghc-bin-6.4.1-hppa.tbz2.

4.  Emerge dev-libs/gmp if you do not already have it, as ghc and ghc-bin both need this dependency in order to run.

5.  Use the attached ghc-bin-6.4.1 ebuild file to emerge ghc-bin for ~hppa.  You may need to use ebuild to recompute the digests for this, as needed.

6.  Once this is done, use the attached ghc-6.4.1-r2.ebuild, cabal-1.1.3-r1.ebuild, and haskell-cabal.eclass to emerge dev-lang/ghc-6.4.1-r2 and dev-haskell/cabal-1.1.3-r1 for hppa.

7.  Now you should have a working build of ghc in /usr.  ghc-bin is no longer necessary at this point; you can unmerge it if you like.

ghc-bin is needed in case future revisions of ghc come out (e.g. 6.4.2), as you need a way to compile a new version of ghc using an existing ghc binary build.  If you have previously successfully emerged ghc, then you do not need ghc-bin to bootstrap a new release of ghc.  The existing ghc that you have emerged will work.

I will also attach a few sample Haskell programs to try out.  Compiling and running them is relatively straightforward:

  $ ghc -o Hello Hello.hs
  $ ./Hello

  $ ghc -o Factorial Factorial.hs
  $ ./Factorial 123

If you have any questions, please do not hesitate to get in touch with me.  I look forward to working with you to add ghc support to hppa.
Comment 1 Chris Parrott (RETIRED) gentoo-dev 2006-03-07 11:50:51 UTC
Created attachment 81631 [details]
ghc-bin-6.4.1 ebuild keyworded for ~hppa
Comment 2 Chris Parrott (RETIRED) gentoo-dev 2006-03-07 11:53:24 UTC
Created attachment 81632 [details]
ghc-6.4.1-r2 ebuild keyworded for ~hppa
Comment 3 Chris Parrott (RETIRED) gentoo-dev 2006-03-07 11:55:30 UTC
Created attachment 81633 [details]
cabal-1.1.3-r1 ebuild keyworded for ~hppa
Comment 4 Chris Parrott (RETIRED) gentoo-dev 2006-03-07 11:57:44 UTC
Created attachment 81634 [details]
haskell-cabal eclass modified to support ~hppa
Comment 5 Chris Parrott (RETIRED) gentoo-dev 2006-03-07 12:07:13 UTC
hamal ~ # emerge --info
Portage 2.0.53 (default-linux/hppa/2005.0, gcc-3.3.6, glibc-2.3.4.20040808-r1, 2.6.15.1-pa4-livecd32 parisc)
=================================================================
System uname: 2.6.15.1-pa4-livecd32 parisc PA7200 (PCX-T')
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="hppa"
AUTOCLEAN="yes"
CBUILD="hppa1.1-unknown-linux-gnu"
CFLAGS="-Os -pipe -march=1.1 -mschedule=7200"
CHOST="hppa1.1-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -pipe -march=1.1 -mschedule=7200"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo-distfiles.mirrors.tds.net"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="hppa berkdb bitmap-fonts bzip2 crypt cups expat foomaticdb fortran gdbm gmp gpm imlib ipv6 libwww ncurses nls pam perl pic python readline spell ssl tcpd truetype-fonts type1-fonts udev xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

hamal ~ #
Comment 6 Chris Parrott (RETIRED) gentoo-dev 2006-03-07 12:12:51 UTC
Created attachment 81635 [details]
"hello world" example program to test
Comment 7 Chris Parrott (RETIRED) gentoo-dev 2006-03-07 12:14:14 UTC
Created attachment 81636 [details]
example factorial program to test

compile this with:

$ ghc -o Factorial Factorial.hs

run it like this:

$ ./Factorial 123

123! = 12146304367025329675766243241881295855454217088483382315328918161829235892362167668831156960612640202170735835221294047782591091570411651472186029519906261646730733907419814952960000000000000000000000000000
Comment 8 Duncan Coutts (RETIRED) gentoo-dev 2006-03-07 17:07:47 UTC
(Just removing myself from the CC since I'm already included in haskell@gentoo.org)

Just to note that if anyone from the hppa herd wants to talk to us about this one then come find us in #gentoo-haskell.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2006-03-07 18:37:15 UTC
(In reply to comment #0)

> 1.  Download
> http://ftp.debian.org/debian/pool/main/g/ghc6/ghc6_6.4.1-1_hppa.deb, which is
> the Debian hppa binary package of ghc for hppa.

Make that http://ftp.debian.org/debian/pool/main/g/ghc6/ghc6_6.4.1-2_hppa.deb
Comment 10 Duncan Coutts (RETIRED) gentoo-dev 2006-03-13 09:37:12 UTC
Rej: thanks so much for all your work in bootstrapping ghc for hppa and getting it into portage. Closing this bug.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2006-03-13 10:30:50 UTC
Marked ~hppa:
    dev-lang/ghc-bin-6.4.1
    dev-lang/ghc-6.4.1-r2
    dev-haskell/cabal-1.1.3-r1
    dev-haskell/haddock-0.7

... and closing this bug.