[GHC] #13818: ANN pragmas and -static fails to compile if dynamic library unavailable

GHC ghc-devs at haskell.org
Mon Jun 12 18:20:23 UTC 2017


#13818: ANN pragmas and -static fails to compile if dynamic library unavailable
-------------------------------------+-------------------------------------
        Reporter:  duog              |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1-rc2
      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:                    |
-------------------------------------+-------------------------------------
Description changed by duog:

@@ -17,1 +17,1 @@
- ghc-7.10.3-packages.conf.d  -package transformers-compat -c Bug.hs
+ ghc-8.2.0.20170522-packages.conf.d  -package transformers-compat -c Bug.hs

New description:

 A Haskell source file with an ANN pragma will fail to compile with -static
 if any packages do not have dynamic libraries installed.

 Reproduction:
 {{{
 $ echo "module Bug where {-# ANN module \"just a string\" #-}" > Bug.hs
 $ cabal sandbox init
 $ cabal install transformers-compat --disable-shared
 $ ghc -static -package db ./.cabal-sandbox/x86_64-linux-
 ghc-8.2.0.20170522-packages.conf.d  -package transformers-compat -c Bug.hs
 <command line>: can't load .so/.DLL for: libHStransformers-
 compat-0.5.1.4-DQiwI4tzfvoKHf8rERr8Q2.so (libHStransformers-
 compat-0.5.1.4-DQiwI4tzfvoKHf8rERr8Q2.so: cannot open shared object file:
 No such file or directory)
 $ cabal install transformers-compat --enable-shared --reinstall
 $ ghc -static -package db ./.cabal-sandbox/x86_64-linux-
 ghc-8.2.0.20170522-packages.conf.d  -package transformers-compat -c Bug.hs
 -fforce-recomp
 }}}
 Presumably the ANN pragma causes ghci to load with all libraries which
 must be dynamic.

 Not sure which category is correct for Type of failure.

--

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13818#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list