
#700: seemingly too liberal behaviour on overlapping dependency constraints across packages ---------------------------------+------------------------------------------ Reporter: kowey | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.3 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Comment(by duncan): Replying to [comment:5 mornfall]:
As for solution 1, is there a way to use C finalizers without having C code (and C symbols)?
I don't think so.
Would solution 2 involve manual renaming of all C symbols in each version? (That is quite inconvenient and error-prone...)
To do it sensibly you'd want to use a CPP macro to construct the C function name. The macro would depend on a CPP symbol which you'd define to the package name and version. That define would have to be generated by the Setup.hs.
The C functions are supposed to be private, so maybe a hiding solution would work better? Is that doable with current Cabal?
I don't think that's trivial to implement outside of Cabal. It'd involve linking objects together using `ld -r -x` to get one .o file with all internal symbols hidden. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/700#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects