'; }
Bug 290150 - security/clamav 1.5.0,1 does not build
Summary: security/clamav 1.5.0,1 does not build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Yasuhiro Kimura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-11 15:51 UTC by Xavier Humbert
Modified: 2025-10-19 04:16 UTC (History)
4 users (show)

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


Attachments
full build log (101.45 KB, text/plain)
2025-10-11 15:51 UTC, Xavier Humbert
no flags Details
Errors from building clamav 1.5.1 on FreeBSD 13.5 (8.27 KB, text/plain)
2025-10-18 15:52 UTC, Fabian Wenk
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Humbert 2025-10-11 15:51:06 UTC
Created attachment 264485 [details]
full build log

Hi,
Failure while building clamav 1.5.0 on FreeBSD 14.3-STABLE amd64 (no poudriere, using portupgrade).

Attached is the build log (manually typed MAKE_JOBS_UNSAFE=yes make clean  all
Xavier
Comment 1 Sigi 2025-10-11 20:58:41 UTC
Same here. portmaster and "normal" port build.

/usr/ports/security/clamav/work/clamav-1.5.0/libclamav/others.c:623:23: error: use of undeclared identifier 'CERTSDIR'
Comment 2 Sigi 2025-10-12 10:08:31 UTC
AI said:

add to Makefile

# Workaround for missing CERTSDIR definition in ClamAV 1.5.0 source
CFLAGS+= -DCERTSDIR=\\\"${PREFIX}/share/clamav/certs\\\"

And that worked for me...
Comment 3 rnejdl 2025-10-12 19:24:10 UTC
Yes that CFLAGS addition to Makefile fixed it.

Thanks!
Comment 4 Yasuhiro Kimura freebsd_committerfreebsd_triage 2025-10-12 23:07:24 UTC
(In reply to Xavier Humbert from comment #0)

I can't reproduce the issue. Do you have any settings in /etc/make.conf? And are all installed packages other than clamav up-to-date?
Comment 5 Fabian Wenk 2025-10-18 15:52:24 UTC
Created attachment 264693 [details]
Errors from building clamav 1.5.1 on FreeBSD 13.5

I did run into the same / similar issue on FreeBSD 13.5-RELEASE amd64 with building / upgrade from clamav-1.4.3_1,1 -> clamav-1.5.1,1 running with portupgrade on a system where (old) clamav is installed.

All other Ports are up-to-date and in /etc/make.conf I have the following lines which may affect the building:

MAKEOPTS="-j 4"
DEFAULT_VERSIONS+=perl5=5.40
DEFAULT_VERSIONS+=ssl=openssl
DEFAULT_VERSIONS+=bdb=18
DEFAULT_VERSIONS+=php=8.2
DEFAULT_VERSIONS+=apache=2.4
DEFAULT_VERSIONS+=mysql=118m
OPTIONS_UNSET+=X11
OPTIONS_SET+=IPV6
OPTIONS_SET+=NLS
OPTIONS_SET+=DOCS
OPTIONS_SET+=LIBEDIT

Attached are the lines from where the error does occur.

When adding the suggestion in comment #2 into security/clamav/Makefile it does build and install / update from 1.4.x to 1.5.1. As I have done another test again, I have not run the version from this build.

But what also does work with the original unmodified Makefile is to first uninstall clamav and then re-installing with 'portinstall security/clamav'.
I occasionally have seen similar issues with some Ports in the past. Usually it is visible in the error message that the building does load / include files from the already installed old version.
Comment 6 Yasuhiro Kimura freebsd_committerfreebsd_triage 2025-10-19 04:07:00 UTC
(In reply to Fabian Wenk from comment #5)

Thanks for feedback. I succeeded to reproduce the issue. The build error seems to happen when non-base SSL stack is used and previous version of clamav package is already installed. It can be worked around by removing current clamav package first. I'll add entry about it to UPDATING.
Comment 7 commit-hook freebsd_committerfreebsd_triage 2025-10-19 04:14:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=aaa3390aa3d3e0fae4b4f994857b92e6ae40ba2b

commit aaa3390aa3d3e0fae4b4f994857b92e6ae40ba2b
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2025-10-19 03:52:15 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2025-10-19 04:13:51 +0000

    UPDATING: Document possible build error of seculity/clamav and how to work around it

    PR:             290150
    Reported by:    Piotr Zmudzinsk, Xavier Humbert, Sigi, Fabian Wenk

 UPDATING | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
Comment 8 Yasuhiro Kimura freebsd_committerfreebsd_triage 2025-10-19 04:16:36 UTC
Thanks for report.