[Hackage] #686: cabal install - Codec.Compression.Zlib: incorrect header check

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Zlib Difficulty: unknown | Ghcversion: 6.12.1 Platform: Windows | ---------------------------------+------------------------------------------ The command "cabal install packagename" fails with : "Codec.Compression.Zlib: incorret header check". The message appears while trying to extract the tar.gz file. I have manually updated Cabal (1.8.0.2), cabal-install(0.8.2) and zlib(0.5.2.0) but the error remains. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Zlib Difficulty: unknown | Ghcversion: 6.12.1 Platform: Windows | ---------------------------------+------------------------------------------ Comment(by duncan): Are you absolutely sure that you are running cabal-install version 0.8.2? Does running `cabal --version` report the expected version? I ask because it is unfortunately all too easy to accidentally get into the situation where there are two versions of cabal-install installed and the first one on the Windows %PATH% is often the older one. If you are definitely running version 0.8.2, does this happen for all packages or just some? Does trying to unpack the .tar.gz package manually (eg using tar command line, or WinZip) fail too? BTW, you can see where cabal is getting the .tar.gz file from, just run with the -v flag and look for the line where it mentions extracting (which is presumably also where it'll fail). -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Zlib Difficulty: unknown | Ghcversion: 6.12.1 Platform: Windows | ---------------------------------+------------------------------------------ Comment(by Monsikos): After running "cabal --version" I confirm that I'm using the 0.8.2 version. I think it happens for all packages as every package I tried to install gave the same "incorrect header check" error. I unpacked the .tar.gz manually successfully and then installed the package manually with the "runghc Setup ..." commands. It works this way. {{{ Here is what I get when I run "cabal install binary-search -v" for example C:\Users\Paul>cabal install binary-search -v C:\Program Files\Haskell Platform\2010.1.0.0\bin\ghc.exe --numeric-version looking for package tool: ghc-pkg near compiler in C:\Program Files\Haskell Platform\2010.1.0.0\bin found package tool in C:\Program Files\Haskell Platform\2010.1.0.0\bin\ghc-pkg.exe C:\Program Files\Haskell Platform\2010.1.0.0\bin\ghc-pkg.exe --version C:\Program Files\Haskell Platform\2010.1.0.0\bin\ghc.exe --supported- languages Reading installed packages... C:\Program Files\Haskell Platform\2010.1.0.0\bin\ghc-pkg.exe dump --global C:\Program Files\Haskell Platform\2010.1.0.0\bin\ghc-pkg.exe dump --user Reading available packages... Resolving dependencies... selecting binary-search-0.0 (hackage) selecting base-3.0.3.2 (installed) and 4.2.0.0 (installed) and discarding syb-0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2 and 0.2.1 selecting ffi-1.0 (installed) selecting ghc-prim-0.2.0.0 (installed) selecting integer-gmp-0.2.0.0 (installed) selecting rts-1.0 (installed) selecting syb-0.1.0.2 (installed) In order, the following would be installed: binary-search-0.0 (new package) Downloading binary-search-0.0... Downloaded to C:\Users\Paul\AppData\Roaming\cabal\packages\hackage.haskell.org\binary- search\ 0.0\binary-search-0.0.tar.gz Extracting C:\Users\Paul\AppData\Roaming\cabal\packages\hackage.haskell.org\binary- search\ 0.0\binary-search-0.0.tar.gz to C:\Users\Paul\AppData\Local\Temp\binary-search-0.04196... cabal: Codec.Compression.Zlib: incorrect header check }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Zlib Difficulty: unknown | Ghcversion: 6.12.1 Platform: Windows | ---------------------------------+------------------------------------------ Comment(by finlay): Im having the same problem with cabal, both on cabal install and with cabal update. The versions are all the same, cabal-install version 0.8.2 using version 1.8.0.2 of the Cabal library zlib-0.5.2.0. I can't update because of the error. I notice that it downloads 00-index.tar.gz, but creates it as a POSIX tar archive, ie. it seems to automatically gunzip it. I think that is the problem. Not sure how to proceed. F -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: high | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: major | Keywords: Zlib Difficulty: normal | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Changes (by finlay): * cc: finlay@… (added) * difficulty: unknown => normal * priority: normal => high * severity: normal => major * platform: Windows => Comment: After exploring this a bit more I have discovered that it is caused by secret ISP http proxy. There is a header: Content-Encoding: x-gzip that gets causes the file to be gunzipped before it gets to my computer. There are solutions: 1) patch cabal-install to not fail on files it expects to be gzipped but have been unzipped. I'll see if I can make a patch to do that. 2) make my ISP not proxy the http traffic (not very easy to do). 3) Remove the Content-Encoding: x-gzip header. I have bumped the severity because this error stops me from using cabal, a basic part of the batteries included platform. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: high | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: major | Keywords: Zlib Difficulty: normal | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Comment(by finlay): Having slept on it, and after sending an email to the ISP asking to change their proxy settings, I also had a look at how things are set up on ubuntu packages: {{{ $ HEAD http://archive.ubuntu.com/.../haskell-cabal- install_0.8.0.orig.tar.gz ... Content-Type: application/x-gzip ... }}} and {{{ $ HEAD http://hackage.haskell.org/packages/archive/00-index.tar.gz ... Content-Encoding: x-gzip Content-Type: application/x-tar ... }}} As you can see, the Content-Encoding header is not set on the ubuntu apache server when serving tar.gz files. I guess it would be sensible to not set it on the hackage server either. Note that this is the same problem described on #622. I think the ISPs proxy settings are "wrong", but they are also common, and out of our control. BTW, the ISP is Telecom NZ, with millions of customers, so I don't expect to hear back from them any time soon. Finlay Also see: #540 #562 #572 -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: high | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: major | Keywords: Zlib Difficulty: normal | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Comment(by adept): Just for reference: this behavior could be recreated locally on linux box by installing "ziproxy" and specifying "!MaxSize = 0" and "Gzip = false" in its config. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check
---------------------------------+------------------------------------------
Reporter: Monsikos | Owner:
Type: defect | Status: new
Priority: high | Milestone:
Component: cabal-install tool | Version: 1.8.0.2
Severity: major | Keywords: Zlib
Difficulty: normal | Ghcversion: 6.12.1
Platform: |
---------------------------------+------------------------------------------
Comment(by duncan):
Applied. Now needs confirming. Monsikos, finlay, could you check?
{{{
Wed Oct 27 10:50:34 BST 2010 Duncan Coutts

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: high | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: major | Keywords: Zlib Difficulty: normal | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Comment(by duncan): Replying to [comment:7 duncan]:
Applied. Now needs confirming. Monsikos, finlay, could you check?
Note: needs latest darcs Cabal-1.10 branch and cabal-install HEAD branch: darcs get http://darcs.haskell.org/cabal-branches/cabal-1.10 darcs get http://darcs.haskell.org/cabal-install -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:8 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: high | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: major | Keywords: Zlib Difficulty: normal | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Comment(by finlay): Thanks Guys I installed cabal-1.10, and the head of cabal-install. Now, despite the fact that there is a broken ISP proxy unzipping files for me, cabal install and cabal update work fine. Yay! See: the index is a tar file... {{{ finlay@korora:~$ cabal --version cabal-install version 0.9.5 using version 1.10.0.0 of the Cabal library finlay@korora:~$ file .cabal/packages/hackage.haskell.org/00-index.tar.gz .cabal/packages/hackage.haskell.org/00-index.tar.gz: POSIX tar archive (GNU) }}} Thanks again for your help. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:9 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: high | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: major | Keywords: Zlib Difficulty: normal | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Comment(by elga): * [http://www.releve-identite-operateur.fr/rio-bouygues.html rio bouygues] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:10 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: new Priority: high | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: major | Keywords: Zlib Difficulty: normal | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Comment(by edouard): Vous pourrez vous procurer son numero rio Orange, votre code rio SFR ou encore votre numero rio Bouygues en un clin d'oeil ! [http://www.releve- identite-operateur.fr/numbero-de-virgin-mobile.html virgin mobile] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:11 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#686: cabal install - Codec.Compression.Zlib: incorrect header check ---------------------------------+------------------------------------------ Reporter: Monsikos | Owner: Type: defect | Status: closed Priority: high | Milestone: cabal-install-0.10 Component: cabal-install tool | Version: 1.8.0.2 Severity: major | Resolution: fixed Keywords: Zlib | Difficulty: normal Ghcversion: 6.12.1 | Platform: ---------------------------------+------------------------------------------ Changes (by kosmikus): * status: new => closed * resolution: => fixed * milestone: => cabal-install-0.10 Comment: Looks like this one is actually fixed. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/686#comment:10 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage