inikep / lizard

Lizard (formerly LZ5) is an efficient compressor with very fast decompression. It achieves compression ratio that is comparable to zip/zlib and zstd/brotli (at low and medium compression levels) at decompression speed of 1000 MB/s and faster.
Other
644 stars 40 forks source link

Install: decompress header missing #21

Open ax3l opened 4 years ago

ax3l commented 4 years ago

The install logic in lib/Makefile seams to forget to install the lizard_decompress.h header, is that one public?

Seen with Lizard 1.0.0.

Reproduce:

make
make PREFIX=$HOME/lizard install

include contains:

lizard_common.h  lizard_compress.h  lizard_frame.h
ax3l commented 4 years ago

Simply adding it to the lib/Makefile with this patch

From cd7d0165a0c547b7dee6387b03f3bb7b35937ad7 Mon Sep 17 00:00:00 2001
From: Axel Huebl <axel.huebl@plasma.ninja>
Date: Wed, 14 Aug 2019 22:12:58 -0700
Subject: [PATCH] Makefile: Install Decompression Header

The public decompression header was missing from in- and
deinstallation.
---
 lib/Makefile            | 2 ++
 lib/lizard_decompress.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/Makefile b/lib/Makefile
index 64c07dd..9484056 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -143,6 +143,7 @@ endif
    @ln -sf liblizard.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblizard.$(SHARED_EXT)
    @echo Installing includes
    @$(INSTALL_DATA) lizard_compress.h $(DESTDIR)$(INCLUDEDIR)/lizard_compress.h
+   @$(INSTALL_DATA) lizard_decompress.h $(DESTDIR)$(INCLUDEDIR)/lizard_decompress.h
    @$(INSTALL_DATA) lizard_common.h $(DESTDIR)$(INCLUDEDIR)/lizard_common.h
    @$(INSTALL_DATA) lizard_frame.h $(DESTDIR)$(INCLUDEDIR)/lizard_frame.h
    @echo lizard static and shared libraries installed
@@ -154,6 +155,7 @@ uninstall:
    @$(RM) $(DESTDIR)$(LIBDIR)/liblizard.$(SHARED_EXT_VER)
    @$(RM) $(DESTDIR)$(LIBDIR)/liblizard.a
    @$(RM) $(DESTDIR)$(INCLUDEDIR)/lizard_compress.h
+   @$(RM) $(DESTDIR)$(INCLUDEDIR)/lizard_decompress.h
    @$(RM) $(DESTDIR)$(INCLUDEDIR)/lizard_common.h
    @$(RM) $(DESTDIR)$(INCLUDEDIR)/lizard_frame.h
    @echo lizard libraries successfully uninstalled

does not work due to its cross-dependency on another (internal?) header: https://github.com/inikep/lizard/blob/v1.0/lib/lizard_decompress.h#L42

Shall that one be installed as well or should lizard_decompress.h be restructured?

ax3l commented 4 years ago

problem occured downstream in @FrancescAlted et al.'s c-blosc2 with an external Lizard build.

ax3l commented 4 years ago

@inikep do you have hints what might be wrong with the install or usage of the decompress headers?

inikep commented 4 years ago

Thanks for information. I fixed it at https://github.com/inikep/lizard/commit/02c35c25e565

ax3l commented 4 years ago

Thanks a lot, this fixes it for me! Just for packaging in Spack.io: you planning a bugfix release that will contain the fix? :)