kyz/libmspack

cabextract doesn't build from master

austin987 opened this issue · 2 comments

Noticed while investigating #22.

Current master (43682d7) doesn't build for me (while 1.7 and v1.8 tags do):

gcc -DHAVE_CONFIG_H -I.     -g -O2 -c -o src/cabextract.o src/cabextract.c
src/cabextract.c: In function 'main':
src/cabextract.c:397:25: error: 'MSCABD_PARAM_SALVAGE' undeclared (first use in this function); did you mean 'MSCABD_PARAM_SEARCHBUF'?
   cabd->set_param(cabd, MSCABD_PARAM_SALVAGE, args.fix);
                         ^~~~~~~~~~~~~~~~~~~~
                         MSCABD_PARAM_SEARCHBUF
src/cabextract.c:397:25: note: each undeclared identifier is reported only once for each function it appears in

Bisect shows it was

commit a8c22c9572d98d3e6832cd76b825bf1dc76d22e7
Author: Stuart Caie <kyzer@cabextract.org.uk>
Date:   Fri Oct 26 19:09:43 2018 +0100

    Use pkg-config PKG_CHECK_MODULES to get external libmspack flags

:040000 040000 3a5f11d99686a26a6fbb52c9a6ff73db6da846a2 7f3c6f79a541cdefee092985d0a74572ed5de394 M	cabextract

This is on Gentoo amd64 (built with ./rebuild.sh from git, not using portage).

gcc version 7.3.0 (Gentoo 7.3.0-r4 p1.6)

kyz commented

I see what the issue is, cabextract.c is not built with -I./mspack as it needs to be. Instead, /usr/include/mspack.h will be used and yours isn't the libmspack0.8 mspack.h.

Should be fixed in commit 63b3e86

Yep, 63b3e86 fixes the build for me, thanks for the quick fix @kyz!