Reputation: 1402
When trying to compile the gtk Haskell package with ghc-7.6.1, I get the following error (when trying to build pango, one of the dependencies, but it also occurs in other dependency packages if I try to install them manually):
[ 1 of 14] Compiling Graphics.Rendering.Pango.Types ( dist/build/Graphics/Rendering/Pango/Types.hs, dist/build/Graphics/Rendering/Pango/Types.o )
Graphics/Rendering/Pango/Types.chs:249:1:
Unacceptable result type in foreign declaration: CULong
When checking declaration:
foreign import ccall unsafe "static pango_context_get_type" pango_context_get_type
:: CULong
I previously installed an older version of gtk2hs, and so this occurs during an upgrade.
How can I fix the error?
Upvotes: 4
Views: 376
Reputation: 1402
This problem occurs if you have old versions of the gtk2hs-buildtools installed, which don't work with newer versions of ghc. The solution is to update your gtk2hs-buildtools package before continuing with the update:
sudo cabal install --reinstall gtk2hs-buildtools
Upvotes: 5