[GHC] #1931: readline/rlstdc.h not found (and other errors)
when building readline on Mac OS X with framework GNUreadline
GHC
trac at galois.com
Wed Nov 28 13:07:13 EST 2007
#1931: readline/rlstdc.h not found (and other errors) when building readline on
Mac OS X with framework GNUreadline
-------------------------------+--------------------------------------------
Reporter: thorkilnaur | Owner: judah
Type: bug | Status: closed
Priority: normal | Milestone: 6.8.2
Component: libraries (other) | Version: 6.9
Severity: normal | Resolution: duplicate
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Multiple
Os: MacOS X |
-------------------------------+--------------------------------------------
Changes (by thorkilnaur):
* status: new => closed
* resolution: => duplicate
Comment:
Sorry about opening this ticket without investigating more thoroughly:
Having looked at #1798 and #1395, this problem seems better handled under
#1395. In any case I suggest that the basic problem of locating the
readline include files should be solved under Mac OS X by using the gcc -F
option:
{{{
$ man gcc
...
-Fdir
Add the framework directory dir to the head of the list of
directo-
ries to be searched for header files. These directories are
inter-
leaved with those specified by -I options and are scanned in a
left-to-right order.
A framework directory is a directory with frameworks in it. A
framework is a directory with a "Headers" and/or
"PrivateHeaders"
directory contained directly in it that ends in ".framework".
The
name of a framework is the name of this directory excluding the
".framework". Headers associated with the framework are found
in
one of those two directories, with "Headers" being searched
first.
A subframework is a framework directory that is in a
framework's
"Frameworks" directory. Includes of subframework headers can
only
appear in a header of a framework that contains the
subframework,
or in a sibling subframework header. Two subframeworks are
sib-
lings if they occur in the same framework. A subframework
should
not have the same name as a framework, a warning will be issued
if
this is violated. Currently a subframework cannot have
subframe-
works, in the future, the mechanism may be extended to support
this. The standard frameworks can be found in "/Sys-
tem/Library/Frameworks" and "/Library/Frameworks". An example
include looks like "#include <Framework/header.h>", where
Framework
denotes the name of the framework and header.h is found in the
"PrivateHeaders" or "Headers" directory.
...
}}}
I have not looked at Cabal in detail, nor have I figured out how Cabal in
detail is used by the readline package. But it would seem possible to set
up the readline package to use Cabal to perform the necessary checks (it
already checks for a GNUreadline package, this is harmless on non-Mac OS
X'es, hence may be considered portable) and then, depending on the system,
to pass the required -F option to gcc. I don't think ghc has such a direct
option, but something like -optc-FGNUreadline would probably do the trick.
I will take the liberty of actually closing this ticket as a duplicate of
#1395.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1931#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list