You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Imported from Trac #850, reported by @dankna on 2011-05-27)
When configuring a library or executable which has specified a C header with includes: in its .cabal file, and that header is actually Objective-C or includes other headers which are, configure fails. This is because of the test that Cabal does to determine whether all prerequisite C libraries are present, in which it compiles with gcc directly rather than going through the Haskell compiler as it does in the build phase.
I'm working on a patch to this and should have it in about an hour.
The text was updated successfully, but these errors were encountered:
It occurs to me trying to solve this that it's actually a hard problem. Passing the -x <language> flag to gcc is the easy part, but in the general case the header file could be C, ObjC, C++, or even ObjC++. There's no way for Cabal to infer which it is, since it has the same extension, .h, in all four cases.
I see two approaches. One would be to have the package author pass the information in the .cabal file somehow. The drawback is that it's not really clear what a good interface would be. The other would be to try to autodetect it after all somehow, perhaps by getting gcc to spit out dependency information to see what source files (which /can/ have their languages inferred by their filenames) includes what header files.
This ticket doesn't have any activity since 2011, and the patch that was sent is not attached. I propose closing - please re-open or create a new ticket if this is still desired.
(Imported from Trac #850, reported by @dankna on 2011-05-27)
When configuring a library or executable which has specified a C header with includes: in its .cabal file, and that header is actually Objective-C or includes other headers which are, configure fails. This is because of the test that Cabal does to determine whether all prerequisite C libraries are present, in which it compiles with gcc directly rather than going through the Haskell compiler as it does in the build phase.
I'm working on a patch to this and should have it in about an hour.
The text was updated successfully, but these errors were encountered: