[GHC] #2021: let ghc find framework header files and link with frameworks located in $HOME/Library/Frameworks

GHC trac at galois.com
Mon Jan 14 15:08:05 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 igloo):

 If you think a deadline will help focus discussion, and hopefully reach a
 concensus that either the patch should be applied or that it should not,
 then please do feel free to propose one. All I meant in my earlier comment
 was that the impression I had was that more discussion was needed.

 How does this bug/patch relate to this patch, already in the HEAD and 6.8
 branch, by the way?:
 {{{
 [Include ~/Library/Frameworks in the framework searchpath
 Ian Lynagh <igloo at earth.li>**20071217233457
  Patch from Christian Maeder
 ] {
 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
 +        ; let homeFrameworkPath = case either_dir of
 +                                  Left _ -> []
 +                                  Right dir -> [dir ++
 "/Library/Frameworks"]
 +              ps = extraPaths ++ homeFrameworkPath ++
 defaultFrameworkPaths
 +        ; mb_fwk <- findFile mk_fwk ps
 +        ; 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
 hunk ./compiler/ghci/Linker.lhs 1145
 -   -- sorry for the hardcoded paths, I hope they won't change anytime
 soon:
 +        -- sorry for the hardcoded paths, I hope they won't change
 anytime soon:
 }
 }}}

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


More information about the Glasgow-haskell-bugs mailing list