First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 88362
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Haskell Language team <haskell@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Adrian Lambeck <adrian@basicsedv.de>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 88362 depends on: Show dependency tree
Bug 88362 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-04-08 08:22 0000
It would be great if somebody could create e current ebuild for ghc-bin of
version 6.4 . I am working at ebuilds for Pugs (see portage). It requires ghc
6.4 .
Thanks

------- Comment #1 From Duncan Coutts (RETIRED) 2005-04-08 08:37:35 0000 -------
ghc 6.4 is hard masked at the moment for various reasons. We're not likely to
add a ghc-bin version until ghc-6.4 in general is unmasked.

From my brief test, the version of pugs in portage at the moment works fine
with ghc-6.4

If you're just testing things, you can build ghc-6.4 yourself. You don't need
the -bin version (though it does take a couple hours to build ghc)

BTW the DEPEND
||( >=dev-lang/ghc-bin-6.2.1 >=dev-lang/ghc-6.2.1 ) 

should probably be:
>=virtual/ghc-6.2.1

See the dev-lang/ghc ebuild or any of the dev-haskell ebuilds.

------- Comment #2 From Duncan Coutts (RETIRED) 2005-04-08 08:44:42 0000 -------
Oh, and you might want to build pugs using optimisations. It can make quite a
runtime speed difference though it makes compilation much slower. Pass the '-O'
flag to ghc.

------- Comment #3 From Adrian Lambeck 2005-04-08 09:15:06 0000 -------
I can imagine that there are various issues. The pugs version in portage is not
depending on 6.4 but the current one (6.0.14) is. 

I know that I can build it with ghc-bin but in order to avoide all this I would
like to use ghc-bin. 

The DEPEND you mentioned was changed by mcummings. He wanted to make pugs
available to ghc and ghc-bin users.

I will have a look if the Makefile does not include -O anyways. Thank's for the
tip though.

------- Comment #4 From Duncan Coutts (RETIRED) 2005-04-08 09:44:34 0000 -------
The point about virtual/ghc is that both ghc and ghc-bin PROVIDE virtual/ghc.
So it's better to depend on virtual/ghc.

------- Comment #5 From Adrian Lambeck 2005-04-08 12:13:44 0000 -------
Now I got it and fixed it too.

------- Comment #6 From Andres Loeh (RETIRED) 2005-04-10 03:28:50 0000 -------
ghc-bin-6.4 will be provided very soon. However, ghc-bin isn't strictly
necessary
as ghc-6.4 will do for pugs and can be compiled using ghc-bin-6.2.2 ...

It's good to see pugs in portage.

Cheers,
  ks

------- Comment #7 From Adrian Lambeck 2005-04-29 13:05:56 0000 -------
So what happened ? What means very soon ? I don`t expect a date or something
but I thought you guys were working on it ... I the ghc(-source) working now ?
Thanks ...

------- Comment #8 From Andres Loeh (RETIRED) 2005-05-02 07:56:26 0000 -------
Sorry for the delay. Currently, the Haskell team members are all
quite busy in their RL's.

I have just committed a first version of ghc-bin-6.4, including a
binary for x86. We will try to test and add more arches during the
next days. Both ghc-bin-6.4 and ghc-6.4 remain package.masked
for the moment, because many ghc-based Haskell libraries are still
not compatible with the new version.

We currently hope to get ghc-6.4 out of package.mask within the next
two weeks, but no promises ...

Cheers,
  ks

------- Comment #9 From Adrian Lambeck 2005-05-02 09:05:46 0000 -------
That`s great ! Within the next two weeks sounds very good. Thanks.

------- Comment #10 From Nathan Mahon 2005-05-17 09:59:43 0000 -------
ghc does not appear to be in package.mask anymore.
I'm going to go set up a bug for the new pugs version.

------- Comment #11 From Nathan Mahon 2005-05-17 10:51:35 0000 -------
(In reply to comment #1)
> ghc 6.4 is hard masked at the moment for various reasons. We're not likely to
add a ghc-bin version until ghc-6.4 in general is unmasked.
> 
> From my brief test, the version of pugs in portage at the moment works fine
with ghc-6.4
> 
> If you're just testing things, you can build ghc-6.4 yourself. You don't need
the -bin version (though it does take a couple hours to build ghc)
> 
> BTW the DEPEND
> ||( >=dev-lang/ghc-bin-6.2.1 >=dev-lang/ghc-6.2.1 ) 
> 
> should probably be:
> >=virtual/ghc-6.2.1
> 
> See the dev-lang/ghc ebuild or any of the dev-haskell ebuilds.


"virtuals being versioned is a common misconception." -- kloeri
you'll see, if you try it, that it'll fail trying to build a ~keyword blocked
ghc-bin without ever trying to get to ghc.
whereas if you use the former, it'll build, for example, ghc-6.4 via ghc-bin-6.2

maybe it'll work someday, though it'd lead to a lot of abiguity as to resolution.

------- Comment #12 From Andres Loeh (RETIRED) 2005-05-17 15:39:19 0000 -------
Sorry, but if something is established practice which results from lots
of past discussions, in this case with carpaski and jstubbs, you cannot
call it a "misconception" that easily. I know that there are some problems
related to the "virtual/ghc" solution -- but I cannot follow the negative
example you gave, there seems to be something not quite right about it.
Bootstrapping ghc via a virtual predates the presence of || in portage, afaik.

I think that the main problem with versioned virtuals that kloeri might
refer to in the statement cited, is that versioned virtuals completely
break down if the version schemes of the different packages that provide
the virtual differ. This, however, isn't the case for ghc and ghc-bin.

Furthermore, the || (...) dependency solution might have
problems on its own: first, it's decentralized and more difficult to
maintain; second, it's inconsistent with all the other ghc ebuilds, which
makes it a much less tested procedure which might cause difficulties that
I cannot see yet.

I'm very much in favour of jstubb's GLEP to replace virtuals completely by
meta-packages, and I might be willing to convert ghc and ghc-bin to this scheme
if it finds his approval, but it's perhaps better to wait until this is accepted
in general, and it's definitely better to do it for all ghc-related packages
at once rather than adopting inconsistent styles across different ebuilds.

Cheers,
  ks

------- Comment #13 From Bryan Østergaard (RETIRED) 2005-05-17 15:58:43 0000 -------
Nope, versioned virtuals is actually wrong. Portage basically treats virtuals
as
string - not versioned atoms.

Repoman in 2.0.51.22 even complains about versioned virtuals.

On the other hand, I have to agree that || ( ) is not a very nice solution due
to the decentralised issue but at least it's legal and not depending on
'unofficial' portage behaviour.

I can't think of a better solution than || ( ) at the moment - maybe ask the
portage guys if there's a better solution?

------- Comment #14 From Andres Loeh (RETIRED) 2005-05-17 16:21:13 0000 -------
Your statement is in contradiction to prior statements that I got from
carpaski.
It is not my place to decide which one of you is wrong. The most likely
explanation is that the portage team decided to deprecate this unliked and
not-very-well-documented feature. But it's not like I haven't asked the portage
guys multiple times about this issue, and they've not had a better solution
back then. I will think about moving to || (...), but I'm not yet convinced
that
it's without problems ...

ks

------- Comment #15 From Bryan Østergaard (RETIRED) 2005-05-17 16:56:03 0000 -------
I'm not saying || ( ) is without problems - I'm saying versioned virtuals is
broken :) Of course, they're not universally broken or they wouldn't be used in
so many ebuilds.

Whatever you choose to do, you can't generally solve Nathans problem using
virtuals afaik unless you bind the virtual to specific versions which certainly
has it's own set of problems.

Maybe mixing virtuals and || ( ) is the best option until GLEP 37 is
implemented. Anyway, just giving some ideas as Nathan asked me how to solve his
problem.

------- Comment #16 From Adrian Lambeck 2005-05-25 13:03:29 0000 -------
Maybe you guys could make up a ghc-bin for amd64 (?). If not maybe you could
mail me some instructions. Who did the build for ghc-6.2 ?

I noticed an error in ghc-6.4 that has been fixed by now. Is there any way to
get patches? I don`t have the time to figure out the patch from cvs tree

Thanks !

------- Comment #17 From Duncan Coutts (RETIRED) 2005-05-25 13:58:32 0000 -------
You're right we should add amd64 to the ghc-bin-6.4 ebuild.

As for the other fixes, we've been told that ghc 6.4.1 will be out soon (within
a few weeks) so backporting the various fixes for amd64 is probably not a good
use of our time at the moment but if 6.4.1 seems like is going to be a long time
comming we'll re-evaluate that decision.

Don't worry we do want to get ghc on amd64 working well too!

------- Comment #18 From Friedrich 2005-07-14 03:44:22 0000 -------
Would be great to have a ghc-bin-6.4, because on PPC there seems to be now way 
to install any ghc at the moment. 
 
ghc-bin-5.04.3 refuses to work, because it needs readline-4 where readline-5 is 
installed, and without that you can't get any other version of ghc to build. 

------- Comment #19 From Giacomo Graziosi 2005-11-10 07:07:51 0000 -------
ghc-6.4.1 is out, please update the portage (ghc-bin).
http://www.haskell.org/ghc/download_ghc_641.html

------- Comment #20 From Duncan Coutts (RETIRED) 2006-02-16 16:34:18 0000 -------
ghc-bin-6.4.1 for amd64 is done.

This leaves just ppc and ppc64. I'm cc'ing the ppc/ppc64 arch folk since it'd
be nice to have the latest ghc-bin as we're going to try and get ghc-6.4.1-r2
marked stable on all arches in a few weeks.

Quick guide to getting ghc-bin updated for an extra arch:
---------------------------------------------------------

(substitute "arch" as appropriate)

We have a script to help:
http://haskell.org/~gentoo/gentoo-haskell/build-ghc-bin.sh

use it like so:
ACCEPT_KEYWORDS="~arch" ./build-ghc-bin.sh 6.4.1-r2

This will produce:
/usr/portage/packages/All/ghc-6.4.1-r2.tbz2

mv that to:
/usr/portage/distfiles/ghc-bin-6.4.1-arch.tbz2

* enable the appropriate arch bits in the ghc-bin-6.4.1.ebuild.
* briefly check that ghc-bin-6.4.1.ebuild works at all
* upload "ghc-bin-6.4.1-arch.tbz2" to dev.gentoo.org:/space/distfiles-local/
* commit the changes to ghc-bin-6.4.1.ebuild.

(Note that while we're currently up to 6.4.1-r2 for ghc, we're at 6.4.1 for
ghc-bin. That's ok; it's not a problem.)

------- Comment #21 From Joe Jezak 2006-02-17 08:33:30 0000 -------
Configure dies with this when running your script on ppc:
configure: error: GHC is required unless bootstrapping from .hc files.

Any suggestions?

------- Comment #22 From Duncan Coutts (RETIRED) 2006-02-17 12:05:32 0000 -------
ghc does depend on virtual/ghc which is provided by ghc and ghc-bin.

So if you emerge -pv ghc portage should emerge ghc-bin first. If it's not doing
that then it's bug in portage handling of virtuals (again).

So since this portage bug seems to be back we're going to investigate moving to
"new style" virtuals.

------- Comment #23 From Luca Barbato 2006-02-18 05:43:15 0000 -------
ppc done

------- Comment #24 From Duncan Coutts (RETIRED) 2006-02-20 11:23:59 0000 -------
It'd be great to get ghc-6.4.1 marked ~ppc64. We can be fairly sure it works 
since corsair fixed up ghc-6.4 and ghc-bin-6.4 some time ago. We just need
someone with ppc64 hardware to test ghc-6.4.1 and the packages it depends on:
haddock & cabal. (While ghc-bin-6.4 is ~ppc64, ghc-6.4 never got marked ~ppc64
because the packages it dependes on were never marked ~ppc64.)

To save time in producing a .tbz2 package for ghc-bin-6.4.1, one could just
follow the mini-guide in comment #20 rather than emerging =ghc-6.4.1 and then
building a package. So only one full build of ghc is needed!

I'd like to get this done soonish since we're hoping to get ghc-6.4.1 marked
stable on all arches in a couple weeks.

cc'ing corsair in case he has the time to try this.

------- Comment #25 From Markus Rothe 2006-02-20 11:47:19 0000 -------
Hi,

I already took a small look into this and I found out that the package I built
is a little bit broken: I somehow manged to build it with timestamps from year
40876 or something like that. So you get *many* 'timestamp is in future'
warnings when installing ghc-bin.. ( yea! call me dump!! ;-) )

Anyway, the binary *should* work, even with broken timestamps, but I'm getting
this error, while trying to build ghc using ghc-bin with your script:

[...]
Could not find module `System.Directory':
[...]

