[Hackage] #584: adding arbitrary .o files to the static archive

Hackage trac at galois.com
Tue Sep 15 17:22:40 EDT 2009

#584: adding arbitrary .o files to the static archive
  Reporter:  wisnesky       |        Owner:         
      Type:  enhancement    |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:
  Severity:  normal         |     Keywords:         
Difficulty:  unknown        |   Ghcversion:         
  Platform:                 |  
 Cabal's Simple build system does not currently provide any mechanism
 for adding arbitrary .o files into the static archive and similarly no
 way to link one static archive with another. The only builtin mechanism
 is to compile C code (specified by the "c-sources" field) and that gets
 included into the same static archive as the Haskell library.  I would
 like to request this feature.  Here is a more detailed description:

 Adding an extra-libraries field to a cabal source package description:
 Name: LibraryFoo
  Extra-libraries:  Bar
 has the effect that when loading package LibraryFoo in ghci, ghci will
 necessarily try to open a corresponding Bar.so/.dll/.dylib file:
 > ghci -package LibraryFoo
 Loading package LibraryFoo-0.1 ... <command line>: can't load .so/.DLL
 for: Bar (dlopen(Bar.dylib, 10): image not found)
 What I want to do is statically link LibraryFoo against Bar before Cabal
 installs the package, (so that, for instance, I can run ghci without a
 bunch of command line linking arguments and don't need to have Bar around
 anymore), and I have a Bar.o file for just such a purpose.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/584>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list