[Hackage] #189: Handle framework paths (-F) in Cabal

Hackage trac at galois.com
Sat Jan 5 14:20:55 EST 2008

#189: Handle framework paths (-F) in Cabal
  Reporter:  guest          |        Owner:         
      Type:  enhancement    |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:
  Severity:  normal         |   Resolution:         
  Keywords:                 |   Difficulty:  normal 
Ghcversion:  6.8.2          |     Platform:  Mac OS 
Comment (by guest):

 Replying to [comment:3 duncan]:
 > I don't know much about frameworks, could someone tell me:

 Briefly: A framework is a directory ending in `.framework` which stores
 the header and object files associated with a library.  Saying
 `"-framework GNUreadline"` is like saying `"-lreadline"`.  Saying
 `"-F$HOME/Library/Frameworks"` is like saying `"-I$HOME/includes
 -L$HOME/lib"` .

 >  1. How are framework paths supposed to be found generally?
 >  1. Are their locations fixed or do their location vary from one machine
 to the next?

 The frameworks themselves are found automatically by `gcc` and `ld`, as
 long as they're stored in either `/System/Library/Frameworks` (for Apple's
 use only) or `/Library/Frameworks` (for user-installed frameworks).
 Sometimes they are stored in other standard locations:
  - $HOME/Library/Frameworks (if you don't have administrator access)
  - /Network/Library/Frameworks (if the framework should be shared by
 several users on a network)

 The problem is that the compiler and linker don't search those folders by
 default (although the runtime dynamic loader does).  So calling `gcc` with
 `-F$HOME/Library/Frameworks` tells it to search that folder for any
 required frameworks.

 Another reason to use a nonstandard location is testing a build against a
 new version of a framework.

 >  1. Are frameworks versioned?
 Yes, and you can distribute one framework which contains multiple
 versions.  The technical details are at

 >  1. Can we find frameworks at configure time rather than failing at link
 > If framework paths vary from one machine to another then putting
 "framework-dirs:" in the .cabal file would not make a lot of sense. If
 they cannot be found automatically and require extra information from the
 user then perhaps it should be a configure option.

 As I said above, the `-F` flag is the equivalent of the `-I` and `-L`
 flags.  So I think that `framework-dirs` should be in the `cabal` file
 just like `include-dirs` and `extra-lib-dirs` are.


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

More information about the cabal-devel mailing list