Bug 1121620 - ghc-haskell-src-exts fails to build on s390
Summary: ghc-haskell-src-exts fails to build on s390
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: ghc-haskell-src-exts
Version: 22
Hardware: s390
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2014-07-21 12:02 UTC by Jakub Čajka
Modified: 2015-07-22 06:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-22 06:41:25 UTC


Attachments (Terms of Use)
Koji shadow build log (9.06 KB, text/x-log)
2014-07-21 12:02 UTC, Jakub Čajka
no flags Details

Description Jakub Čajka 2014-07-21 12:02:10 UTC
Created attachment 919613 [details]
Koji shadow build log

Build fails with:
[ 1 of 22] Compiling Language.Haskell.Exts.Annotated.Syntax ( src/Language/Haskell/Exts/Annotated/Syntax.hs, dist/build/Language/Haskell/Exts/Annotated/Syntax.p_o )
virtual memory exhausted: Cannot allocate memory

How reproducible:
Always

Shadow build:

http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=1441430

Comment 1 Jens Petersen 2014-07-22 01:58:13 UTC
I tried building with -O1 but that didn't help.

I wonder if moving to ghc-7.8 will help.

Comment 2 Jens Petersen 2014-07-22 04:08:45 UTC
(<http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=1441705>)


The failure seems specific to s390.  It builds ok on s390x:
http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=1441814

Comment 3 Dan Horák 2014-07-22 09:22:37 UTC
I think the problem will be the compiler process trying to allocate more than 1GB of heap or other memory. s390 has only 2GB address space per process as opposed to the usual 4GB on other 32-bit arches.

Comment 4 Jens Petersen 2014-07-22 13:02:14 UTC
Ah right - that makes sense then.

Okay I will try later to play with heap size setting
to see if we can make it compile on s390 too.
2GB of heap still seems like quite a lot but yeah
looks like this lib pushes the limits a bit.

Comment 5 Jens Petersen 2014-12-10 05:23:28 UTC
Okay sorry for the long pause.

I tried building with 1GB heap with the change below
but it still fails in the same way.

[ 1 of 22] Compiling Language.Haskell.Exts.Annotated.Syntax ( src/Language/Haskell/Exts/Annotated/Syntax.hs, dist/build/Language/Haskell/Exts/Annotated/Syntax.p_o )
virtual memory exhausted: Cannot allocate memory


```
--- a/ghc-haskell-src-exts.spec
+++ b/ghc-haskell-src-exts.spec
@@ -65,6 +65,10 @@ files.
 
 
 %build
+# s390 has max process size of 2GB
+%ifarch s390
+cabal_configure_extra_options="--ghc-option=+RTS --ghc-option=-M1000m --ghc-option=-RTS"
+%endif
 %ghc_lib_build
 
 
```

I guess the problem is that it actually needs more VM (not less).
So unless I am mistaken the only solution is to exclude s390 for now.

cf https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=654786#8 for a different package

How long do you plan to continue to support Fedora s390 btw?

Comment 6 Jens Petersen 2014-12-10 05:45:27 UTC
For now I committed a change to pkg git master to exclude s390.

http://pkgs.fedoraproject.org/cgit/ghc-haskell-src-exts.git/commit/?id=d701a34b2d1a512f0186d9886a49517f8177ce12

It is not built yet but I can backport it to F21 if you like.

To "get further" will need a similar change to hlint and ghc-hgettext.

Comment 7 Fedora End Of Life 2015-05-29 12:25:45 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.