[GHC] #11578: Fix GHC on AArch64/Arm64

#11578: Fix GHC on AArch64/Arm64 --------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Keywords: | Operating System: Unknown/Multiple Architecture: aarch64 | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: --------------------------------+------------------------------------- Raising this to track discussion about GHC on Arm64. There is already some discussion in ticket #11206 (ARM is generally a disaster), but that ticket is about 32 bit Arm which is vastly different and is now mostly fixed. Information worth saving from #11206: * GHC 7.8.4 from Debian can build the ghc-8.0 branch, but cannot build HEAD because HEAD requires ghc-7.10 to build. * GHC 7.10 from Debian is broken because of an unfixed bug in llvm-3.5.2. * User @mfox reports that ghc-7.10 does build against llvm-3.7 and results in a compiler that can build HEAD. * That GHC 7.10 can be build against llvm-3.7 is a happy accident. Versions of GHC are usually locked to a specific version of LLVM. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by erikd): GHC 7.10 does *not* work here with llvm-3.7. What I get is: {{{ You are using a new version of LLVM that hasn't been tested yet! We will try though... /usr/bin/opt-3.7: /tmp/ghc16717_0/ghc_26.ll:7:6: error: unexpected type in metadata definition !0 = metadata !{metadata !"top", i8* null} }}} which in hindsight is what I expected. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by erikd): Building HEAD with Debian's ghc-7.10.3 and llvm-3.5.2 results in: {{{ 0 libLLVM-3.5.so.1 0x0000007fb6de1458 llvm::sys::PrintStackTrace(_IO_FILE*) + 48 Stack dump: 0. Program arguments: llc-3.5 -O1 -relocation-model=static /tmp/ghcb9c5_0/ghc_244.bc -o /tmp/ghcb9c5_0/ghc_245.lm_s --enable- tbaa=true 1. Running pass 'Function Pass Manager' on module '/tmp/ghcb9c5_0/ghc_244.bc'. 2. Running pass 'Greedy Register Allocator' on function '@"c5K0b_entry$def"' utils/ghc-cabal/ghc.mk:34: recipe for target 'utils/ghc-cabal/dist/build/tmp/ghc-cabal' failed make[1]: *** [utils/ghc-cabal/dist/build/tmp/ghc-cabal] Segmentation fault (core dumped) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by mfox): It is crazy that mine works with almost no problems and doesn't even seem to care about llvm versions. You can try my build of HEAD: https://s3-us- west-1.amazonaws.com/stack-aarch64/ghc-8.1.20160209-aarch64-unknown- linux.tar.bz2 I built llvm 3.7 and clang using default options and installed to /usr/local from: http://llvm.org/releases/download.html I am still curious whether there is some hardware difference, if it comes down to an ubuntu vs debian thing or whether I just got lucky somehow. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by mfox): Something I've heard about but don't fully understand the implications (if any) for ghc: * Some programs assume that a page size is 4k. Arm64 can have larger and smaller pages. * Some programs assume 47-bit virtual address space with bit 48 signaling kernel space; the feel free to use bits [63:49] of a pointer as a tag. Arm64 Doesn't like it. Can still use bits [63:56] as a tag Again, I don't know the implications for ghc. Just mentioning it in case someone knows more. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- @@ -10,4 +10,4 @@ - * User @mfox reports that ghc-7.10 does build against llvm-3.7 and results - in a compiler that can build HEAD. - * That GHC 7.10 can be build against llvm-3.7 is a happy accident. - Versions of GHC are usually locked to a specific version of LLVM. + * ~~User @mfox reports that ghc-7.10 does build against llvm-3.7 and + results in a compiler that can build HEAD.~~ + * ~~That GHC 7.10 can be build against llvm-3.7 is a happy accident. + Versions of GHC are usually locked to a specific version of LLVM.~~ New description: Raising this to track discussion about GHC on Arm64. There is already some discussion in ticket #11206 (ARM is generally a disaster), but that ticket is about 32 bit Arm which is vastly different and is now mostly fixed. Information worth saving from #11206: * GHC 7.8.4 from Debian can build the ghc-8.0 branch, but cannot build HEAD because HEAD requires ghc-7.10 to build. * GHC 7.10 from Debian is broken because of an unfixed bug in llvm-3.5.2. * ~~User @mfox reports that ghc-7.10 does build against llvm-3.7 and results in a compiler that can build HEAD.~~ * ~~That GHC 7.10 can be build against llvm-3.7 is a happy accident. Versions of GHC are usually locked to a specific version of LLVM.~~ -- Comment (by erikd): @mfox The LLVM IR code generated by GHC-7.10.3 does not compile with LLVM-3.7. There is a fundamental imcompatibility. GHC-7.10.3 generated LLVM metata data instructions that LLVM-3.7 rejects. End of story. I have tried Debian's GHC where I manually edited the settings file to replace `/usr/bin/(opt|llc)-3.5` with `/usr/bin/(opt|llc)-3.7`. I also did the same for the 7.10.3 bindist you provided in ticket #11206. Both fail with the same error message: {{{ You are using a new version of LLVM that hasn't been tested yet! We will try though... /usr/bin/opt-3.7: /tmp/ghc16717_0/ghc_26.ll:7:6: error: unexpected type in metadata definition !0 = metadata !{metadata !"top", i8* null} }}} It would help if you could actually figure out what is made you think that the GHC-7.10.3 with LLVM-3.7 setup worked. Even if it just for documentation purposes. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by mfox): @erikd I think you asked the right question and that the answer will surprise you; It doesn't work work with LLVM-3.7. It works without it: {{{ $ ghc-7.10.3 hello.hs -v Glasgow Haskell Compiler, Version 7.10.3, stage 2 booted by GHC version 7.6.3 Using binary package database: /usr/local/lib/ghc-7.10.3/package.conf.d/package.cache wired-in package ghc-prim mapped to ghc- prim-0.4.0.0-6cdc86811872333585fa98756aa7c51e wired-in package integer-gmp mapped to integer- gmp-1.0.0.0-3c8c40657a9870f5c33be17496806d8d wired-in package base mapped to base-4.8.2.0-5d0e263086c09cf3ebc7a9920d2d76e9 wired-in package rts mapped to builtin_rts wired-in package template-haskell mapped to template- haskell-2.10.0.0-62d3bceb439078a9e90ea2eeb7044dd9 wired-in package ghc mapped to ghc-7.10.3-2084d337d2d83783183750b0af41d317 wired-in package dph-seq not found. wired-in package dph-par not found. Hsc static flags: wired-in package ghc-prim mapped to ghc- prim-0.4.0.0-6cdc86811872333585fa98756aa7c51e wired-in package integer-gmp mapped to integer- gmp-1.0.0.0-3c8c40657a9870f5c33be17496806d8d wired-in package base mapped to base-4.8.2.0-5d0e263086c09cf3ebc7a9920d2d76e9 wired-in package rts mapped to builtin_rts wired-in package template-haskell mapped to template- haskell-2.10.0.0-62d3bceb439078a9e90ea2eeb7044dd9 wired-in package ghc mapped to ghc-7.10.3-2084d337d2d83783183750b0af41d317 wired-in package dph-seq not found. wired-in package dph-par not found. *** Chasing dependencies: Chasing modules from: *hello.hs Stable obj: [] Stable BCO: [] Ready for upsweep [NONREC ModSummary { ms_hs_date = 2016-02-14 17:59:53.924557751 UTC ms_mod = Main, ms_textual_imps = [import (implicit) Prelude] ms_srcimps = [] }] *** Deleting temp files: Deleting: compile: input file hello.hs Created temporary directory: /tmp/ghc22305_0 *** Checking old interface for Main: [1 of 1] Compiling Main ( hello.hs, hello.o ) *** Parser: *** Renamer/typechecker: *** Desugar: Result size of Desugar (after optimization) = {terms: 7, types: 5, coercions: 0} *** Simplifier: Result size of Simplifier = {terms: 7, types: 5, coercions: 0} *** Tidy Core: Result size of Tidy Core = {terms: 7, types: 5, coercions: 0} writeBinIface: 1 Names writeBinIface: 14 dict entries *** CorePrep: Result size of CorePrep = {terms: 9, types: 6, coercions: 0} *** Stg2Stg: *** CodeGen: *** C Compiler: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -x c /tmp/ghc22305_0/ghc_2.hc -o /tmp/ghc22305_0/ghc_4.s -Wimplicit -fwrapv -fno-strict-aliasing -S '-D__GLASGOW_HASKELL__=710' -include /usr/local/lib/ghc-7.10.3/include/ghcversion.h -I. -I/usr/local/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM/include -I/usr/local/lib/ghc-7.10.3/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include -I/usr/local/lib/ghc-7.10.3/include *** Assembler: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -I. -x assembler -c /tmp/ghc22305_0/ghc_4.s -o hello.o Upsweep completely successful. *** Deleting temp files: Deleting: /tmp/ghc22305_0/ghc_5.rsp /tmp/ghc22305_0/ghc_4.s /tmp/ghc22305_0/ghc_3.c /tmp/ghc22305_0/ghc_2.hc /tmp/ghc22305_0/ghc_1.hc Warning: deleting non-existent /tmp/ghc22305_0/ghc_3.c Warning: deleting non-existent /tmp/ghc22305_0/ghc_1.hc link: linkables are ... LinkableM (2016-02-16 10:21:57.144557751 UTC) Main [DotO hello.o] Linking hello ... *** C Compiler: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -c /tmp/ghc22305_0/ghc_6.c -o /tmp/ghc22305_0/ghc_7.o -I/usr/local/lib/ghc-7.10.3/include *** C Compiler: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -c /tmp/ghc22305_0/ghc_9.s -o /tmp/ghc22305_0/ghc_10.o -I/usr/local/lib/ghc-7.10.3/include *** Linker: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER '-fuse- ld=gold' -Wl,-z,noexecstack -Wl,--no-as-needed -o hello hello.o -L/usr/local/lib/ghc-7.10.3/base_HQfYBxpPvuw8OunzQu6JGM -L/usr/local/lib/ghc-7.10.3/integ_2aU3IZNMF9a7mQ0OzsZ0dS -L/usr/local/lib/ghc-7.10.3/ghcpr_8TmvWUcS1U1IKHT0levwg3 -L/usr/local/lib/ghc-7.10.3/rts /tmp/ghc22305_0/ghc_7.o /tmp/ghc22305_0/ghc_10.o -Wl,-u,ghczmprim_GHCziTypes_Izh_static_info -Wl,-u,ghczmprim_GHCziTypes_Czh_static_info -Wl,-u,ghczmprim_GHCziTypes_Fzh_static_info -Wl,-u,ghczmprim_GHCziTypes_Dzh_static_info -Wl,-u,base_GHCziPtr_Ptr_static_info -Wl,-u,ghczmprim_GHCziTypes_Wzh_static_info -Wl,-u,base_GHCziInt_I8zh_static_info -Wl,-u,base_GHCziInt_I16zh_static_info -Wl,-u,base_GHCziInt_I32zh_static_info -Wl,-u,base_GHCziInt_I64zh_static_info -Wl,-u,base_GHCziWord_W8zh_static_info -Wl,-u,base_GHCziWord_W16zh_static_info -Wl,-u,base_GHCziWord_W32zh_static_info -Wl,-u,base_GHCziWord_W64zh_static_info -Wl,-u,base_GHCziStable_StablePtr_static_info -Wl,-u,ghczmprim_GHCziTypes_Izh_con_info -Wl,-u,ghczmprim_GHCziTypes_Czh_con_info -Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info -Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info -Wl,-u,base_GHCziPtr_Ptr_con_info -Wl,-u,base_GHCziPtr_FunPtr_con_info -Wl,-u,base_GHCziStable_StablePtr_con_info -Wl,-u,ghczmprim_GHCziTypes_False_closure -Wl,-u,ghczmprim_GHCziTypes_True_closure -Wl,-u,base_GHCziPack_unpackCString_closure -Wl,-u,base_GHCziIOziException_stackOverflow_closure -Wl,-u,base_GHCziIOziException_heapOverflow_closure -Wl,-u,base_ControlziExceptionziBase_nonTermination_closure -Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure -Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure -Wl,-u,base_GHCziIOziException_allocationLimitExceeded_closure -Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure -Wl,-u,base_GHCziEventziThread_blockedOnBadFD_closure -Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure -Wl,-u,base_GHCziTopHandler_flushStdHandles_closure -Wl,-u,base_GHCziTopHandler_runIO_closure -Wl,-u,base_GHCziTopHandler_runNonIO_closure -Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure -Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure -Wl,-u,base_GHCziConcziSync_runSparks_closure -Wl,-u,base_GHCziConcziSignal_runHandlersPtr_closure -lHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM -lHSinteger- gmp-1.0.0.0-2aU3IZNMF9a7mQ0OzsZ0dS -lHSghc- prim-0.4.0.0-8TmvWUcS1U1IKHT0levwg3 -lHSrts -lCffi -lgmp -lm -lrt -ldl link: done *** Deleting temp files: Deleting: /tmp/ghc22305_0/ghc_12.rsp /tmp/ghc22305_0/ghc_11.rsp /tmp/ghc22305_0/ghc_10.o /tmp/ghc22305_0/ghc_9.s /tmp/ghc22305_0/ghc_8.rsp /tmp/ghc22305_0/ghc_7.o /tmp/ghc22305_0/ghc_6.c *** Deleting temp dirs: Deleting: /tmp/ghc22305_0 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by mfox): Anywho, moving on. These are the tests that fail in HEAD: {{{ TEST="T2552 joao-circular T5654b-O1 T5654b-O0 T2552 T11195 T11303b T11276 T11374 linker_unload divbyzero T5435_dyn_asm T5435_v_gcc outofmem T5435_v_asm T3424 barton-mangler-bug T10052 T9329 T5313 T3586 recomp015 ghcilink004 integerConstantFolding TH_spliceE5_prof_ext recomp011 ghci004 ghci006 prog001 T8628 T8639_api T10508_api ffi014 dynCompileExpr T9203 haddock.Cabal haddock.compiler haddock.base T5321FD T5030 T4801 T5631 T5837 T9872a T5642 T9872b T3064 parsing001 T9872d T9872c T1969 T5321Fun T783 T9233 T9961" OVERALL SUMMARY for test run started at Mon Feb 15 16:05:12 2016 UTC 7:24:18 spent to go through 5015 total tests, which gave rise to 18823 test cases, of which 13838 were skipped 67 had missing libraries 4782 expected passes 81 expected failures 0 caused framework failures 1 unexpected passes 33 unexpected failures 21 unexpected stat failures }}} To get this good of a result you must build with: ./configure --disable-large-address-space -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by mfox): LLVM does work in HEAD though: {{{ ghc -v -fllvm hello.hs Glasgow Haskell Compiler, Version 8.1.20160209, stage 2 booted by GHC version 7.10.3 Using binary package database: /usr/local/lib/ghc-8.1.20160209/package.conf.d/package.cache Using binary package database: /home/admin/.ghc/aarch64-linux-8.1.20160209/package.conf.d/package.cache loading package database /usr/local/lib/ghc-8.1.20160209/package.conf.d loading package database /home/admin/.ghc/aarch64-linux-8.1.20160209/package.conf.d wired-in package ghc-prim mapped to ghc-prim-0.5.0.0 wired-in package integer-gmp mapped to integer-gmp-1.0.0.1 wired-in package base mapped to base-4.9.0.0 wired-in package rts mapped to rts wired-in package template-haskell mapped to template-haskell-2.11.0.0 wired-in package ghc mapped to ghc-8.1 wired-in package dph-seq not found. wired-in package dph-par not found. Hsc static flags: loading package database /usr/local/lib/ghc-8.1.20160209/package.conf.d loading package database /home/admin/.ghc/aarch64-linux-8.1.20160209/package.conf.d wired-in package ghc-prim mapped to ghc-prim-0.5.0.0 wired-in package integer-gmp mapped to integer-gmp-1.0.0.1 wired-in package base mapped to base-4.9.0.0 wired-in package rts mapped to rts-1.0 wired-in package template-haskell mapped to template-haskell-2.11.0.0 wired-in package ghc mapped to ghc-8.1 wired-in package dph-seq not found. wired-in package dph-par not found. *** Chasing dependencies: Chasing modules from: *hello.hs Stable obj: [] Stable BCO: [] Ready for upsweep [NONREC ModSummary { ms_hs_date = 2016-02-14 17:59:53.924557751 UTC ms_mod = Main, ms_textual_imps = [(Nothing, Prelude)] ms_srcimps = [] }] *** Deleting temp files: Deleting: compile: input file hello.hs *** Checking old interface for Main: [1 of 1] Compiling Main ( hello.hs, hello.o ) *** Parser: *** Renamer/typechecker: *** Desugar: Result size of Desugar (before optimization) = {terms: 15, types: 8, coercions: 0} Result size of Desugar (after optimization) = {terms: 13, types: 6, coercions: 0} *** Simplifier: Result size of Simplifier iteration=1 = {terms: 17, types: 8, coercions: 0} Result size of Simplifier = {terms: 17, types: 8, coercions: 0} *** Tidy Core: Result size of Tidy Core = {terms: 17, types: 8, coercions: 0} writeBinIface: 1 Names writeBinIface: 18 dict entries Created temporary directory: /tmp/ghc22455_0 *** CorePrep: Result size of CorePrep = {terms: 19, types: 9, coercions: 0} *** Stg2Stg: *** CodeGen: *** LLVM CodeGen: Using LLVM version: (3,7) *** LLVM Optimiser: /usr/local/bin/opt /tmp/ghc22455_0/ghc_2.ll -o /tmp/ghc22455_0/ghc_4.bc -mem2reg -globalopt '--enable-tbaa=true' *** LLVM Compiler: /usr/local/bin/llc -O1 '-relocation-model=static' /tmp/ghc22455_0/ghc_4.bc -o /tmp/ghc22455_0/ghc_5.lm_s '--enable-tbaa=true' *** LLVM Mangler: *** Assembler: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -I. -x assembler -c /tmp/ghc22455_0/ghc_6.s -o hello.o Upsweep completely successful. *** Deleting temp files: Deleting: /tmp/ghc22455_0/ghc_6.s /tmp/ghc22455_0/ghc_5.lm_s /tmp/ghc22455_0/ghc_4.bc /tmp/ghc22455_0/ghc_3.c /tmp/ghc22455_0/ghc_2.ll /tmp/ghc22455_0/ghc_1.ll Warning: deleting non-existent /tmp/ghc22455_0/ghc_3.c Warning: deleting non-existent /tmp/ghc22455_0/ghc_1.ll link: linkables are ... LinkableM (2016-02-16 10:42:45.064557751 UTC) Main [DotO hello.o] Linking hello ... *** C Compiler: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -c /tmp/ghc22455_0/ghc_7.c -o /tmp/ghc22455_0/ghc_8.o -I/usr/local/lib/ghc-8.1.20160209/include *** C Compiler: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -c /tmp/ghc22455_0/ghc_10.s -o /tmp/ghc22455_0/ghc_11.o -I/usr/local/lib/ghc-8.1.20160209/include *** Linker: /usr/bin/gcc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER '-fuse- ld=gold' -Wl,-z,noexecstack -Wl,--no-as-needed -o hello -Wl,--gc-sections hello.o -L/usr/local/lib/ghc-8.1.20160209/base-4.9.0.0 -L/usr/local/lib/ghc-8.1.20160209/integer-gmp-1.0.0.1 -L/usr/local/lib/ghc-8.1.20160209/ghc-prim-0.5.0.0 -L/usr/local/lib/ghc-8.1.20160209/rts /tmp/ghc22455_0/ghc_8.o /tmp/ghc22455_0/ghc_11.o -Wl,-u,ghczmprim_GHCziTypes_Izh_static_info -Wl,-u,ghczmprim_GHCziTypes_Czh_static_info -Wl,-u,ghczmprim_GHCziTypes_Fzh_static_info -Wl,-u,ghczmprim_GHCziTypes_Dzh_static_info -Wl,-u,base_GHCziPtr_Ptr_static_info -Wl,-u,ghczmprim_GHCziTypes_Wzh_static_info -Wl,-u,base_GHCziInt_I8zh_static_info -Wl,-u,base_GHCziInt_I16zh_static_info -Wl,-u,base_GHCziInt_I32zh_static_info -Wl,-u,base_GHCziInt_I64zh_static_info -Wl,-u,base_GHCziWord_W8zh_static_info -Wl,-u,base_GHCziWord_W16zh_static_info -Wl,-u,base_GHCziWord_W32zh_static_info -Wl,-u,base_GHCziWord_W64zh_static_info -Wl,-u,base_GHCziStable_StablePtr_static_info -Wl,-u,ghczmprim_GHCziTypes_Izh_con_info -Wl,-u,ghczmprim_GHCziTypes_Czh_con_info -Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info -Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info -Wl,-u,base_GHCziPtr_Ptr_con_info -Wl,-u,base_GHCziPtr_FunPtr_con_info -Wl,-u,base_GHCziStable_StablePtr_con_info -Wl,-u,ghczmprim_GHCziTypes_False_closure -Wl,-u,ghczmprim_GHCziTypes_True_closure -Wl,-u,base_GHCziPack_unpackCString_closure -Wl,-u,base_GHCziIOziException_stackOverflow_closure -Wl,-u,base_GHCziIOziException_heapOverflow_closure -Wl,-u,base_ControlziExceptionziBase_nonTermination_closure -Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure -Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure -Wl,-u,base_GHCziIOziException_allocationLimitExceeded_closure -Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure -Wl,-u,base_GHCziEventziThread_blockedOnBadFD_closure -Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure -Wl,-u,base_GHCziTopHandler_flushStdHandles_closure -Wl,-u,base_GHCziTopHandler_runIO_closure -Wl,-u,base_GHCziTopHandler_runNonIO_closure -Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure -Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure -Wl,-u,base_GHCziConcziSync_runSparks_closure -Wl,-u,base_GHCziConcziSignal_runHandlersPtr_closure -lHSbase-4.9.0.0 -lHSinteger-gmp-1.0.0.1 -lHSghc-prim-0.5.0.0 -lHSrts -lCffi -lgmp -lm -lrt -ldl link: done *** Deleting temp files: Deleting: /tmp/ghc22455_0/ghc_13.rsp /tmp/ghc22455_0/ghc_12.rsp /tmp/ghc22455_0/ghc_11.o /tmp/ghc22455_0/ghc_10.s /tmp/ghc22455_0/ghc_9.rsp /tmp/ghc22455_0/ghc_8.o /tmp/ghc22455_0/ghc_7.c *** Deleting temp dirs: Deleting: /tmp/ghc22455_0 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- @@ -4,1 +4,0 @@ - @@ -6,1 +5,0 @@ - New description: Raising this to track discussion about GHC on Arm64. There is already some discussion in ticket #11206 (ARM is generally a disaster), but that ticket is about 32 bit Arm which is vastly different and is now mostly fixed. Information worth saving from #11206: * GHC 7.8.4 from Debian can build the ghc-8.0 branch, but cannot build HEAD because HEAD requires ghc-7.10 to build. * GHC 7.10 from Debian is broken because of an unfixed bug in llvm-3.5.2. * ~~User @mfox reports that ghc-7.10 does build against llvm-3.7 and results in a compiler that can build HEAD.~~ * ~~That GHC 7.10 can be build against llvm-3.7 is a happy accident. Versions of GHC are usually locked to a specific version of LLVM.~~ -- Comment (by erikd): Ah now I understand what is going on. When you built your compiler, you didn't have LLVM-3.5 so the compiler was build as `Unregisterised` (See your `ghc --info` output in ticket:11206#comment:35) which uses the C backend instead of the LLVM backend, bypassing the LLVM-3.5 bug. When I took your bindist and installed it on my machine, the configure script detected the presense of llvm-3.5 and used it resulting in a broken compiler. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by rwbarton): Why would an unregisterised ''bindist'' use LLVM even if it detects an appropriate version though? That is surely a bug if it happens. The libraries in the bindist are all built with the unregisterised calling convention. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Comment (by hypoon): I'm not sure if it's useful, but it seems appropriate to link [[Arm64|my attempt]] to this ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11578: Fix GHC on AArch64/Arm64 -------------------------------------+------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------- Changes (by bgamari): * milestone: 8.2.1 => Comment: De-milestoning due to lack of progress. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11578#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC