kyz / libmspack

A library for some loosely related Microsoft compression formats, CAB, CHM, HLP, LIT, KWAJ and SZDD.
https://www.cabextract.org.uk/libmspack/
169 stars 45 forks source link

Not clear on Github how to get libmspack vs cabextract releases #30

Closed kloczek closed 5 years ago

kloczek commented 5 years ago

Just have been trying to geterate dist tar ball using distcheck target and build fails:

[tkloczko@domek libmspack]$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for inttypes.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
checking size of off_t... 8
checking for mkdir... yes
checking for _mkdir... no
checking whether mkdir takes one argument... no
checking for towlower... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libmspack.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
[tkloczko@domek libmspack]$ make distcheck
make  dist-gzip am__post_remove_distdir='@:'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libmspack-1.9.1/libmspack'
make  distdir-am
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libmspack-1.9.1/libmspack'
  CC       mspack/system.lo
  CC       mspack/cabd.lo
  CC       mspack/lzxd.lo
  CC       mspack/mszipd.lo
  CC       mspack/qtmd.lo
  CCLD     libmscabd.la
  CC       mspack/cabc.lo
  CC       mspack/chmc.lo
  CC       mspack/chmd.lo
  CC       mspack/hlpc.lo
  CC       mspack/hlpd.lo
  CC       mspack/litc.lo
  CC       mspack/litd.lo
  CC       mspack/kwajc.lo
  CC       mspack/kwajd.lo
  CC       mspack/szddc.lo
  CC       mspack/szddd.lo
  CC       mspack/oabc.lo
  CC       mspack/oabd.lo
mspack/oabd.c:375:12: error: conflicting types for ‘copy_fh’
  375 | static int copy_fh(struct mspack_system *sys, struct mspack_file *infh,
      |            ^~~~~~~
mspack/oabd.c:37:12: note: previous declaration of ‘copy_fh’ was here
   37 | static int copy_fh(struct mspack_system *sys, struct mspack_file *infh,
      |            ^~~~~~~
mspack/oabd.c:37:12: warning: copy_fh’ used but never defined
mspack/oabd.c:375:12: warning: copy_fh’ defined but not used [-Wunused-function]
  375 | static int copy_fh(struct mspack_system *sys, struct mspack_file *infh,
      |            ^~~~~~~
make[2]: *** [Makefile:1071: mspack/oabd.lo] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libmspack-1.9.1/libmspack'
make[1]: *** [Makefile:1439: distdir] Error 2
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libmspack-1.9.1/libmspack'
make: *** [Makefile:1516: dist] Error 2
kyz commented 5 years ago

This is odd. Where did you get the tarball?

The current version of cabextract is 1.9.1. This is libmspack being built, not cabextract. The current version of libmspack is 0.10.1alpha. There is no such thing as libmspack 1.9.1.

This error was present in libmspack 0.10alpha, but fixed in libmspack 0.10.1alpha (see commit 817f2a2456809ebd50226002a6585852028abd9d)

Please try using the latest version of libmspack, e.g. https://www.cabextract.org.uk/libmspack/libmspack-0.10.1alpha.tar.gz

kloczek commented 5 years ago

As you see keeping two projects in the same tree causes only confusion and additionally (already which I've already wrote) packing issue. Tarball is on this repository release page https://github.com/kyz/libmspack/releases

kyz commented 5 years ago

Github's auto-generated tarballs aren't releases and I don't support them.

I don't know how accurate this is, but would you say you found this software on Github, and expected the releases to be made on Github?

Perhaps a top-level README, written for Github users, explaining that the releases are on https://www.cabextract.org.uk/, would help.

Please note the full labels on the release tags:

libmspack compiles correctly, if you use the libmspack 0.10.1alpha tag.

kyz commented 5 years ago

I've added a top-level README in the repository in order to make it easier for people to do the right thing: get cabextract and libmspack releases from https://www.cabextract.org.uk/

I'm not going to split cabextract and libmspack into separate repositories in order to make it easier to do the wrong thing (which is using the auto-generated tarballs from Github; these aren't releases)

kloczek commented 5 years ago

Really .. keeping two project in on repo is not how it should be done. Tagging will be across each of those two parts inside. Best would be just clone, move directories content up and put cabextract and libmspack in own repositories. Just look around. No one is using git like you are using it it.

kloczek commented 5 years ago

Other thing is that libmspack is failing in distcheck target.

kyz commented 5 years ago

Thank you for the suggestion, but I'm going to keep the existing release process and repository layout.

I haven't previously had anyone have trouble finding the right tag to go with a release, and I don't want any packaging systems to use Github or the git tags as a source for anything. Packaging systems should only use releases on https://www.cabextract.org.uk/. See cabextract.spec.in. If you want to contribute a libmspack.spec.in that sources from https://www.cabextract.org.uk/, I would welcome that.

kyz commented 5 years ago

I've just checked ./configure && make distcheck works with libmspack 0.10.1alpha release on Ubuntu 18.04 x86_64. Could you post the failure? If you're using the repository directly (or a tarball of it), what did you run other than ./configure && make distcheck?

kloczek commented 5 years ago

Tarball taken from github release tab.

kyz commented 5 years ago

Did you run anything else? As there's no ./configure in the repository, you must have run at least autogen.sh (or equivalent). What's the full sequence of commands and their output?

kloczek commented 5 years ago

autoreconf -fiv; ./configure; make distcheck

kyz commented 5 years ago

Please post the output too.

To see if I could replicate your issue, I downloaded the Github tarball of libmspack v0.10.1alpha, and ran the commands above (although please note there is an autogen.sh and rebuild.sh to accomplish the same). There are no problems with make distcheck on Ubuntu 18.04

$ wget -q https://github.com/kyz/libmspack/archive/v0.10.1alpha.tar.gz
$ tar xf v0.10.1alpha.tar.gz 
$ cd libmspack-0.10.1alpha/libmspack
$ autoreconf -fiv; ./configure; make distcheck

I get the sinking feeling that the output will be the same as listed at the start of this issue, which is already diagnosed and solved. You tried to use the Github releases page instead of the actual releases page. The Github page does not show the single line of description on each tag, so you see "v1.9.1" and "v0.10.1alpha", not "cabextract v1.9.1" and "libmspack v0.10.1alpha" which would give you an immediate clue as to which one you want, and you chose the wrong tag and got the libmspack v0.10alpha release, which is acknowledged broken and the fix is to use the latest release, v0.10.1alpha.

If you are packaging libmspack, especially if you're trying to write an RPM spec script or similar, use the official release tarball at https://www.cabextract.org.uk/libmspack/libmspack-VERSION.tar.gz, do not homebrew your own release from repository tarballs and running distcheck.

kloczek commented 5 years ago

Other issue is with versioning. If current version is 0.10.1alpha and ten it will be 0.10.1 it makes problem on packaging because 0.10.1alpha is greater than 0.10.1. I would suggest next time use convention like 0.9.1.99 and then 1.10.1. Do you have any plans to make regular release soon?

micahsnyder commented 5 years ago

@kloczek it makes no sense to use a convention like 0.9.1.99 for an alpha or beta release in so far as a software developer can make no guarantee there wouldn't be a second or third alpha, beta, or release candidate prior to a stable release. It is common for pre-release software versions to have "alpha", "beta", "beta2", "rc", "rc2", etc suffixes to differentiate them.

Ordinarily, these pre-release versions wouldn't be packaged by a package manager. For libmspack however, @kyz has chosen to use the "alpha" suffix for all official releases to date. Unless he decides to stop using the "alpha" suffix, I imagine it shouldn't be a problem to just accept it as a permanent part of the name in packaging. For your own packaging of libmspack, you could of course choose to drop the "alpha" suffix if you choose. libmspack seems stable to me so I reckon it doesn't really matter if it has the suffix.

kyz commented 5 years ago

From https://www.cabextract.org.uk/libmspack/

The current "alpha" status of the library is due to feature incompleteness, not lack of robustness.

Once libmspack implements a few more compressors / decompressors, it will stop being alpha and will move straight to version 1.0

kloczek commented 1 year ago

Once libmspack implements a few more compressors / decompressors, it will stop being alpha and will move straight to version 1.0

Any update? 🤔

kyz commented 1 year ago

There is a release of libmspack coming soon, it will be 0.11alpha