Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1195231
Summary: | aarch64 ghc dynlinked executable subprocesses losing stdout (was:ghc-7.8.4 build fails to complete on aarch64) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jens Petersen <petersen> |
Component: | ghc | Assignee: | Jens Petersen <petersen> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 22 | CC: | bos, haskell-devel, pbrobinson, petersen, pschindl |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | aarch64 | ||
OS: | Unspecified | ||
Whiteboard: | RejectedFreezeException | ||
Fixed In Version: | ghc-7.8.4-45.fc22 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-07-13 19:11:29 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: | |||
Bug Depends On: | 1203057 | ||
Bug Blocks: |
Description
Jens Petersen
2015-02-23 12:47:32 UTC
https://ghc.haskell.org/trac/ghc/ticket/9673 is the original bug I filed upstream in October ;) https://github.com/lukexi/ghc-7.8-arm64 may help: though it involves using llvm-3.5 ;o) I'll try and give it a try anyway... Trying backport ghc call convention patch from llvm-3.6 and see if that helps. ghc-7.10 RC2 also fails to install similarly (no ghc-pkg output). It is strange through, "ghc-pkg --version" seems to work in an interactive shell but not in an non-interactive subprocess. The current suspicion is that the problem is related to ghc dynlinking on aarch64: the statically linked ghc binaries don't exhibit the problem. I managed to build ghc-7.10.1 RC3 on F21 aarch64 using DYNAMIC_GHC_PROGRAMS=NO. Next I plan to backport the needed patches to 7.8.4 and build it too with DYNAMIC_GHC_PROGRAMS=NO on aarch64. Until the root (linking?) problem is fixed that seems the best short-term solution currently. It is unclear at the moment if all executables will need to be Haskell statically linked to work properly. GHC upstream will not support aarch64 officially 7.12 and will use llvm like the 32bit arm port. It will require llvm-3.6 which should include the needed ghc calling conventions. So F23 (assuming we move to 7.10) will likely be in a similar position to F22 but at least we know it builds with gcc there already. :) (In reply to Jens Petersen from comment #5) > GHC upstream will not support aarch64 officially *until* 7.12 (At the moment ghc on aarch64 using the gcc backend is predictably (very) slow - moving to optimized support with llvm will see big performance improvement: hopefully we will have llvm-3.6 in F23.) Also a question: there is no ld.gold on aarch64? I was hoping to try that for the above linking issue but then discovered there was none.. We are using ld.gold on armv7 for ghc-7.8.4, and quite likely it may be needed later also for aarch64 (with llvm). (In reply to Jens Petersen from comment #6) > Also a question: there is no ld.gold on aarch64? I opened bug 1203057 against binutils for this. Here is a "successful" koji build (without ghci) :-) http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2925034 ld.gold may help to get ghci working. (In reply to Jens Petersen from comment #8) > Here is a "successful" koji build (without ghci) :-) > http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2925034 Note the missing ghci files would be taken care of by updating ghc-srpm-macros to drop aarch64 from %ghc_arches_with_ghci. Still it would be good to test building with ld.gold to see if that can avoid dropping the new ghci support. Completed scratch build (with newer ghc-srpm-macros): http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2928744 I opened bug 1203951 to track the (new) lack of ghci on aarch64. What is the status here? There's been no movement for some time and we need a fix submitted and stable in time for the beta freeze which is next Tuesday. It looks like a boostrap build was submitted to rawhide but not the follow up post bootstrap build but none of this has been submitted to F-22 (In reply to Peter Robinson from comment #11) > What is the status here? There's been no movement for some time and we need > a fix submitted and stable in time for the beta freeze which is next > Tuesday. Sorry for the delay I was on holiday Thu-Fri. > It looks like a boostrap build was submitted to rawhide but not the follow > up post bootstrap build but none of this has been submitted to F-22 ghc-7.8.4-42.2.fc23 is the initial bootstrap for arm64. I can build it too for f22 but I think it is safest to do the f23 production build first for Rawhide and make sure it is sane, then building it all for F22 should be just straightforward enough. I will build ghc-7.8.4-43.fc23 once -42.2.fc23 is built for aarch64. > I will build ghc-7.8.4-43.fc23 once -42.2.fc23 is built for aarch64. It is now built: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2943144 Please test and update once -43 is built for mainline. Thanks I was trying to test it now but unfortunately I seem to have vpn connectivity problems at home which prevented me. Anyway I went ahead and set off the ghc-7.8.4-43.fc23 build: http://koji.fedoraproject.org/koji/buildinfo?buildID=622450 And also setting off ghc-7.8.4-42.2.fc22 shortly since it is so late now. (42.x are the first builds with bootstrapping conditional on arch, dunno why I hadn't thought of that before.) Let's keep our fingers crossed these builds are good for arm64, hopefully should be. :) f22 bootstrap build fired off now: http://koji.fedoraproject.org/koji/taskinfo?taskID=9367269 Hopefully koji-shadow can catch the -43 builds? -42.2.fc22 and -43.fc23 are done (In reply to Jens Petersen from comment #16) > -42.2.fc22 and -43.fc23 are done -42.2.fc22 failed, it's got some missing ghci files, which I presume is expected, and we had the correct rpm macros 4.13 for the build. http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2944082 My apologies I forgot (to mention here) that ghc-srpm-macros-1.4.1-1.fc22 is needed for the aarch64 build. I tested -43.fc23 and it basically looks okay to me so far (of course no ghci) however it does not generate shared libraries by default apparently. So at least ghc-rpm-macros needs to be updated for aarch64 to handle that. ghc-srpm-macros-1.4.1-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/ghc-srpm-macros-1.4.1-1.fc22 (In reply to Fedora Update System from comment #20) > ghc-srpm-macros-1.4.1-1.fc22 has been submitted as an update for Fedora 22. > https://admin.fedoraproject.org/updates/ghc-srpm-macros-1.4.1-1.fc22 Can you pull that update and submit all the fixes as a single update please (In reply to Peter Robinson from comment #21) > (In reply to Fedora Update System from comment #20) > > ghc-srpm-macros-1.4.1-1.fc22 has been submitted as an update for Fedora 22. > > https://admin.fedoraproject.org/updates/ghc-srpm-macros-1.4.1-1.fc22 > > Can you pull that update and submit all the fixes as a single update please I've revoked the request so it won't go to testing, please edit and add all NVRs required to fix this (I'm aware of at least ghc, ghc-rpm-macros, ghc-srpm-macros) (In reply to Jens Petersen from comment #16) > -42.2.fc22 and -43.fc23 are done OK, -42.2 is now complete, please tag it into mainline overrides for f22 and rebuild -43 http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2944793 Just for the record I tried building with ld.gold but it didn't seem to help and I still got the error in comment 0. BTW there was already an update for ghc-rpm-macros but I don't think it is strictly needed currently for f22 actually. Anyway i going to do another ghc-rpm-macros update to workaround no shared libs getting built by default on arm64 now. I will add that to the arm64 update. http://koji.fedoraproject.org/koji/buildinfo?buildID=625549 is the ghc-7.8.4-43.fc22 build ghc-rpm-macros-1.4.14-1.fc23 was built for rawhide. With that it should be possible to build Haskell packages now there for aarch64. (In reply to Jens Petersen from comment #27) > ghc-rpm-macros-1.4.14-1.fc23 was built for rawhide. > With that it should be possible to build Haskell packages now there for > aarch64. Is it needed for F-22 or are we OK to build ghc -43 on F-22 without ghc-rpm-macros-1.4.14-1.fc23 (In reply to Peter Robinson from comment #28) > Is it needed for F-22 or are we OK to build ghc -43 on F-22 without > ghc-rpm-macros-1.4.14-1.fc23 No ghc-rpm-macros-1.4.14 is not needed for the -43 build (and the rawhide build was also done without it). Package ghc-srpm-macros-1.4.1-1.fc22, ghc-rpm-macros-1.4.14-1.fc22, ghc-7.8.4-43.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ghc-srpm-macros-1.4.1-1.fc22 ghc-rpm-macros-1.4.14-1.fc22 ghc-7.8.4-43.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-5414/ghc-7.8.4-43.fc22,ghc-srpm-macros-1.4.1-1.fc22,ghc-rpm-macros-1.4.14-1.fc22 then log in and leave karma (feedback). Issue when building haskell-platform-2014.2.0.0.1-1.fc22 with the following error but the right version of alex (3.1.3) was in the build root: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2950552 + ghc --make -no-user-package-db -dynamic Setup [1 of 1] Compiling Main ( Setup.hs, Setup.o ) Linking Setup ... ++ echo ' -O2' -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches ++ sed -e 's/ / -optc/g' ++ echo ' -Wl,-z,relro' ++ sed -e 's/ / -optl/g' + ./Setup configure --prefix=/usr --libdir=/usr/lib64 --docdir=/usr/share/doc/haskell-platform '--libsubdir=$compiler/$pkgid' '--datasubdir=$pkgid' --ghc --enable-executable-dynamic '--ghc-options= -optc-O2 -optc-g -optc-pipe -optc-Wall -optc-Werror=format-security -optc-Wp,-D_FORTIFY_SOURCE=2 -optc-fexceptions -optc-fstack-protector-strong -optc--param=ssp-buffer-size=4 -optc-grecord-gcc-switches -optl-Wl,-z,relro' --user -p --enable-shared --docdir=/usr/share/doc/ghc-haskell-platform --htmldir=/usr/share/doc/ghc/html/libraries/haskell-platform-2014.2.0.0.1 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. (In reply to Peter Robinson from comment #31) > 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. Strange. It might be a bug - this certainly shouldn't happen. Do you mind opening a separate bug for this? I think a workaround would be to comment out alex in haskell-platform.cabal. Luckily I don't think any package in Fedora depends on haskell-platform or its subpackages so this is just a leaf package build issue. I guess I can build a workaround later for aarch64. Okay, I filed bug 1210323 for the haskell-platform build issue. BTW would it be better to untag -42.2.fc22 for arm64? I see various shadow builds failing because of it getting pulled into builds. can you check the failure in ghc-texmath http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2960203 Discussed at today's blocker review meeting [1]. This bug was rejected as Freeze Exception - on currently available info we don't see a clear reason this needs to have a freeze exception, it's causing issues with package builds but there are other avenues for dealing with that. We will re-discuss this if re-proposed with a better justification [1] http://meetbot.fedoraproject.org/fedora-blocker-review/2015-04-13/ (In reply to Peter Robinson from comment #35) > can you check the failure in ghc-texmath > http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2960203 + ./Setup test Running 1 test suites... Test suite test-texmath: RUNNING... test-texmath: src/unicode.tex: hGetContents: invalid argument (invalid byte sequence) Test suite test-texmath: FAIL No idea why that only happens on arm64. I pushed http://koji.fedoraproject.org/koji/taskinfo?taskID=9485755 for Rawhide (though still building/stuck on armv7 :-/) (In reply to Jens Petersen from comment #34) > BTW would it be better to untag -42.2.fc22 for arm64? I see various > shadow builds failing because of it getting pulled into builds. Also would it make sense to untag older ghc-rpm-macros in koji arm for f22/f23: I think only ghc-rpm-macros-1.4.14-1 is good for current arm64 ghc, various shadow builds might be pulling in older ghc-rpm-macros. ghc-texmath-0.8.0.1-2.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/ghc-texmath-0.8.0.1-2.fc22 *** Bug 1210323 has been marked as a duplicate of this bug. *** I will update ghc to use ld.gold on aarch64 once we have it available for aarch64. Worse news is that packages affected will likely need to be rebuilt to fix the issue (maybe all packages with executables). Why did this work in F-21 without the gold linker? ghc-srpm-macros-1.4.1-1.fc22, ghc-rpm-macros-1.4.14-1.fc22, ghc-7.8.4-43.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. Reopening for coming ld.gold fix. (In reply to Peter Robinson from comment #43) > Why did this work in F-21 without the gold linker? Not sure: the ld.gold patch is new for armv7 too for 7.8.4, 7.6.3 didn't need it. (It was merged for 7.10, see https://ghc.haskell.org/trac/ghc/ticket/8976 .) I am hoping that http://pkgs.fedoraproject.org/cgit/ghc.git/commit/?id=6bb2991c51da42756a452b8e2c97c0181b71f740 should fix aarch64 ghc (this is a backport of a change that will be in ghc-7.10.2). My local test build on a single core is still running... Once binutils with ld.gold (bug 1203057) is built in arm koji I can test build there. (In reply to Jens Petersen from comment #46) > I am hoping that > http://pkgs.fedoraproject.org/cgit/ghc.git/commit/ > ?id=6bb2991c51da42756a452b8e2c97c0181b71f740 should fix aarch64 ghc > (this is a backport of a change that will be in ghc-7.10.2). Unfortunately not. I am trying now with 7.10.1. > Once binutils with ld.gold (bug 1203057) is built in arm koji > I can test build there. Thanks - it is in arm64 f23 now. http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=2972501 is a scratch build turning on ghci and ld.gold but still without dynamic linked ghc progs. I wonder if this could help with the above reported Haskell package build problems (build-tools detect failures). Unfortunately the 7.8.4 ld.gold build did not seem to help. Currently the only workaround seems to be to build aarch64 executables statically linked to Haskell libraries (like in F21). That is probably what we should do for F22: it would require rebuilding some of the packages with static subpackages though. ghc-texmath-0.8.0.1-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. ghc-rpm-macros-1.4.15-1.fc23 disables dynamic linking for Haskell packages on aarch64. However note some packages now have static subpackages and they need to be tweaked to take this change into account. ghc-rpm-macros-1.4.15-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/ghc-rpm-macros-1.4.15-1.fc22 ghc-rpm-macros-1.4.15-2.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/ghc-rpm-macros-1.4.15-2.fc22 Package ghc-rpm-macros-1.4.15-2.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ghc-rpm-macros-1.4.15-2.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-8835/ghc-rpm-macros-1.4.15-2.fc22 then log in and leave karma (feedback). ghc-rpm-macros-1.4.15-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. Keeping this open since the root problem has not been fixed. http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=3032408 is a scratch build to test this with binutils-2.25-10.fc23 Wow that worked too! (task (unpackaged files) failure is just due to current ghc-rpm-macros needing tweaking for ghc-7.10) and trying a 7.8.4 scratch build: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=3032845 (In reply to Jens Petersen from comment #59) > and trying a 7.8.4 scratch build: > http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=3032845 That seemed to hang (after 8 hours;). :-( Here is another attempt: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=3033106 Okay I think I fixed the aarch64 gold patch now for 7.8.4 and it built for me locally on aarch64!! It is building now in main koji for f23 rawhide http://koji.fedoraproject.org/koji/taskinfo?taskID=10060578 Once binutils-2.25-8.fc22 is in F22 Updates we can fix this too for F22. :-) binutils-2.25-8.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/binutils-2.25-8.fc22 Package binutils-2.25-8.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing binutils-2.25-8.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-10051/binutils-2.25-8.fc22 then log in and leave karma (feedback). binutils-2.25-8.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. Reopening for the F22 ghc build for this. ghc-7.8.4-45.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/ghc-7.8.4-45.fc22 Package ghc-7.8.4-45.fc22, ghc-rpm-macros-1.4.15-3.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ghc-7.8.4-45.fc22 ghc-rpm-macros-1.4.15-3.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-10533/ghc-7.8.4-45.fc22,ghc-rpm-macros-1.4.15-3.fc22 then log in and leave karma (feedback). ghc-7.8.4-45.fc22, ghc-rpm-macros-1.4.15-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. |