Unfortunaly I don't have much time for this at the moment as I'm writing my
first tests at university this month. I'll definetly fix this when I get some
spare time. So please be patient. ;-)

Regards,

Markus

------- Comment #26 From Duncan Coutts (RETIRED) 2006-02-24 02:05:52 0000 -------
cparrott found that the problem is that for arches that use lib64, the ghc-bin
ebuild wasn't fixing the paths properly in ghc's package.conf database.

A fix is now in portage. So hopefully this will fix the problem on ppc64. And
it turns out that amd64 had the same problem! That should be fixed too.

------- Comment #27 From Chris Parrott (RETIRED) 2006-02-27 10:04:54 0000 -------
Upon further investigation, it seems we have hit another snag with ghc on
ppc64.

While building cabal-1.1.3-r1 using ghc-bin-6.4.1, I get the following error:


Compiling Distribution.Simple.SrcDist ( ./Distribution/Simple/SrcDist.hs,
dist/build/Distribution/Simple/SrcDist.o )
Compiling Distribution.Simple ( ./Distribution/Simple.hs,
dist/build/Distribution/Simple.o )
/usr/bin/ar: creating dist/build/libHSCabal-1.1.3.a
/usr/bin/ld: TOC section size exceeds 64k

!!! ERROR: dev-haskell/cabal-1.1.3-r1 failed.
!!! Function cabal-build, Line 140, Exitcode 1
!!! setup build failed
!!! If you need support, post the topmost build error, NOT this status message.


The standard recommended fix for this seems to be to add -mminimal-toc to the
gcc command-line, to generate a per-object file TOC.  However, passing this
flag to gcc via ghc's -optc-mminimal-toc flag yields the following error from
ghc's mangler:


mizar ~ # ghc -optc-mminimal-toc Hello.o Hello.hs
Warning: retaining unknown function `.LCTOC0' in output from C compiler
Warning: retaining unknown function `.LCTOC1 = .+32768' in output from C
compiler
Prologue junk?:         .size   s1oJ_entry,24
       .type   .s1oJ_entry,@function
.s1oJ_entry:
       ld 30,.LCTOC0@toc(2)


I believe the issue here is that the gcc on ppc64 produces additional prologue
information in the assembly output when -mminimal-toc is passed in, which the
ghc mangler does not know how to handle.  I will look into patching
ghc/driver/mangler/ghc-asm.lprl to handle this, but we should probably raise
this issue with the upstream ghc developers for inclusion back into the
mainline ghc sources.  (If they have not already addressed it.)

I believe this issue is not unique to cabal, but it may be seen with any large
program on ppc64.  For more details about this issue, please consult:

  http://www-128.ibm.com/developerworks/library/l-pow-gnutool/

Especially the section on binutils.

------- Comment #28 From Chris Parrott (RETIRED) 2006-02-27 10:07:19 0000 -------
Correction: in my previous comment, I made a reference to ghc-bin-6.4.1.  Since
no such beast exists for ppc64, this should be ghc-bin-6.4.  Sorry for any
confusion.

------- Comment #29 From Chris Parrott (RETIRED) 2006-02-28 11:10:16 0000 -------
I have managed to build an unregisterized version of ghc-6.4.1 for ppc64, and
then I subsequently used it to successfully build cabal with '-fvia-C
-optc-mminimal-toc' added to the command-line.

We should probably have a discussion with the ghc developers about fixing the
Evil Mangler for ppc64 when -optc-mminimal-toc is added to the ghc command
line.

I have successfully tested a bunch of haskell packages on ppc64 with this
build.  I will post my results in a separate bugzilla entry, so that Duncan can
keyword them for ~ppc64.

