I just installed jhc 0.7.1 from the tarball, and it seems to be unable to find its libraries: $ jhc hello.hs -o hello jhc hello.hs -o hello jhc 0.7.1 (0.7.0-13) Finding Dependencies... Using Ho Cache: '/mnt/home/droundy/.jhc/cache' Library was not found 'base' I compiled jhc using "./configure --prefix=$HOME/local; make; make install; ln -s $HOME/local/lib/jnc $HOME/bin/". Running --list-libraries gives the results: $ jhc --list-libraries Search path: /mnt/home/droundy/lib/jhc-0.7 /mnt/home/droundy/lib/jhc /usr/local/lib/jhc-0.7 /usr/local/lib/jhc /usr/lib/jhc-0.7 /usr/lib/jhc /mnt/home/droundy/share/jhc-0.7 /mnt/home/droundy/share/jhc /usr/local/share/jhc-0.7 /usr/local/share/jhc /usr/share/jhc-0.7 /usr/share/jhc /mnt/home/droundy/local/share/jhc-0.7 Libraries found: Which is odd, because: $ ls /mnt/home/droundy/local/share/jhc-0.7 applicative-1.0.hl containers-0.2.0.hl include base-1.0.hl haskell98-1.0.hl jhc-1.0.hl Any idea what might be going wrong? I haven't looked at the source code at all, but a quick strace showed that jhc --list-libraries is indeed opening all these .hl files. I've no idea why it isn't showing them as being found. -- David Roundy
On Thu, Aug 27, 2009 at 07:08:43AM -0400, David Roundy wrote:
Any idea what might be going wrong? I haven't looked at the source code at all, but a quick strace showed that jhc --list-libraries is indeed opening all these .hl files. I've no idea why it isn't showing them as being found.
Hmm.. that is strange. if it is reading them then not listing them, that means that it is rejecting them for some reason like being unable to decode them. what versions of 'binary' and 'zlib' do you have? I don't think their format changed, but that would be a possibility. what does jhc --show-ho on the library file show? John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
You've hit it on the head!
$ jhc --show-ho base-1.0.hl
base-1.0.hl
user error (Codec.Compression.Zlib: incompatible zlib version)
$ ghc-pkg latest zlib
zlib-0.5.2.0
Does this mean my haskell zlib package (which I installed expressly
for jhc) is itself broken, or that it's incompatible with jhc?
David
On Thu, Aug 27, 2009 at 9:18 AM, John Meacham
Hmm.. that is strange. if it is reading them then not listing them, that means that it is rejecting them for some reason like being unable to decode them. what versions of 'binary' and 'zlib' do you have? I don't think their format changed, but that would be a possibility. what does jhc --show-ho on the library file show?
John
Actually, it appears that the .hl file isn't in gzipped format:
$ zcat base-1.0.hl
gzip: base-1.0.hl: not in gzip format
Should it be? Or is zlib being used on parts of the file?
David
On Thu, Aug 27, 2009 at 10:31 AM, David
Roundy
You've hit it on the head!
$ jhc --show-ho base-1.0.hl base-1.0.hl user error (Codec.Compression.Zlib: incompatible zlib version)
$ ghc-pkg latest zlib zlib-0.5.2.0
Does this mean my haskell zlib package (which I installed expressly for jhc) is itself broken, or that it's incompatible with jhc?
David
On Thu, Aug 27, 2009 at 9:18 AM, John Meacham
wrote: Hmm.. that is strange. if it is reading them then not listing them, that means that it is rejecting them for some reason like being unable to decode them. what versions of 'binary' and 'zlib' do you have? I don't think their format changed, but that would be a possibility. what does jhc --show-ho on the library file show?
John
-- David Roundy
On Thu, Aug 27, 2009 at 10:35:55AM -0400, David Roundy wrote:
Actually, it appears that the .hl file isn't in gzipped format:
$ zcat base-1.0.hl
gzip: base-1.0.hl: not in gzip format
Should it be? Or is zlib being used on parts of the file?
No, zlib is used to compress individual parts of the file independently. that way I can load certain bits of data without having to parse through everything before it. (like it can skip loading type checking information for modules that arn't directly imported) That is really strange. I am using the same haskell version of zlib as you, I thought the gz format it compress/decompressed to was pretty standard. What version of the C zlib library do you have? I have version 1.2.3 on my machine I used to build the hl file. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
On Thu, Aug 27, 2009 at 7:47 AM, John Meacham
That is really strange. I am using the same haskell version of zlib as you, I thought the gz format it compress/decompressed to was pretty standard. What version of the C zlib library do you have? I have version 1.2.3 on my machine I used to build the hl file.
zlib != gzip. gzip adds some extra stuff.
--
Taral
On Thu, Aug 27, 2009 at 11:08:56AM -0700, Taral wrote:
On Thu, Aug 27, 2009 at 7:47 AM, John Meacham
wrote: That is really strange. I am using the same haskell version of zlib as you, I thought the gz format it compress/decompressed to was pretty standard. What version of the C zlib library do you have? I have version 1.2.3 on my machine I used to build the hl file.
zlib != gzip. gzip adds some extra stuff.
Yes, but I use the Code.Compression.GZip method of compression that haskell zlib defines and is gzip compatible. It is defined by an RFC, so I am not sure why one system would fail at decoding what another encoded... hmm... John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
My C zlib is version 1.2.3.3, from the debian package for lenny.
You're right that that shouldn't cause any trouble. I don't expect
that today I'll have time to track down the failure... I wonder if it
could be related to the version of binary used? Since it looks like
perhaps the sort of error zlib will give if you give it random data,
as might happen if the format of the file as a whole changed.
My binary is 0.4.1, the package shipped with debian lenny.
David
1:1.2.3.3.dfsg-12
On Thu, Aug 27, 2009 at 10:47 AM, John Meacham
No, zlib is used to compress individual parts of the file independently. that way I can load certain bits of data without having to parse through everything before it. (like it can skip loading type checking information for modules that arn't directly imported)
That is really strange. I am using the same haskell version of zlib as you, I thought the gz format it compress/decompressed to was pretty standard. What version of the C zlib library do you have? I have version 1.2.3 on my machine I used to build the hl file.
Another thing to try would be to rebuild the libraries from the tarball and see if they work and are different than the ones I distribute. You should be able to just delete the .hl files from the distribution directory then do a 'make libs' to get them rebuilt. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
When I do 'rm *.hl' and make libs in the tarball directory, I get an error: The output follows, which is rather lengthy, but might help. The final error is once again: user error (Codec.Compression.Zlib: incompatible zlib version) Not sure what this means. David $ make libs ./jhc --noauto -L- -L. -ilib/jhc --build-hl lib/jhc/jhc.cabal -o jhc-1.0.hl jhc --noauto -L- -L. -ilib/jhc --build-hl lib/jhc/jhc.cabal -o jhc-1.0.hl jhc 0.7.1 (0.7.0-13) Creating library from description file: "lib/jhc/jhc.cabal" Reading: "lib/jhc/jhc.cabal" Finding Dependencies... Using Ho Cache: '/mnt/home/droundy/.jhc/cache' Data.Char [lib/jhc/Data/Char.hs] lib/jhc/Data/Word.hs:2 - Warning: The pragma 'LANGUAGE' is unknown Data.Word [lib/jhc/Data/Word.hs] lib/jhc/Jhc/Prim.hs:2 - Warning: The pragma 'LANGUAGE' is unknown Jhc.Prim [lib/jhc/Jhc/Prim.hs] lib/jhc/Jhc/String.hs:2 - Warning: The pragma 'LANGUAGE' is unknown lib/jhc/Jhc/String.hs:17 - Warning: The pragma 'VCONSTRUCTOR' is unknown Jhc.String [lib/jhc/Jhc/String.hs] lib/jhc/Jhc/Types.hs:1 - Warning: The pragma 'LANGUAGE' is unknown Jhc.Types [lib/jhc/Jhc/Types.hs] Jhc.Basics [lib/jhc/Jhc/Basics.hs] Jhc.Int [lib/jhc/Jhc/Int.hs] Numeric [lib/jhc/Numeric.hs] Data.Ratio [lib/jhc/Data/Ratio.hs] Jhc.Float [lib/jhc/Jhc/Float.hs] Jhc.Enum [lib/jhc/Jhc/Enum.hs] Data.Int [lib/jhc/Data/Int.hs] Jhc.Inst.PrimEnum [lib/jhc/Jhc/Inst/PrimEnum.hs] Jhc.Order [lib/jhc/Jhc/Order.hs] Jhc.IO [lib/jhc/Jhc/IO.hs] lib/jhc/Foreign/C/Types.hs:2 - Warning: The pragma 'LANGUAGE' is unknown Foreign.C.Types [lib/jhc/Foreign/C/Types.hs] lib/jhc/Jhc/Options.hs:2 - Warning: The pragma 'LANGUAGE' is unknown Jhc.Options [lib/jhc/Jhc/Options.hs] Jhc.Num [lib/jhc/Jhc/Num.hs] Jhc.Show [lib/jhc/Jhc/Show.hs] Prelude [lib/jhc/Prelude.hs] Jhc.Inst.Enum [lib/jhc/Jhc/Inst/Enum.hs] Jhc.Inst.Read [lib/jhc/Jhc/Inst/Read.hs] Prelude.Float [lib/jhc/Prelude/Float.hs] Foreign.Marshal.Alloc [lib/jhc/Foreign/Marshal/Alloc.hs] Foreign.Marshal.Utils [lib/jhc/Foreign/Marshal/Utils.hs] Foreign.Ptr [lib/jhc/Foreign/Ptr.hs] Foreign.Storable [lib/jhc/Foreign/Storable.hs] Jhc.Addr [lib/jhc/Jhc/Addr.hs] Jhc.Inst.Show [lib/jhc/Jhc/Inst/Show.hs] Jhc.Monad [lib/jhc/Jhc/Monad.hs] Jhc.Inst.Storable [lib/jhc/Jhc/Inst/Storable.hs] Jhc.List [lib/jhc/Jhc/List.hs] Jhc.Maybe [lib/jhc/Jhc/Maybe.hs] Prelude.IO [lib/jhc/Prelude/IO.hs] Foreign.C.String [lib/jhc/Foreign/C/String.hs] Foreign.Marshal.Array [lib/jhc/Foreign/Marshal/Array.hs] System.C.Stdio [lib/jhc/System/C/Stdio.hs] Prelude.Text [lib/jhc/Prelude/Text.hs] Jhc.Text.Read [lib/jhc/Jhc/Text/Read.hs] Prelude.CType [lib/jhc/Prelude/CType.hs] Jhc.Tuples [lib/jhc/Jhc/Tuples.hs] Foreign.C.Error [lib/jhc/Foreign/C/Error.hs] System.IO.Unsafe [lib/jhc/System/IO/Unsafe.hs] Jhc.Array [lib/jhc/Jhc/Array.hs] Jhc.Handle [lib/jhc/Jhc/Handle.hs] Jhc.Hole [lib/jhc/Jhc/Hole.hs] Jhc.JumpPoint [lib/jhc/Jhc/JumpPoint.hs] System.Mem [lib/jhc/System/Mem.hs] System.Mem.StableName [lib/jhc/System/Mem/StableName.hs] Typechecking... [ 1 of 49- Jhc.Prim - 2 of 49- Jhc.String - 3 of 49] Jhc.Types (.............................................) [ 4 of 49] Foreign.C.Types (.............................................) [ 5 of 49] Data.Int (.............................................) [ 6 of 49] Jhc.Int (.............................................) [ 7 of 49] Jhc.Inst.PrimEnum(.............................................) [ 8 of 49] Jhc.Basics (.............................................) [ 9 of 49- Jhc.Enum -10 of 49] Jhc.Order (.............................................) [11 of 49] Jhc.Options (.............................................) [12 of 49] Jhc.IO lib/jhc/Jhc/IO.hs:128 - Warning: Explicit quantification is a non-haskell98 feature (.............................................) [13 of 49] Jhc.Monad (.............................................) [14 of 49] Jhc.Addr (.............................................) [15 of 49] Jhc.JumpPoint (.............................................) [16 of 49] Jhc.Array (.............................................) [17 of 49] System.Mem (.............................................) [18 of 49] System.Mem.StableName(.............................................) [19 of 49] Data.Word (.............................................) [20 of 49] Jhc.Show (.............................................) [21 of 49- Jhc.Num -22 of 49] Jhc.Float (.............................................) [23 of 49] Jhc.Inst.Show (.............................................) [24 of 49] Foreign.Storable (.............................................) [25 of 49] Foreign.Ptr (.............................................) [26 of 49] System.C.Stdio (.............................................) [27 of 49] Jhc.Inst.Storable(.............................................) [28 of 49] Jhc.List lib/jhc/Jhc/List.hs:14 - Warning: Explicit quantification is a non-haskell98 feature lib/jhc/Jhc/List.hs:18 - Warning: Explicit quantification is a non-haskell98 feature lib/jhc/Jhc/List.hs:28 - Warning: Explicit quantification is a non-haskell98 feature lib/jhc/Jhc/List.hs:29 - Warning: Explicit quantification is a non-haskell98 feature lib/jhc/Jhc/List.hs:31 - Warning: Explicit quantification is a non-haskell98 feature lib/jhc/Jhc/List.hs:34 - Warning: Explicit quantification is a non-haskell98 feature lib/jhc/Jhc/List.hs:83 - Warning: Explicit quantification is a non-haskell98 feature lib/jhc/Jhc/List.hs:86 - Warning: Explicit quantification is a non-haskell98 feature (.............................................) [29 of 49] Jhc.Maybe (.............................................) [30 of 49- Prelude.IO -31 of 49- Foreign.C.String -32 of 49- Foreign.Marshal.Array -33 of 49- Foreign.Marshal.Alloc -34 of 49] Foreign.Marshal.Utils(.............................................) [35 of 49] Jhc.Inst.Enum (.............................................) [36 of 49] Prelude.CType (.............................................) [37 of 49] Jhc.Text.Read (.............................................) [38 of 49] Jhc.Tuples (.............................................) [39 of 49- Data.Char -40 of 49- Numeric -41 of 49- Data.Ratio -42 of 49- Prelude -43 of 49- Jhc.Inst.Read -44 of 49- Prelude.Float -45 of 49] Prelude.Text (.............................................) [46 of 49] Jhc.Hole (.............................................) [47 of 49] System.IO.Unsafe (.............................................) [48 of 49] Foreign.C.Error (.............................................) [49 of 49] Jhc.Handle (.............................................) Compiling... [ 1 of 49- Jhc.Prim - 2 of 49- Jhc.String - 3 of 49] Jhc.Types <........**........................................> user error (Codec.Compression.Zlib: incompatible zlib version) make: *** [jhc-1.0.hl] Error 1
On Fri, Aug 28, 2009 at 12:41:02PM -0400, David Roundy wrote:
When I do 'rm *.hl' and make libs in the tarball directory, I get an error:
The output follows, which is rather lengthy, but might help. The final error is once again:
user error (Codec.Compression.Zlib: incompatible zlib version)
I am not sure. that happens right when it makes the first zlip call to 'compress', so I think something must be wacky with your haskell zlib install. Since binary is not involved at that point. perhaps you can try to erase and reinstall the zlib module? is it possible that when you built it it linked against a different zlib than it is finding at run time? John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
Oddly enough, reinstalling zlib seems to have fixed it. I guess what
happened was that when my hard drive died and I restored my home
directory from backup, on the reinstall I had a different version of
zlib, since I switched back to debian from ubuntu. Who would have
guessed? I wonder what the Haskell zlib package does that is so
sensitive to zlib version number? I'd be very surprised if they broke
ABI compatibility without changing the soname...
David
On Fri, Aug 28, 2009 at 8:15 PM, John Meacham
On Fri, Aug 28, 2009 at 12:41:02PM -0400, David Roundy wrote:
When I do 'rm *.hl' and make libs in the tarball directory, I get an error:
The output follows, which is rather lengthy, but might help. The final error is once again:
user error (Codec.Compression.Zlib: incompatible zlib version)
I am not sure. that happens right when it makes the first zlip call to 'compress', so I think something must be wacky with your haskell zlib install. Since binary is not involved at that point. perhaps you can try to erase and reinstall the zlib module? is it possible that when you built it it linked against a different zlib than it is finding at run time?
John
-- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/ _______________________________________________ jhc mailing list jhc@haskell.org http://www.haskell.org/mailman/listinfo/jhc
-- David Roundy
participants (3)
-
David Roundy -
John Meacham -
Taral