Re: [Haskell-cafe] Fwd: hackage compile failure with QuickCheck 2.5

Dear Levent,
unfortunately I am at a loss here. As far as I understand it this
should be fixed in QuickCheck's .cabal file or on Hackage. But I am
not experienced enough to decide.
You best wait for someone else to comment on this. Depending on
template-haskell in your .cabal file is not the way to go as far as I
understand it. But maybe it's a possible work-around in case you
depend on the package being available on Hackage timely.
Regards,
Alexander Foremny
2012/7/17 Levent Erkok
It builds fine locally on my box; but not on hackage. Here's the page: http://hackage.haskell.org/package/sbv-2.2
Thanks for looking into this Alexander, I appreciate your help.
-Levent.
On Tue, Jul 17, 2012 at 9:09 AM, Alexander Foremny
wrote: Which package are you trying to build? Is it a local package that fails to build or something on Hackage? Its .cabal file or at least full dependencies would be of interest.
Regards, Alexander Foremny
2012/7/17 Levent Erkok
: Thanks Alexander. However, I'm not sure how to use the workaround described so I can get hackage to properly compile my package. It sounds like I have to add a "template-haskell >= 2.7.0.0" dependency to my own cabal file, which sounds like the wrong thing to do in the long-run.
Is there something that can be done on the hackage/ghc side to avoid this issue? Or something less drastic than adding a template-haskell dependency on my own package's cabal file?
Thanks,
-Levent.
On Tue, Jul 17, 2012 at 7:31 AM, Alexander Foremny
wrote: Dear Levent,
I think this [1] could be related.
Regards, Alexander Foremny
PS. Sent this to Levent directly. Here's a copy for the mailing list. Sorry for the noise.
[1]
http://haskell.1045720.n5.nabble.com/Bad-interface-problem-td5714184.html
---------- Forwarded message ---------- From: Alexander Foremny
Date: 2012/7/17 Subject: Re: [Haskell-cafe] hackage compile failure with QuickCheck 2.5 To: Levent Erkok Dear Levent,
I think this [1] could be related.
Regards, Alexander Foremny
[1]
http://haskell.1045720.n5.nabble.com/Bad-interface-problem-td5714184.html
2012/7/17 Levent Erkok
: [This message is more appropriate for a hackage mailing list I presume, but that doesn't seem to exist. Let me know if there's a better place to send it.]
I'm having a hackage compile failure for a newly uplodaded package that has a QuickCheck 2.5 dependence. The error message is:
[13 of 13] Compiling Test.QuickCheck.All ( Test/QuickCheck/All.hs, dist/build/Test/QuickCheck/All.o )
Test/QuickCheck/All.hs:15:1: Bad interface file:
/usr/local/tmp/archive/install/lib/template-haskell-2.6.0.0/ghc-7.4.1/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
The full log file is at (search for "Something is a miss" in it):
http://hackage.haskell.org/packages/archive/sbv/2.2/logs/failure/ghc-7.4
Needless to say, I don't see this problem when I compile this package at home with the same compiler (ghc 7.4.1) as hackage is using; also Hackage has a successfully compiled QuickCheck 2.5 package.
Could it be something related to the particular cabal/ghc installation on the hackage server? In particular, I don't understand why it picks template-haskell 2.6.0.0 when there's a newer version (2.7.0.0). As far as I can see, QuickCheck doesn't put an upper limit on its template haskell version dependency.
I'd appreciate any pointers with this. (Googling and questions on the #haskell irc channel didn't help much, unfortunately.)
-Levent.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks Alexander.. Here's the shocker: I just checked that page again ( http://hackage.haskell.org/package/sbv) and now it's mysteriously fine! Hackage must've recompiled the package somehow. Someone watching this thread must've fixed something on the server and triggered a new compile. While I'm happy the problem is now gone, the mystery behind the hackage recompile remains.. Maybe someone can shed some light on how hackage goes about managing the uploads. -Levent. On Tue, Jul 17, 2012 at 9:43 AM, Alexander Foremny < alexanderforemny@gmail.com> wrote:
Dear Levent,
unfortunately I am at a loss here. As far as I understand it this should be fixed in QuickCheck's .cabal file or on Hackage. But I am not experienced enough to decide.
You best wait for someone else to comment on this. Depending on template-haskell in your .cabal file is not the way to go as far as I understand it. But maybe it's a possible work-around in case you depend on the package being available on Hackage timely.
Regards, Alexander Foremny
It builds fine locally on my box; but not on hackage. Here's the page: http://hackage.haskell.org/package/sbv-2.2
Thanks for looking into this Alexander, I appreciate your help.
-Levent.
On Tue, Jul 17, 2012 at 9:09 AM, Alexander Foremny
wrote: Which package are you trying to build? Is it a local package that fails to build or something on Hackage? Its .cabal file or at least full dependencies would be of interest.
Regards, Alexander Foremny
2012/7/17 Levent Erkok
: Thanks Alexander. However, I'm not sure how to use the workaround described so I can get hackage to properly compile my package. It sounds like I have to add a "template-haskell >= 2.7.0.0" dependency to my own cabal
file,
which sounds like the wrong thing to do in the long-run.
Is there something that can be done on the hackage/ghc side to avoid this issue? Or something less drastic than adding a template-haskell dependency on my own package's cabal file?
Thanks,
-Levent.
On Tue, Jul 17, 2012 at 7:31 AM, Alexander Foremny
wrote: Dear Levent,
I think this [1] could be related.
Regards, Alexander Foremny
PS. Sent this to Levent directly. Here's a copy for the mailing list. Sorry for the noise.
[1]
http://haskell.1045720.n5.nabble.com/Bad-interface-problem-td5714184.html
---------- Forwarded message ---------- From: Alexander Foremny
Date: 2012/7/17 Subject: Re: [Haskell-cafe] hackage compile failure with QuickCheck 2.5
To: Levent Erkok
Dear Levent,
I think this [1] could be related.
Regards, Alexander Foremny
[1]
http://haskell.1045720.n5.nabble.com/Bad-interface-problem-td5714184.html
2012/7/17 Levent Erkok
: [This message is more appropriate for a hackage mailing list I presume, but that doesn't seem to exist. Let me know if there's a better place
to
send it.]
I'm having a hackage compile failure for a newly uplodaded package that has a QuickCheck 2.5 dependence. The error message is:
[13 of 13] Compiling Test.QuickCheck.All ( Test/QuickCheck/All.hs, dist/build/Test/QuickCheck/All.o )
Test/QuickCheck/All.hs:15:1: Bad interface file:
/usr/local/tmp/archive/install/lib/template-haskell-2.6.0.0/ghc-7.4.1/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
The full log file is at (search for "Something is a miss" in it):
http://hackage.haskell.org/packages/archive/sbv/2.2/logs/failure/ghc-7.4
Needless to say, I don't see this problem when I compile this
at home with the same compiler (ghc 7.4.1) as hackage is using; also Hackage has a successfully compiled QuickCheck 2.5 package.
Could it be something related to the particular cabal/ghc installation on the hackage server? In particular, I don't understand why it picks template-haskell 2.6.0.0 when there's a newer version (2.7.0.0). As far as I can see, QuickCheck doesn't put an upper limit on its template haskell version dependency.
I'd appreciate any pointers with this. (Googling and questions on
2012/7/17 Levent Erkok
: package the #haskell irc channel didn't help much, unfortunately.)
-Levent.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Cabal doesn't play well with version constraints on the template-haskell
package - it doesn't know it can't reinstall template-haskell.
The workaround is to figure out why QuickCheck has version constraints on
template-haskell and solve that problem in the QuickCheck package a
different way - perhaps with CPP conditonal compilation macros - and then
remove the problematic version constraints.
On Jul 17, 2012 11:44 AM, "Alexander Foremny"
Dear Levent,
unfortunately I am at a loss here. As far as I understand it this should be fixed in QuickCheck's .cabal file or on Hackage. But I am not experienced enough to decide.
You best wait for someone else to comment on this. Depending on template-haskell in your .cabal file is not the way to go as far as I understand it. But maybe it's a possible work-around in case you depend on the package being available on Hackage timely.
Regards, Alexander Foremny
It builds fine locally on my box; but not on hackage. Here's the page: http://hackage.haskell.org/package/sbv-2.2
Thanks for looking into this Alexander, I appreciate your help.
-Levent.
On Tue, Jul 17, 2012 at 9:09 AM, Alexander Foremny
wrote: Which package are you trying to build? Is it a local package that fails to build or something on Hackage? Its .cabal file or at least full dependencies would be of interest.
Regards, Alexander Foremny
2012/7/17 Levent Erkok
: Thanks Alexander. However, I'm not sure how to use the workaround described so I can get hackage to properly compile my package. It sounds like I have to add a "template-haskell >= 2.7.0.0" dependency to my own cabal
file,
which sounds like the wrong thing to do in the long-run.
Is there something that can be done on the hackage/ghc side to avoid this issue? Or something less drastic than adding a template-haskell dependency on my own package's cabal file?
Thanks,
-Levent.
On Tue, Jul 17, 2012 at 7:31 AM, Alexander Foremny
wrote: Dear Levent,
I think this [1] could be related.
Regards, Alexander Foremny
PS. Sent this to Levent directly. Here's a copy for the mailing list. Sorry for the noise.
[1]
http://haskell.1045720.n5.nabble.com/Bad-interface-problem-td5714184.html
---------- Forwarded message ---------- From: Alexander Foremny
Date: 2012/7/17 Subject: Re: [Haskell-cafe] hackage compile failure with QuickCheck 2.5
To: Levent Erkok
Dear Levent,
I think this [1] could be related.
Regards, Alexander Foremny
[1]
http://haskell.1045720.n5.nabble.com/Bad-interface-problem-td5714184.html
2012/7/17 Levent Erkok
: [This message is more appropriate for a hackage mailing list I presume, but that doesn't seem to exist. Let me know if there's a better place
to
send it.]
I'm having a hackage compile failure for a newly uplodaded package that has a QuickCheck 2.5 dependence. The error message is:
[13 of 13] Compiling Test.QuickCheck.All ( Test/QuickCheck/All.hs, dist/build/Test/QuickCheck/All.o )
Test/QuickCheck/All.hs:15:1: Bad interface file:
/usr/local/tmp/archive/install/lib/template-haskell-2.6.0.0/ghc-7.4.1/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
The full log file is at (search for "Something is a miss" in it):
http://hackage.haskell.org/packages/archive/sbv/2.2/logs/failure/ghc-7.4
Needless to say, I don't see this problem when I compile this
at home with the same compiler (ghc 7.4.1) as hackage is using; also Hackage has a successfully compiled QuickCheck 2.5 package.
Could it be something related to the particular cabal/ghc installation on the hackage server? In particular, I don't understand why it picks template-haskell 2.6.0.0 when there's a newer version (2.7.0.0). As far as I can see, QuickCheck doesn't put an upper limit on its template haskell version dependency.
I'd appreciate any pointers with this. (Googling and questions on
2012/7/17 Levent Erkok
: package the #haskell irc channel didn't help much, unfortunately.)
-Levent.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Wed, Jul 18, 2012 at 12:14:12AM +0100, Antoine Latter wrote:
Cabal doesn't play well with version constraints on the template-haskell package - it doesn't know it can't reinstall template-haskell.
The workaround is to figure out why QuickCheck has version constraints on template-haskell and solve that problem in the QuickCheck package a different way - perhaps with CPP conditonal compilation macros - and then remove the problematic version constraints.
QuickCheck's constraint is template-haskell >= 2.4, which doesn't explain why cabal wanted to install 2.6.0.0 when 2.7.0.0 was already present. Also, I'd expect --avoid-reinstalls to stop it reinstalling anything, but apparently it doesn't do that with the modular solver.

Hi.
QuickCheck's constraint is template-haskell >= 2.4, which doesn't explain why cabal wanted to install 2.6.0.0 when 2.7.0.0 was already present.
Also, I'd expect --avoid-reinstalls to stop it reinstalling anything, but apparently it doesn't do that with the modular solver.
Assuming the examples you gave are the ones that Hackage actually uses: Is it necessary that Hackage uses an unreleased and older version of cabal-install? I can't really tell right now what the differences between 0.13.3 and 0.14.0 are, but clearly, if the modular solver isn't the default, then there still are significant differences. AFAIK --avoid-reinstalls is completely ignored by the old solver, but *not* by the modular solver. For me, 2.6.0.0 is picked with --avoid-reinstalls *because* 2.7.0.0 is already present, and 2.6.0.0 isn't. In concrete terms, with Cabal-1.14.0, cabal-install-0.14.0 and a ghc-7.4.1-based Haskell Platform installation without further packages: $ cabal install --dry-run sbv Resolving dependencies... In order, the following would be installed: containers-0.5.0.0 (new version) mtl-2.1.2 (new version) strict-concurrency-0.2.4.1 (new package) syb-0.3.7 (new version) template-haskell-2.7.0.0 (reinstall) changes: containers-0.4.2.1 -> 0.5.0.0 QuickCheck-2.5 (new version) sbv-2.2 (new package) Warning: The following packages are likely to be broken by the reinstalls: ghc-7.4.1 haddock-2.10.0 QuickCheck-2.4.2 haskell-platform-2012.2.0.0 Use --force-reinstalls if you want to install anyway. $ cabal install --dry-run sbv --avoid-reinstalls -v Reading available packages... Choosing modular solver. Resolving dependencies... In order, the following would be installed: containers-0.5.0.0 (new version) mtl-2.1.2 (new version) strict-concurrency-0.2.4.1 (new package) syb-0.3.7 (new version) template-haskell-2.6.0.0 (new version) QuickCheck-2.5 (new version) sbv-2.2 (new package) I haven't had time to thoroughly look at this problem, but it currently seems to me like it's triggered by containers-0.5.0.0 and has nothing to do with QuickCheck. The containers package is a dependency of template-haskell. So if containers is upgraded to 0.5, then template-haskell-2.7.0.0 would have to be reinstalled. With --avoid-reinstalls, cabal-install will pick an older template-haskell, not knowing that this will lead to a failure at build time. There's really no other chance, because sbv-2.2 seems to depend on containers-0.5.0.0. With containers being a dependency of GHC core libraries such as template-haskell, there isn't currently a good option to use containers-0.5.0.0 with ghc-7.4. Using --avoid-reinstalls blindly or as a default flag is also unfortunately not a good idea in general. There are simply too many cases where installing older versions of packages (which is often the only thing that helps) is not really the solution you want. That's also the reason why it's not enabled by default. Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com

On Wed, Jul 18, 2012 at 06:50:31AM +0100, Andres Löh wrote:
Using --avoid-reinstalls blindly or as a default flag is also unfortunately not a good idea in general. There are simply too many cases where installing older versions of packages (which is often the only thing that helps) is not really the solution you want. That's also the reason why it's not enabled by default.
I need a combination of flags that I can use blindly with the greatest chance of success. The default doesn't work on packages like this one: % cabal --version cabal-install version 0.14.0 using version 1.14.0 of the Cabal library % cabal install sbv-2.2 Resolving dependencies... In order, the following would be installed: HUnit-1.2.4.3 (new package) containers-0.5.0.0 (new version) random-1.0.1.1 (new package) strict-concurrency-0.2.4.1 (new package) syb-0.3.7 (new package) template-haskell-2.7.0.0 (reinstall) changes: containers-0.4.2.1 -> 0.5.0.0 QuickCheck-2.5 (new package) transformers-0.3.0.0 (new package) mtl-2.1.2 (new package) sbv-2.2 (new package) cabal: The following packages are likely to be broken by the reinstalls: ghc-7.4.1 Use --force-reinstalls if you want to install anyway. So should I be blindly using --force-reinstalls? Each build is in a clean environment, so breaking the installation isn't so serious.

On Wed, Jul 18, 2012 at 10:19 AM, Ross Paterson
On Wed, Jul 18, 2012 at 06:50:31AM +0100, Andres Löh wrote:
Using --avoid-reinstalls blindly or as a default flag is also unfortunately not a good idea in general. There are simply too many cases where installing older versions of packages (which is often the only thing that helps) is not really the solution you want. That's also the reason why it's not enabled by default.
I need a combination of flags that I can use blindly with the greatest chance of success. The default doesn't work on packages like this one:
% cabal --version cabal-install version 0.14.0 using version 1.14.0 of the Cabal library % cabal install sbv-2.2 Resolving dependencies... In order, the following would be installed: HUnit-1.2.4.3 (new package) containers-0.5.0.0 (new version) random-1.0.1.1 (new package) strict-concurrency-0.2.4.1 (new package) syb-0.3.7 (new package) template-haskell-2.7.0.0 (reinstall) changes: containers-0.4.2.1 -> 0.5.0.0 QuickCheck-2.5 (new package) transformers-0.3.0.0 (new package) mtl-2.1.2 (new package) sbv-2.2 (new package) cabal: The following packages are likely to be broken by the reinstalls: ghc-7.4.1 Use --force-reinstalls if you want to install anyway.
I don't think you can install this package on 7.4. As Andres said, it requires containers 0.5, but ghc 7.4's base libraries (in this case, template-haskell) use containers 0.4, and can't be reinstalled. I guess your best bet is to use sbv-2.1, which depends on containers >= 0.3, or to unpack it and see if you can loosen the containers dependency and see if it still works with 0.4 So in short, no combination of flags will work in this case, I think. Failure is the best option. Erik

On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote:
I don't think you can install this package on 7.4. As Andres said, it requires containers 0.5, but ghc 7.4's base libraries (in this case, template-haskell) use containers 0.4, and can't be reinstalled. I guess your best bet is to use sbv-2.1, which depends on containers >= 0.3, or to unpack it and see if you can loosen the containers dependency and see if it still works with 0.4
I'm talking about unattended automated builds, so tweaking isn't an option. On the other hand breaking the package environment isn't so bad, because I'm throwing it away after each build.
So in short, no combination of flags will work in this case, I think. Failure is the best option.
Actually --force-reinstalls does work in this case, and this thread began with Levent being unhappy with the failure option for his package, so I'm tempted to use that flag on all hackage builds.

Is there any reason QuickCheck specifically requires containers >= 0.5?
Perhaps its lower bound could be relaxed.
On Wed, Jul 18, 2012 at 11:29 AM, Ross Paterson
On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote:
I don't think you can install this package on 7.4. As Andres said, it requires containers 0.5, but ghc 7.4's base libraries (in this case, template-haskell) use containers 0.4, and can't be reinstalled. I guess your best bet is to use sbv-2.1, which depends on containers >= 0.3, or to unpack it and see if you can loosen the containers dependency and see if it still works with 0.4
I'm talking about unattended automated builds, so tweaking isn't an option. On the other hand breaking the package environment isn't so bad, because I'm throwing it away after each build.
So in short, no combination of flags will work in this case, I think. Failure is the best option.
Actually --force-reinstalls does work in this case, and this thread began with Levent being unhappy with the failure option for his package, so I'm tempted to use that flag on all hackage builds.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Gregory Collins

On Wed, Jul 18, 2012 at 10:37:31AM +0100, Gregory Collins wrote:
Is there any reason QuickCheck specifically requires containers >= 0.5? Perhaps its lower bound could be relaxed.
It is sbv-2.2 that has that constraint.
On Wed, Jul 18, 2012 at 11:29 AM, Ross Paterson
wrote: Actually --force-reinstalls does work in this case, and this thread began with Levent being unhappy with the failure option for his package, so I'm tempted to use that flag on all hackage builds.
On the other hand, if installing a package is going to break people's package environments, maybe documenting the package on hackage isn't so important.

I'm talking about unattended automated builds, so tweaking isn't an option. On the other hand breaking the package environment isn't so bad, because I'm throwing it away after each build.
I'm not convinced that we should try to build packages at any price. If they're likely to cause problems in a standard environment on a user machine, then isn't it better to see this reflected on Hackage?
So in short, no combination of flags will work in this case, I think. Failure is the best option.
Actually --force-reinstalls does work in this case, and this thread began with Levent being unhappy with the failure option for his package, so I'm tempted to use that flag on all hackage builds.
Does it produce a usable package and environment, or does it just work, but leave everything broken? I agree that using --force-reinstalls on Hackage might be an acceptable option, and it's probably better than using --avoid-reinstalls by default. However, it may still send the misleading message that a package "builds just fine" when it practice it doesn't. Cheers, Andres -- Andres Löh, Haskell Consultant Well-Typed LLP, http://www.well-typed.com

On Wed, Jul 18, 2012 at 11:29 AM, Ross Paterson
On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote:
I don't think you can install this package on 7.4. As Andres said, it requires containers 0.5, but ghc 7.4's base libraries (in this case, template-haskell) use containers 0.4, and can't be reinstalled. I guess your best bet is to use sbv-2.1, which depends on containers >= 0.3, or to unpack it and see if you can loosen the containers dependency and see if it still works with 0.4
I'm talking about unattended automated builds, so tweaking isn't an option. On the other hand breaking the package environment isn't so bad, because I'm throwing it away after each build.
We use --force-reinstalls for automated builds as well, inside a cabal-dev sandbox. I think that flag is a fine default for such situations.
So in short, no combination of flags will work in this case, I think. Failure is the best option.
Actually --force-reinstalls does work in this case, and this thread began with Levent being unhappy with the failure option for his package, so I'm tempted to use that flag on all hackage builds.
Does that mean that you *can* reinstall template-haskell? I didn't know that... Erik

On Wed, Jul 18, 2012 at 09:35:52AM +0100, Erik Hesselink wrote:
I don't think you can install this package on 7.4. As Andres said, it requires containers 0.5, but ghc 7.4's base libraries (in this case, template-haskell) use containers 0.4, and can't be reinstalled. I guess your best bet is to use sbv-2.1, which depends on containers >= 0.3, or to unpack it and see if you can loosen the containers dependency and see if it still works with 0.4
So the moral of this story is that libraries should avoid depending on features of the containers package that have not yet been released with GHC.
participants (7)
-
Alexander Foremny
-
Andres Löh
-
Antoine Latter
-
Erik Hesselink
-
Gregory Collins
-
Levent Erkok
-
Ross Paterson