[GHC] #10912: Support for out of the box static linking

#10912: Support for out of the box static linking -------------------------------------+------------------------------------- Reporter: crb002 | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: Package | Version: 7.10.2 system | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- When running in environments like AWS Lambda you don't have access to basic shared libraries Haskell needs like libgmp, libffi. Need good support for static linked libraries of anything included in a basic GHC distribution. https://github.com/commercialhaskell/stack/issues/1032 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10912 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10912: Support for out of the box static linking -------------------------------------+------------------------------------- Reporter: crb002 | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by thomie): Do you want GHC itself to be statically linked against C libraries, or the programs that GHC produces? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10912#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10912: Support for out of the box static linking -------------------------------------+------------------------------------- Reporter: crb002 | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by crb002): Emit static linked binaries, but yes if we wanted to run GHC on AWS Lambda we would need to static link GHC itself. I did this with Ruby1.8 for the BlueGene/L. Biggest pain was link order. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10912#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10912: Support for out of the box static linking -------------------------------------+------------------------------------- Reporter: crb002 | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Comment (by rwbarton): Is `-optl-static` not enough? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10912#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10912: Support for out of the box static linking -------------------------------------+------------------------------------- Reporter: crb002 | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Comment (by crb002): No. You need static versions of the libraries that you bring in. That's a wget from http://libfoo.org/, configure;make; make install for each libfoo.a you are missing in your Haskell dev toolchain. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10912#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10912: Support for out of the box static linking -------------------------------------+------------------------------------- Reporter: crb002 | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Comment (by rwbarton): Well of course ghc is not going to do the wget for you, and this is the ghc bug tracker. To put it another way: What concrete change to ghc are you asking for? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10912#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10912: Support for out of the box static linking -------------------------------------+------------------------------------- Reporter: crb002 | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Comment (by crb002): http://downloads.haskell.org/~ghc/7.10.2/ghc-7.10.2-x86_64-unknown-linux- centos66.tar.bz2 needs to include the static versions of libffi, libgmp, and other standard libraries that GHC links to. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10912#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10912: Support for out of the box static linking -------------------------------------+------------------------------------- Reporter: crb002 | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Package system | Version: 7.10.2 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 L29Ah): Yeah, that would be a nice thing to have. Now ghc build system is pissed given {{{ GhcStage2HcOpts = -optl-static -optl-pthread -static }}} {{{ /home/l29ah/projects/climate/buildroot-musl/output/host/usr/bin/../lib/gcc /arm-buildroot-linux-musleabihf/4.9.3/../../../../arm-buildroot-linux- musleabihf/bin/ld.gold: error: cannot find -lHStransformers-0.4.3.0-ghc7.11.20151108 /home/l29ah/projects/climate/buildroot-musl/output/host/usr/bin/../lib/gcc /arm-buildroot-linux-musleabihf/4.9.3/../../../../arm-buildroot-linux- musleabihf/bin/ld.gold: error: cannot find -lHStemplate- haskell-2.11.0.0-ghc7.11.20151108 /home/l29ah/projects/climate/buildroot-musl/output/host/usr/bin/../lib/gcc /arm-buildroot-linux-musleabihf/4.9.3/../../../../arm-buildroot-linux- musleabihf/bin/ld.gold: error: cannot find -lHSpretty-1.1.2.0-ghc7.11.20151108 /home/l29ah/projects/climate/buildroot-musl/output/host/usr/bin/../lib/gcc /arm-buildroot-linux-musleabihf/4.9.3/../../../../arm-buildroot-linux- musleabihf/bin/ld.gold: error: cannot find -lHSprocess-1.4.0.0-ghc7.11.20151108 … }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10912#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC