Bad interface problem.

Hi, This had never happened to me. And I have no idea what to do. $ cabal --upgrade-dependencies --enable-documentation --force-reinstalls --solver=topdown QuickCheck-2.5 Test/QuickCheck/All.hs:15:1: Bad interface file: /home/magicloud/.cabal/lib/template-haskell-2.6.0.0/ghc-7.4.2/Language/Haskell/TH.hi Something is amiss; requested module template-haskell-2.6.0.0:Language.Haskell.TH differs from name found in the interface file template-haskell:Language.Haskell.TH $ cabal --version cabal-install version 0.15.0 using version 1.15.0 of the Cabal library -- 竹密岂妨流水过 山高哪阻野云飞 And for G+, please use magiclouds#gmail.com.

On 12-07-03 04:19 AM, Magicloud Magiclouds wrote:
$ cabal --upgrade-dependencies --enable-documentation --force-reinstalls --solver=topdown QuickCheck-2.5 Test/QuickCheck/All.hs:15:1: Bad interface file: /home/magicloud/.cabal/lib/template-haskell-2.6.0.0/ghc-7.4.2/Language/Haskell/TH.hi Something is amiss; requested module template-haskell-2.6.0.0:Language.Haskell.TH differs from name found in the interface file template-haskell:Language.Haskell.TH
I think things are so messed up that it is time to clean out everything. See my http://www.vex.net/~trebla/haskell/sicp.xhtml#remove In fact, time to read the whole article and avoid unsafe re-installs and "upgrades".

I cleaned out everything, no luck....
On Fri, Jul 6, 2012 at 2:14 AM, Albert Y. C. Lai
On 12-07-03 04:19 AM, Magicloud Magiclouds wrote:
$ cabal --upgrade-dependencies --enable-documentation --force-reinstalls --solver=topdown QuickCheck-2.5 Test/QuickCheck/All.hs:15:1: Bad interface file:
/home/magicloud/.cabal/lib/template-haskell-2.6.0.0/ghc-7.4.2/Language/Haskell/TH.hi Something is amiss; requested module template-haskell-2.6.0.0:Language.Haskell.TH differs from name found in the interface file template-haskell:Language.Haskell.TH
I think things are so messed up that it is time to clean out everything. See my http://www.vex.net/~trebla/haskell/sicp.xhtml#remove
In fact, time to read the whole article and avoid unsafe re-installs and "upgrades".
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- 竹密岂妨流水过 山高哪阻野云飞 And for G+, please use magiclouds#gmail.com.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On 11/07/12 05:51, Magicloud Magiclouds wrote:
I cleaned out everything, no luck....
On Fri, Jul 6, 2012 at 2:14 AM, Albert Y. C. Lai
wrote: On 12-07-03 04:19 AM, Magicloud Magiclouds wrote:
template-haskell-2.6.0.0:Language.Haskell.TH differs from name found in the interface file template-haskell:Language.Haskell.TH
You installed a bad template-haskell version. You can only use a version corresponding to your ghc version. I had a similar problem recently. My solution process was as follows: 1. check which template-haskell version came with my ghc: $ ghc -V The Glorious Glasgow Haskell Compilation System, version 7.4.2 $ ghc-pkg list template-haskell /home/claude/opt/lib/ghc-7.4.2/package.conf.d template-haskell-2.7.0.0 /home/claude/.ghc/x86_64-linux-7.4.2/package.conf.d $ 2. make sure to forbid every other version of template-haskell (because it will break horribly, as you found): $ cabal install --constraint='template-haskell==2.7.0.0' foo 3. if foo fails to install because it thinks it needs a different version of template-haskell, try adjusting dependencies in foo.cabal 4. if foo installs and works with the adjusted dependencies, let the maintainer know
I think things are so messed up that it is time to clean out everything. See my http://www.vex.net/~trebla/haskell/sicp.xhtml#remove
In fact, time to read the whole article and avoid unsafe re-installs and "upgrades".
It's a good read for sure! Perhaps it could be updated to add a problem I ran into recently: "cabal install --solver=modular --avoid-reinstalls" sounds perfect, if sicp.xhtml scared you properly. But excessively avoiding reinstalls is bad, as cabal-install seems to install a different allowable version instead. The result for me was horrible diamond dependency problems - half my packages were built with one version of mtl/transformers, and the other half with a different version of mtl/transformers. When I then tried to ghci using some modules from both halves of my installed packages, I got very very confusing type errors complaining about almost-identical-looking types not being identical. Claude -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJP/RBbAAoJEHZDo4jueIiW164IALlHcaauJX2AjBZTDExU0mKC wlH+dIbaKkl8H1IMIXQnWSX0GxFGMsbPTdBXf/BC2CMXTcSJr8YMiyKewMAs734g DijNU/x/nQlcVruOk1c8EAijIKs938vT3dF0j863+afMAA+cRWlyLWfV50Y7AIG6 4hF0Fr5Q73GwonFzTXuX+iWLxBL1i2jXgPjKJvNTJZr+iGn5txCj+6ZpJyfIXaaw PZtQrnX/37vQ/ctbKsnDqRQI27/ENJyW3zm76Gax47EIpMvL8fHzEg8IpyR9/eR8 8ZfGKYNA1EsARHT3KS6pBPsVQdhn/qYInVZ5NYQ1r/kd9D6nqoy5pETdz3z/23Y= =Rzob -----END PGP SIGNATURE-----

I am using ghc 7.4.2 which includes template-haskell-2.7.0.0.
When I installed QuickCheck-2.5, it requires template-haskell-2.6.0.0.
Even I removed all user space packages, the error was still. I think
it is a ghc pkg problem, that every package register itself as
package:function while ghc (or cabal?) required
package-version:function.
But --constraint='template-haskell-2.7.0.0' did make it compiled.
On Wed, Jul 11, 2012 at 1:34 PM, Claude Heiland-Allen
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
On 11/07/12 05:51, Magicloud Magiclouds wrote:
I cleaned out everything, no luck....
On Fri, Jul 6, 2012 at 2:14 AM, Albert Y. C. Lai
wrote: On 12-07-03 04:19 AM, Magicloud Magiclouds wrote:
template-haskell-2.6.0.0:Language.Haskell.TH differs from name found in the interface file template-haskell:Language.Haskell.TH
You installed a bad template-haskell version. You can only use a version corresponding to your ghc version.
I had a similar problem recently. My solution process was as follows:
1. check which template-haskell version came with my ghc:
$ ghc -V The Glorious Glasgow Haskell Compilation System, version 7.4.2 $ ghc-pkg list template-haskell /home/claude/opt/lib/ghc-7.4.2/package.conf.d template-haskell-2.7.0.0 /home/claude/.ghc/x86_64-linux-7.4.2/package.conf.d $
2. make sure to forbid every other version of template-haskell (because it will break horribly, as you found):
$ cabal install --constraint='template-haskell==2.7.0.0' foo
3. if foo fails to install because it thinks it needs a different version of template-haskell, try adjusting dependencies in foo.cabal
4. if foo installs and works with the adjusted dependencies, let the maintainer know
I think things are so messed up that it is time to clean out everything. See my http://www.vex.net/~trebla/haskell/sicp.xhtml#remove
In fact, time to read the whole article and avoid unsafe re-installs and "upgrades".
It's a good read for sure! Perhaps it could be updated to add a problem I ran into recently:
"cabal install --solver=modular --avoid-reinstalls" sounds perfect, if sicp.xhtml scared you properly. But excessively avoiding reinstalls is bad, as cabal-install seems to install a different allowable version instead. The result for me was horrible diamond dependency problems - half my packages were built with one version of mtl/transformers, and the other half with a different version of mtl/transformers.
When I then tried to ghci using some modules from both halves of my installed packages, I got very very confusing type errors complaining about almost-identical-looking types not being identical.
Claude -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux)
iQEcBAEBAgAGBQJP/RBbAAoJEHZDo4jueIiW164IALlHcaauJX2AjBZTDExU0mKC wlH+dIbaKkl8H1IMIXQnWSX0GxFGMsbPTdBXf/BC2CMXTcSJr8YMiyKewMAs734g DijNU/x/nQlcVruOk1c8EAijIKs938vT3dF0j863+afMAA+cRWlyLWfV50Y7AIG6 4hF0Fr5Q73GwonFzTXuX+iWLxBL1i2jXgPjKJvNTJZr+iGn5txCj+6ZpJyfIXaaw PZtQrnX/37vQ/ctbKsnDqRQI27/ENJyW3zm76Gax47EIpMvL8fHzEg8IpyR9/eR8 8ZfGKYNA1EsARHT3KS6pBPsVQdhn/qYInVZ5NYQ1r/kd9D6nqoy5pETdz3z/23Y= =Rzob -----END PGP SIGNATURE-----
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- 竹密岂妨流水过 山高哪阻野云飞 And for G+, please use magiclouds#gmail.com.

On Wed, Jul 11, 2012 at 5:28 AM, Magicloud Magiclouds < magicloud.magiclouds@gmail.com> wrote:
Even I removed all user space packages, the error was still. I think it is a ghc pkg problem, that every package register itself as package:function while ghc (or cabal?) required package-version:function.
That's not the problem, it's the symptom. Package symbols are always versioned; ghc only shows the version when it's the only way to disambiguate symbols. So when it shows you a conflict where one is versioned and the other isn't, you have multiple versions of a package installed.
But --constraint='template-haskell-2.7.0.0' did make it compiled.
And that's how you prevent it. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

But why it does not occur on other installation?
And Albert, I did not directly install QuickCheck. It was required by yesod.
On Wed, Jul 11, 2012 at 10:55 PM, Brandon Allbery
On Wed, Jul 11, 2012 at 5:28 AM, Magicloud Magiclouds
wrote: Even I removed all user space packages, the error was still. I think it is a ghc pkg problem, that every package register itself as package:function while ghc (or cabal?) required package-version:function.
That's not the problem, it's the symptom. Package symbols are always versioned; ghc only shows the version when it's the only way to disambiguate symbols.
So when it shows you a conflict where one is versioned and the other isn't, you have multiple versions of a package installed.
But --constraint='template-haskell-2.7.0.0' did make it compiled.
And that's how you prevent it.
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
-- 竹密岂妨流水过 山高哪阻野云飞 And for G+, please use magiclouds#gmail.com.

On 12-07-11 09:28 PM, Magicloud Magiclouds wrote:
And Albert, I did not directly install QuickCheck. It was required by yesod.
I can't reproduce that dependency either. Output of "cabal install --dry-run yesod" does not contain QuickCheck or template-haskell. I do not have QuickCheck installed. Resolving dependencies... In order, the following would be installed (use -v for more details): SHA-1.5.1 ansi-terminal-0.5.5 attoparsec-0.10.2.0 base-unicode-symbols-0.2.2.4 base64-bytestring-0.1.2.0 blaze-builder-0.3.1.0 blaze-markup-0.5.1.0 blaze-html-0.5.0.0 byteorder-1.0.3 cereal-0.3.5.2 cpu-0.1.1 css-text-0.1.1 dlist-0.5 data-default-0.4.0 cookie-0.4.0 entropy-0.2.1 enumerator-0.4.19 attoparsec-enumerator-0.3 asn1-data-0.6.1.3 failure-0.2.0.1 fast-logger-0.0.2 hashable-1.1.2.3 case-insensitive-0.4.0.1 http-types-0.6.11 largeword-1.0.2 mime-mail-0.4.1.1 path-pieces-0.1.1 pem-0.1.1 primitive-0.4.1 ranges-0.2.4 email-validate-0.2.8 regex-base-0.93.2 regex-posix-0.95.2 regex-compat-0.95.1 safe-0.3.3 semigroups-0.8.3.2 shakespeare-1.0.0.2 hamlet-1.0.1.4 shakespeare-css-1.0.1.2 shakespeare-i18n-1.0.0.2 shakespeare-js-1.0.0.3 shakespeare-text-1.0.0.2 simple-sendfile-0.2.4 socks-0.4.1 stm-2.4 stringsearch-0.3.6.3 syb-0.3.7 system-filepath-0.4.6 tagged-0.4.2.1 crypto-api-0.10.2 crypto-pubkey-types-0.1.1 certificate-1.2.3 cryptohash-0.7.5 pureMD5-2.1.0.3 pwstore-fast-2.2 skein-0.1.0.7 tagsoup-0.12.6 transformers-base-0.4.1 monad-control-0.3.1.4 lifted-base-0.1.1.1 resourcet-0.3.3.1 unix-compat-0.3.0.1 unordered-containers-0.2.1.0 utf8-string-0.3.7 vault-0.2.0.0 vector-0.9.1 aeson-0.6.0.2 cryptocipher-0.3.5 cprng-aes-0.2.3 clientsession-0.7.5 resource-pool-0.2.1.0 pool-conduit-0.1.0.2 tls-0.9.6 tls-extra-0.4.6 void-0.5.6 conduit-0.4.2 attoparsec-conduit-0.4.0.1 blaze-builder-conduit-0.4.0.2 network-conduit-0.4.0.1 persistent-0.9.0.4 persistent-template-0.9.0.2 wai-1.2.0.3 wai-logger-0.1.4 warp-1.2.2 xml-types-0.3.2 xml-conduit-0.7.0.3 xss-sanitize-0.3.2 yesod-routes-1.0.1.2 zlib-bindings-0.1.0.1 zlib-conduit-0.4.0.2 http-conduit-1.4.1.10 authenticate-1.2.1.1 wai-extra-1.2.0.5 yesod-core-1.0.1.3 yesod-json-1.0.1.0 yesod-persistent-1.0.0.1 yesod-form-1.0.0.4 yesod-auth-1.0.2.1 yesod-1.0.1.6

On 12-07-11 05:28 AM, Magicloud Magiclouds wrote:
I am using ghc 7.4.2 which includes template-haskell-2.7.0.0. When I installed QuickCheck-2.5, it requires template-haskell-2.6.0.0. Even I removed all user space packages, the error was still.
Cannot reproduce. I start with ubuntu 11.04 x86 32-bit, fresh ghc 7.4.2 (linux x86 32-bit), fresh cabal-install 0.14: $ cabal install --dry-run QuickCheck Resolving dependencies... In order, the following would be installed (use -v for more details): QuickCheck-2.5 No pulling in template-haskell-2.6.0.0.
participants (4)
-
Albert Y. C. Lai
-
Brandon Allbery
-
Claude Heiland-Allen
-
Magicloud Magiclouds