[GHC] #12193: Include target versions of unlit and hsc2hs when cross-compiling

#12193: Include target versions of unlit and hsc2hs when cross-compiling -------------------------------------+------------------------------------- Reporter: glaubitz | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Hello! I have been working on getting ghc packaged on Debian for m68k and sh4. While ghc itself works without any major issues on these targets, the performance is a bit too low to just build ghc from sources on the machines itself. It works, but it may take up to three weeks or more. To workaround this problem, I am using a cross-compiled version of ghc on these platforms which works quite well. However, while using the cross- compiled Debian ghc packaged, I noticed that some packages fail to build from source because my cross-compiled version of ghc is missing the "unlit" utility. Looking at the result of the cross-compiled ghc for m68k, it's obvious why unlit is missing: {{{ glaubitz@ikarus:~/debian/ghc/ghc-8.0.1$ file ./inplace/lib/bin/* ./inplace/lib/bin/ghc-iserv: ELF 32-bit MSB executable, Motorola m68k, 68020, version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, BuildID[sha1]=39f595d60d0c596714aa0fedcc0bfa3a35921c41, not stripped ./inplace/lib/bin/ghc-iserv-prof: ELF 32-bit MSB executable, Motorola m68k, 68020, version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, BuildID[sha1]=f83f10fc7d925f54fb18816384ae91ae6c1b9ac8, not stripped ./inplace/lib/bin/ghc-pkg: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld- linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=41d534ca0e83df11274eade67477db1e9667fec5, not stripped ./inplace/lib/bin/ghc-stage1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld- linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=089a2121e49e16ea7ba721c350b04a965b19dded, not stripped ./inplace/lib/bin/ghc-stage2: ELF 32-bit MSB executable, Motorola m68k, 68020, version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, BuildID[sha1]=589cdca9242bd132e1c80736a79ebf4209eb1c78, not stripped ./inplace/lib/bin/hpc: ELF 32-bit MSB executable, Motorola m68k, 68020, version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, BuildID[sha1]=f401ba499a4cf865def36a7dc6d7c3a32385c85f, not stripped ./inplace/lib/bin/hsc2hs: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld- linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=a532a7cc6f0c1e95e7c66aab2b4c53e1d0b58d88, not stripped ./inplace/lib/bin/unlit: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld- linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=30ab37170ddcb09bcb7885ae3c18a353f6d128b7, not stripped glaubitz@ikarus:~/debian/ghc/ghc-8.0.1$ }}} Thus, both "unlit" and "hsc2hs" are not built for the target architecture when cross-compiling. After a quick look at utils/unlit/ghc.mk, it becomes obvious why that's the case: {{{ $(eval $(call build-prog,utils/unlit,dist,0)) }}} Would it be possible to change the build configuration such that "unlit" and "hsc2hs" are built for the target as well when cross-compiling? That would be great :). Adrian [1] [https://buildd.debian.org/status/fetch.php?pkg=haskell- fmlist&arch=m68k&ver=0.9-4&stamp=1465990971] -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12193 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12193: Include target versions of unlit and hsc2hs when cross-compiling -------------------------------------+------------------------------------- Reporter: glaubitz | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * owner: => thomie * component: Compiler => Build System * milestone: => 8.0.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12193#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12193: Include target versions of unlit and hsc2hs when cross-compiling -------------------------------------+------------------------------------- Reporter: glaubitz | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Build System | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by glaubitz): Ok, just to avoid confusion: Running "make install" will actually install the proper target version of "hsc2hs". I actually confused "hsc2hs" with "hp2ps" which has the same problem as "unlit", i.e. it will be built as a host binary instead of a target binary. Adrian -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12193#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12193: Include target versions of unlit and hsc2hs when cross-compiling -------------------------------------+------------------------------------- Reporter: glaubitz | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Build System | Version: 8.0.1 Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by erikd): * keywords: => cross-compile * cc: erikd (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12193#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12193: Include target versions of unlit and hsc2hs when cross-compiling -------------------------------------+------------------------------------- Reporter: glaubitz | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: 8.0.3 Component: Build System | Version: 8.0.1 Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.0.2 => 8.0.3 Comment: thomie, has there been any progress on this? In any event it doesn't seem likely that this will happen for 8.0.2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12193#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12193: Include target versions of unlit and hsc2hs when cross-compiling -------------------------------------+------------------------------------- Reporter: glaubitz | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: 8.0.3 Component: Build System | Version: 8.0.1 Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by glaubitz): Please note, the same change must be introduced for ''hp2ps'' as well. See this bug report I just filed in Debian regarding cross-compilation [1]. It lists all the remaining tiny issues to resolve before cross- compiling GHC works out of the box.
[1] [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853285]
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12193#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12193: Include target versions of unlit and hsc2hs when cross-compiling -------------------------------------+------------------------------------- Reporter: glaubitz | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Build System | Version: 8.0.1 Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14501 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * related: => #14501 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12193#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC