[GHC] #8618: can't load .so/.DLL

#8618: can't load .so/.DLL -----------------------------------+--------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (NCG) | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time crash Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- This happens in a fresh sandbox: {{{ % cabal install uniplate -j Resolving dependencies... Configuring syb-0.4.1... Configuring text-1.0.0.0... Building syb-0.4.1... Building text-1.0.0.0... Installed syb-0.4.1 Installed text-1.0.0.0 Configuring hashable-1.2.1.0... Building hashable-1.2.1.0... Installed hashable-1.2.1.0 Configuring unordered-containers-0.2.3.3... Building unordered-containers-0.2.3.3... Installed unordered-containers-0.2.3.3 Configuring uniplate-1.6.12... Building uniplate-1.6.12... Failed to install uniplate-1.6.12 Last 10 lines of the build log ( /home/feuerbach/.cabal/logs/uniplate-1.6.12.log ): Preprocessing library uniplate-1.6.12... [ 1 of 21] Compiling Data.Generics.Uniplate.Data.Instances ( Data/Generics/Uniplate/Data/Instances.hs, dist/build/Data/Generics/Uniplate/Data/Instances.o ) [ 2 of 21] Compiling Data.Generics.Uniplate.Internal.Utils ( Data/Generics/Uniplate/Internal/Utils.hs, dist/build/Data/Generics/Uniplate/Internal/Utils.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.5.0.0 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package text-1.0.0.0 ... <command line>: can't load .so/.DLL for: libHStext-1.0.0.0.so (libHStext-1.0.0.0.so: cannot open shared object file: No such file or directory) cabal: Error: some packages failed to install: uniplate-1.6.12 failed during the building phase. The exception was: ExitFailure 1 }}} I have shared: False in cabal.config, so it's not surprising that libHStext-1.0.0.0.so is not found. What is surprising is that it's needed. uniplate doesn't use TemplateHaskell, from what I can tell. This is GHC 7.7.20131217. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL ---------------------------------------+----------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (NCG) | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by carter): What OS and Arch is this? Why do you have shared disabled? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL ---------------------------------------+----------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (NCG) | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by Feuerbach): {{{ % uname -a Linux sniper 3.11-2-686-pae #1 SMP Debian 3.11.8-1 (2013-11-13) i686 GNU/Linux }}} "shared: False" is from some older times when ghc actually had problems with dynamic linking. I already switched to "shared: True", but I thought I'd still report the issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL ---------------------------------------+----------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (NCG) | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by nushio): I hit the same issue while installing {{{singletons}}} package using GHC 7.7.20131217 on {{{ Linux nusid 3.8-2-amd64 #1 SMP Debian 3.8.13-1 x86_64 GNU/Linux }}} The tail of the installation message was: {{{ Loading package mtl-2.1.2 ... <command line>: can't load .so/.DLL for: libHSmtl-2.1.2.so (libHSmtl-2.1.2.so: cannot open shared object file: No such file or directory) Failed to install singletons-0.9.3 cabal: Error: some packages failed to install: singletons-0.9.3 failed during the building phase. The exception was: ExitFailure 1 }}} The temporal solution to this was (as hinted by Feuerbach) to set {{{shared: True}}} in my {{{~/.cabal/config}}} file, and then to {{{cabal install mtl --force-reinstall --reinstall }}} . -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 (NCG) | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Compile- | Related Tickets: time crash | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by thomie): This problem still exists in `7.8.3.20141105`. Set `shared: False` in `~/.cabal/config` and try to install `singletons==1.0`. I'm not able to reproduce with GHC HEAD, because of an unrelated issue with th-desugar: https://github.com/goldfirere/th-desugar/issues/17. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Compile- | Blocked By: time crash | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * component: Compiler (NCG) => Compiler -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 (Linking) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => invalid Comment: This turned out to be a problem in `uniplate`. I submitted a pull request here: https://github.com/ndmitchell/uniplate/pull/15. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 (Linking) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Feuerbach): From the pull request:
To be honest, I don't understand in detail why my patch fixes it.
Why do you think it's a bug in uniplate and not in ghc? Perhaps the change you propose simply avoid the ghc bug that is still there? (I haven't studied the patch carefully, but it looks somewhat cryptic.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 (Linking) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): What is cryptic about it? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 (Linking) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): From compiler/specialise/SpecConstr.hs: {{{ Note [Forcing specialisation] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ With stream fusion and in other similar cases, we want to fully specialise some (but not necessarily all!) loops regardless of their size and the number of specialisations. We allow a library to do this, in one of two ways (one which is deprecated): 1) Add a parameter of type GHC.Types.SPEC (from ghc-prim) to the loop body. 2) (Deprecated) Annotate a type with ForceSpecConstr from GHC.Exts, and then add *that* type as a parameter to the loop body The reason #2 is deprecated is because it requires GHCi, which isn't available for things like a cross compiler using stage1. }}} So it goes something like this: * uniplate used `ForceSpecConstr` somewhere * `ForceSpecConstr` requires GHCi to run * since ghc-7.8, GHCi requires shared libraries to be built * `shared:false` disables building shared libraries * error I changed `uniplate` to use `GHC.Types.SPEC` instead of `ForceSpecConstr`, as suggested by that `Note`. I don't think I am covering up a bug in GHC here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 (Linking) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Feuerbach): Now this is very clear, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8618: can't load .so/.DLL -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 (Linking) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): Thanks for keeping me honest :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8618#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC