[GHC] #2021: let ghc find framework header files and link with
frameworks located in $HOME/Library/Frameworks
GHC
trac at galois.com
Tue Jan 15 04:09:20 EST 2008
#2021: let ghc find framework header files and link with frameworks located in
$HOME/Library/Frameworks
-----------------------------+----------------------------------------------
Reporter: maeder | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.10 branch
Component: Compiler | Version: 6.8.2
Severity: normal | Resolution:
Keywords: | Difficulty: Easy (1 hr)
Testcase: | Architecture: Multiple
Os: MacOS X |
-----------------------------+----------------------------------------------
Comment (by maeder):
Replying to [comment:7 igloo]:
> How does this bug/patch relate to this patch, already in the HEAD and
6.8 branch, by the way?:
[...]
> hunk ./compiler/ghci/Linker.lhs 1132
> - = do { mb_fwk <- findFile mk_fwk (extraPaths ++
defaultFrameworkPaths)
> - ; case mb_fwk of
> - Just fwk_path -> loadDLL fwk_path
> - Nothing -> return (Just "not found") }
> - -- Tried all our known library paths, but dlopen()
> - -- has no built-in paths for frameworks: give up
> + = do { either_dir <- Control.Exception.try getHomeDirectory
did not I use `IO.try`?
The patch in `Linker.lhs` mimics (or tries to mimic) the behaviour of the
dynamic linker and was not disputed. (see end of #1798)
Indeed gcc and ld do not search the home directory for frameworks, I
suppose mainly to avoid producing binaries depending on frameworks that
are not generally available.
Because GMP and GNUreadline frameworks are not generally available, it
makes sense to extend ghc to also search the home directory when building
and avoid the burden for developers to add appropriate options to ghc's
command line manually.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2021#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list