------- Comment #30 From Chris Parrott (RETIRED) 2006-02-28 15:21:08 0000 -------
I have entered new bugs for keywording various haskell packages and their
dependencies with ~ppc64.  Please see bug 124469 and bug 124470 for further
information.

------- Comment #31 From Chris Parrott (RETIRED) 2006-02-28 21:36:03 0000 -------
Upon further investigation, it appears that we can sidestep the issue involving
the TOC overflow for cabal on ppc64 for the moment.  The problem arose during
the build of cabal-1.1.3, when it tried to build the cabal library for ghci. 
Since ghci is not yet supported on ppc64, this issue is moot at the moment.

In the future, we may need to revisit this issue if ghci is enabled for ppc64,
or if other haskell codes demonstrate a need to be compiled with -mminimal-toc.

I have successfully bootstrapped a registerized build of ghc-6.4.1 on ppc64,
and I will use Duncan's instructions above to create a ghc-bin-6.4.1 tarball of
the same.

------- Comment #32 From Markus Rothe 2006-02-28 23:32:39 0000 -------
Chris: Thanks for the work you are doing to get haskel running on ppc64. :-)
Unfortunaly there is no need to build that package you mentioned in the last
comment, as I would build it myself anyway ( you know, there needs to be some
kind of trust when building packages that are put in 'distfiles' ;-) )

Duncan: What would be the best way to let cabal be compiled with '-fvia-C
-optc-mminimal-toc'? I'm not very familiar with build systems, but cabal's
build system is not autotools, is it? So append-flags from flag-o-matic.eclass
won't work. Can you give me a hint, please? ;-)

------- Comment #33 From Chris Parrott (RETIRED) 2006-03-01 00:26:18 0000 -------
Markus: I believe it is no longer necessary to force '-fvia-C
-optc-mminimal-toc' in ghc on ppc64, as the TOC overflow problem was limited to
linking an object file which is not currently used on ppc64.  Whenever ghci is
enabled for ghc on ppc64, we may need to revisit this issue.  -mminimal-toc
should probably be passed on a per-package basis, though.

Just the same, I shall defer to you to build and package ghc-bin-6.4.1 on ppc64
for distfiles.  If I can be of any assistance, please feel free to ask.

------- Comment #34 From Duncan Coutts (RETIRED) 2006-03-01 02:15:53 0000 -------
(In reply to comment #32)
> Duncan: What would be the best way to let cabal be compiled with '-fvia-C
> -optc-mminimal-toc'? I'm not very familiar with build systems, but cabal's
> build system is not autotools, is it? So append-flags from flag-o-matic.eclass
> won't work. Can you give me a hint, please? ;-)

What we need to do is to modify the haskell-cabal.eclass to get cabal to not
build ghci libs on ppc64 (or indeed other arches where ghci doesn't work).

+       # Don't build GHCi libs for arches that do not support GHCi.
+       # Also building GHCi libs on ppc64 causes "TOC overflow".
+       if use alpha || use ppc64; then
+               cabalconf="${cabalconf} --disable-library-for-ghci"
+       fi

Then that should make it work for all ebuilds that use cabal (including cabal
itself). I will commit this change shortly.

------- Comment #35 From Markus Rothe 2006-03-01 02:30:47 0000 -------
hmm.. getting all emails from this bug twice.. removing me from CC as I'm
already on ppc64@g.o

------- Comment #36 From Markus Rothe 2006-03-01 08:27:34 0000 -------
The ghc-bin package seems to have hit the mirrors. So I've added ~ppc64 to that
ebuild and also to ghc/haddock/cabal!

Thanks for help Chris and Duncan!

Marking as FIXED as PPC64 was the last arch.

------- Comment #37 From Duncan Coutts (RETIRED) 2006-03-01 09:01:55 0000 -------
Great! Thanks Markus.

I've also updated the haskell-cabal eclass so emerging cabalised packages
should work ok on ppc64 - though this needs testing on a per-package basis.

There are also several packages which do not use Cabal and these may fail with
the TOC overflow problem when they create ghci libs. However this should mostly
be fixable by changing the ghc-package eclass to make the ghc-makeghcilib
function a no-op on ppc64 (and alpha).

First Last Prev Next    No search results available      Search page      Enter new bug