Bug 1210323

Summary: [aarch64] stdout from subprocess lost
Product: [Fedora] Fedora Reporter: Jens Petersen <petersen>
Component: ghcAssignee: Jens Petersen <petersen>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: bos, haskell-devel, pbrobinson, petersen
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-21 10:20:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jens Petersen 2015-04-09 13:07:45 UTC
Description of problem:
haskell-platform fails to build under ghc-7.8.4 on aarch64.

Version-Release number of selected component (if applicable):
haskell-platform-2014.2.0.0.1-1.fc22

How reproducible:
100%

Steps to Reproduce:
1. fedpkg local/build

Actual results:
Configuring haskell-platform-2014.2.0.0.1...
Setup: The program alex version ==3.1.3 is required but the version of
/usr/bin/alex could not be determined.


Expected results:
no error

Additional info:
Workaround will probably be to comment out alex from haskell-platform.cabal.

Comment 1 Peter Robinson 2015-04-09 14:46:11 UTC
I don't think this is just limited to the above.

I see similar with the ghc-haskell-src-exts build and happy req

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2955322

Comment 2 Peter Robinson 2015-04-09 14:48:11 UTC
And ghc-language-javascript with happy

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2955282

Comment 3 Peter Robinson 2015-04-09 14:49:59 UTC
And ghc-language-java with alex

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2955263

there appears to be a theme ;-)

Comment 4 Peter Robinson 2015-04-09 15:17:47 UTC
gtk2hs-buildtools has issues detecting alex too. This one affects quite a number of package builds

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2955394

Can we up the priority on this issue now?

Comment 5 Jens Petersen 2015-04-10 17:17:24 UTC
Actually it now looks like this really is a duplicate of bug 1195231.

erikd posted a patch which likely fixes this to upstream, which I am
testing in http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2957099

Comment 6 Jens Petersen 2015-04-11 03:39:09 UTC
The upstream ticket is <https://ghc.haskell.org/trac/ghc/ticket/9673>.

Comment 7 Fedora Update System 2015-04-15 10:39:59 UTC
gtk2hs-buildtools-0.13.0.3-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/gtk2hs-buildtools-0.13.0.3-2.fc22

Comment 8 Peter Robinson 2015-04-19 13:44:36 UTC
It's clear this is a more wider problem that just a single issue with gtk2hs-buildtools. 

ghc-cairo http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2965561

What is the status of getting a proper fix?

Comment 9 Jens Petersen 2015-04-20 05:34:12 UTC
(In reply to Peter Robinson from comment #8)
> It's clear this is a more wider problem that just a single issue with
> gtk2hs-buildtools. 
> ghc-cairo http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2965561

Right it is a ghc bug and affects all versioned build-tools detection
during Cabal configure.

> What is the status of getting a proper fix?

Have a look at the upstream ticket (comment 6): people are working on it now.
Still hard to say when a fix will be available.

Comment 10 Jens Petersen 2015-04-20 09:36:34 UTC
Basically it seems ghc is not flushing output to stdout from subprocesses
on aarch64 (ie from processes not attached to a tty).

See eg https://ghc.haskell.org/trac/ghc/ticket/9673#comment:23
for a minimal reproducer.

Comment 11 Jens Petersen 2015-04-21 10:12:51 UTC
Okay the solution seems to be to use ld.gold for aarch64 too (like armv7).

Comment 12 Jens Petersen 2015-04-21 10:20:01 UTC

*** This bug has been marked as a duplicate of bug 1195231 ***

Comment 13 Fedora Update System 2015-04-21 18:46:11 UTC
gtk2hs-buildtools-0.13.0.3-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.