Bug 242030 - security/clamav: build fails - no member named 'set_param' in 'struct msoab_decompressor'
Summary: security/clamav: build fails - no member named 'set_param' in 'struct msoab_d...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
: 241975 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-17 15:03 UTC by tundra
Modified: 2019-12-10 18:30 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (yasu)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tundra 2019-11-17 15:03:21 UTC
Port fails to complile:

../libclammspack/mspack/oabd.c:53:16: error: no member named 'set_param' in 'struct msoab_decompressor'
    self->base.set_param              = &oabd_param;
    ~~~~~~~~~~ ^
../libclammspack/mspack/oabd.c:397:26: error: use of undeclared identifier 'MSOABD_PARAM_DECOMPBUF'
    if (self && param == MSOABD_PARAM_DECOMPBUF && value >= 16) {
                         ^
2 errors generated.
gmake[5]: *** [Makefile:4212: libclammspack_la-oabd.lo] Error 1
gmake[5]: *** Waiting for unfinished jobs....
gmake[5]: Leaving directory '/usr1/ports/security/clamav/work/clamav-0.102.0/libclamav'
gmake[4]: *** [Makefile:4660: all-recursive] Error 1
gmake[4]: Leaving directory '/usr1/ports/security/clamav/work/clamav-0.102.0/libclamav'
gmake[3]: *** [Makefile:1797: all] Error 2
gmake[3]: Leaving directory '/usr1/ports/security/clamav/work/clamav-0.102.0/libclamav'
gmake[2]: *** [Makefile:854: all-recursive] Error 1
gmake[2]: Leaving directory '/usr1/ports/security/clamav/work/clamav-0.102.0'
gmake[1]: *** [Makefile:650: all] Error 2
gmake[1]: Leaving directory '/usr1/ports/security/clamav/work/clamav-0.102.0'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 Yasuhiro KIMURA 2019-11-17 20:34:18 UTC
(In reply to tundra from comment #0)

Hello,

Would you please provide following information?

* OS version
* Architecture
* Options setting
Comment 2 tundra 2019-11-17 22:07:54 UTC
(In reply to Yasuhiro KIMURA from comment #1)


11.3-STABLE FreeBSD 11.3-STABLE #0 r354236: Fri Nov  1 03:23:16 CDT 2019

Intel i5 (AMD64)

Not sure what options you're looking for or where to find them.
Comment 3 Walter Schwarzenfeld freebsd_triage 2019-11-17 23:04:44 UTC
cd /usr/ports/security/clamav && make showconfig
Comment 4 Yasuhiro KIMURA 2019-11-18 14:07:23 UTC
(In reply to tundra from comment #2)

I found build error happens when

1. MSPACK option is OFF (Disabled by default from 0.102.0).
2. archivers/libmspack is installed.

So if archivers/libmspack is not required by other installed ports, remove it as work around. Then build should succeed.
Comment 5 tundra 2019-11-18 15:01:39 UTC
(In reply to Yasuhiro KIMURA from comment #4)

Unfortunately, Mailscanner requires libmspack on these machines.

I was able to temporarily work around by configuring clamav with
MSPACK selected (i.e., Use external port)
Comment 6 takefu 2019-11-25 03:55:11 UTC
*** Bug 241975 has been marked as a duplicate of this bug. ***
Comment 7 Yasuhiro KIMURA 2019-11-27 16:26:54 UTC
I submitted bug #242175. By updating archivers/libmspack to latest version this problem should be fixed.
Comment 8 tundra 2019-11-27 17:50:10 UTC
(In reply to Yasuhiro KIMURA from comment #7)

I find this confusing.  The original problem occurred when trying to use the internal MSPACK implementaton in clamav. 

If I reconfigure the port to use the external MSPACK library, everything is OK.

So, how does bumping that port fix this?
Comment 9 Yasuhiro KIMURA 2019-11-27 18:25:12 UTC
(In reply to tundra from comment #8)

At the moment I don't fully understand the cause of the problem. However, I think the cause is probably as following.

1. Currently version of archivers/libmspack is 0.9.1, and version of libmspack bundled in source archive of ClamAV 0.102.1 is 0.10.1.
2. If archivers/libmspack is installed, Makefiles generated by configure script of ClamAV try to include header files installed by archivers/libmspack even if configuer script is executed with --without-system-mspack option.
3. So .h files of 0.9.1 and .c files of 0.10.1 are mixed up and it results in build error.
4. But by applying attached patch of bug #242175 archivers/libmspack is updated to 0.10.1, and header files installed by this port are also update to same version.
5. Then same version of .h and .c files are used to be compiled and build error doesn't happen.
Comment 10 Yasuhiro KIMURA 2019-12-09 10:28:26 UTC
With commit of ports r519594 this problem is fixed. I confirmed on vanilla 12.1-RELEASE amd64 that build of security/clamav succeeds even if archivers/libmspack is installed. So please close this bug report now.
Comment 11 tundra 2019-12-10 18:29:59 UTC
(In reply to Yasuhiro KIMURA from comment #10)
Confirmed.