[Hackage] #852: Not possible to #include "*_stub.h" from C code

#852: Not possible to #include "*_stub.h" from C code ----------------------------+----------------------------------------------- Reporter: dankna | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Cabal doesn't make it possible to #include "*_stub.h" files from C code, because those files have not yet been generated at the time that it wants to check for their existence, which is during "cabal configure". At first I was going to ask for advice because I didn't really see a solution, but now that I think about it, I think correct behavior is to omit the check for whether stub files exist and compile, but to check for the existence of files which /could/ generate them, which is to say, are Haskell files and match the module portion of the name. So I'll implement that. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/852 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#852: Not possible to #include "*_stub.h" from C code ----------------------------+----------------------------------------------- Reporter: dankna | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by dankna): Okay, so yeah, upon doing more work I found that this is a regression I caused myself, with my patch for #850. I still think I can fix it. Still working... -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/852#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#852: Not possible to #include "*_stub.h" from C code ----------------------------+----------------------------------------------- Reporter: dankna | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Changes (by dankna): * type: defect => enhancement Comment: Okay so I fixed the regression (patch sent) but it's still not possible, for the deeper reason that C sources are all compiled before any Haskell sources. To fix this I think I should wait for feedback, because it would involve computing the full dependency graph and ordering it. I'm going to change this from "defect" to "enhancement". -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/852#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#852: Not possible to #include "*_stub.h" from C code ----------------------------+----------------------------------------------- Reporter: dankna | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by dankna): Implemented this per our discussion: C source is now built after Haskell source but before final linking, so that the C sources can find the *_stub.h files generated by the Haskell compilations. Patch sent with darcs send. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/852#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#852: Not possible to #include "*_stub.h" from C code ----------------------------+----------------------------------------------- Reporter: dankna | Owner: dankna Type: enhancement | Status: assigned Priority: normal | Milestone: Component: Cabal library | Version: 1.8.0.6 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Changes (by dankna): * owner: => dankna * status: new => assigned -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/852#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage