[Hackage] #600: Cabal should use -dynamic linking for executable when package configured --enable-shared

Hackage trac at galois.com
Tue Jan 26 09:52:35 EST 2010


#600: Cabal should use -dynamic linking for executable when package configured
--enable-shared
----------------------------+-----------------------------------------------
  Reporter:  juhp           |        Owner:           
      Type:  defect         |       Status:  new      
  Priority:  normal         |    Milestone:  Cabal-1.8
 Component:  Cabal library  |      Version:  HEAD     
  Severity:  normal         |     Keywords:           
Difficulty:  unknown        |   Ghcversion:           
  Platform:  Linux          |  
----------------------------+-----------------------------------------------

Comment(by KrzysztofSkrzetnicki):

 I made a small experiment. I've changed description field for executable.
 It used to be:

 {{{
 executable slayer
   executable: slayer
   hs-source-dirs: src
   ghc-options: -threaded
   main-is: fake_main.hs
   other-modules: Paths_slayer

   extensions: TemplateHaskell, MultiParamTypeClasses,
 FunctionalDependencies,
               ScopedTypeVariables, TypeSynonymInstances, ViewPatterns
 }}}

 Now it's this: (diff: src is exec)
 {{{
 executable slayer
   executable: slayer
   hs-source-dirs: exec
   ghc-options: -threaded
   main-is: fake_main.hs
   other-modules: Paths_slayer
 --  build-depends: slayer

   extensions: TemplateHaskell, MultiParamTypeClasses,
 FunctionalDependencies,
               ScopedTypeVariables, TypeSynonymInstances, ViewPatterns
 }}}
 cabal-install complains now about missing library:
 {{{
 $ cabal install
 Resolving dependencies...
 Configuring slayer-0.3.1...
 Preprocessing library slayer-0.3.1...
 Preprocessing executables for slayer-0.3.1...
 Building slayer-0.3.1...
 Registering slayer-0.3.1...

 exec/fake_main.hs:3:17:
     Could not find module `Slayer.Main':
       It is a member of the hidden package `slayer-0.3.1'.
       Perhaps you need to add `slayer' to the build-depends in your .cabal
 file.
       Use -v to see a list of the files searched for.
 cabal: Error: some packages failed to install:
 slayer-0.3.1 failed during the building phase. The exception was:
 ExitFailure 1
 }}}
 However if I remove comments from {{{build-depends}}} field, I get another
 error:
 {{{
 $ cabal install
 Resolving dependencies...
 cabal: internal error: could not construct a valid install plan.
 The proposed (invalid) plan contained the following problems:
 The following packages are involved in a dependency cycle slayer-0.3.1
 }}}
 I think I saw the ticket about allowing this specific type of cycle to
 appear in .cabal files, but I'm not sure about the details.

 I guess splitting library from executable would work (and specifying
 -dynamic afterwards too), but i'm not going to do this now. I'd rather see
 the bug fixed :-)

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/600#comment:9>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects



More information about the cabal-devel mailing list