Bug 273659 - security/clamav 1.2.0 compile errors
Summary: security/clamav 1.2.0 compile errors
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yasuhiro Kimura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-09 15:09 UTC by doctor
Modified: 2023-09-12 12:00 UTC (History)
1 user (show)

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


Attachments
build log with openssl31 (293.25 KB, text/plain)
2023-09-11 20:15 UTC, Andrey Pevnev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description doctor 2023-09-09 15:09:32 UTC
Could be openssl 3 dependency errors

FAILED: clamconf/clamconf 
: && /usr/bin/cc -O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -Wl,-rpath=/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector-strong clamconf/CMakeFiles/clamconf.dir/clamconf.c.o -o clamconf/clamconf  -Wl,-rpath,/usr/ports/security/clamav/work/.build/libclamav:/usr/local/lib:  common/libcommon.a  libclamav/libclamav.so.12.0.1  /usr/local/lib/libmspack.so  x86_64-unknown-freebsd/release/libclamav_rust.a  -lexecinfo  -lpthread  -lgcc_s  -lc  -lm  -lrt  -lutil  -lkvm  -lmemstat  -lprocstat  -lexecinfo  -lpthread  -lgcc_s  -lc  -lm  -lrt  -lutil  -lkvm  -lmemstat  -lprocstat  -ldevstat  /usr/lib/libbz2.so  /usr/local/lib/libpcre2-8.so  /usr/local/lib/libxml2.so  /usr/local/lib/libjson-c.so  -lpthreads  -lc  -lm  /usr/lib/libssl.so  /usr/lib/libcrypto.so  /usr/lib/libz.so  /usr/local/lib/libcurl.so && :
ld: error: libclamav/libclamav.so.12.0.1: undefined reference to EVP_MD_get_size [--no-allow-shlib-undefined]
ld: error: libclamav/libclamav.so.12.0.1: undefined reference to EVP_MD_get_block_size [--no-allow-shlib-undefined]
ld: error: libclamav/libclamav.so.12.0.1: undefined reference to EVP_MD_CTX_get0_md [--no-allow-shlib-undefined]
ld: error: libclamav/libclamav.so.12.0.1: undefined reference to EVP_PKEY_get_size [--no-allow-shlib-undefined]
Comment 1 Yasuhiro Kimura freebsd_committer freebsd_triage 2023-09-09 16:26:24 UTC
(In reply to doctor from comment #0)

Q1. What is your build environment? Please provide the output of `uname -a`.

Q2. How do you build security/clamav ports?
1. poudriere
2. portmaster
3. portupgrade
4. cd /usr/ports/security/clamav && make install

Q3. Is your ports tree up to date?

Q4. Do you have any non-default opttion settings? Or do you add something in /etc/make.conf?
Comment 2 Andrey Pevnev 2023-09-11 20:14:27 UTC
Got the same error, answers to your questions:
1. FreeBSD hostname 13.2-STABLE FreeBSD 13.2-STABLE stable/13-n255058-f8bbe032b286 CUSTOM amd64
2. cd & make
3. git pull just now
4. DEFAULT_VERSIONS+=ssl=openssl31
Comment 3 Andrey Pevnev 2023-09-11 20:15:28 UTC
Created attachment 244776 [details]
build log with openssl31
Comment 4 Yasuhiro Kimura freebsd_committer freebsd_triage 2023-09-12 03:52:53 UTC
(In reply to Andrey Pevnev from comment #2)

Thanks for answering. I can reproduce the issue and start investigation.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-09-12 11:56:16 UTC
A commit in branch main references this bug:

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

commit 0146693b1a61ab6410b0009c11b7a69406c0aa27
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2023-09-12 11:39:21 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2023-09-12 11:54:14 +0000

    security/{clamav,clamav-lts}: Fix build with non-default openssl setting

    Add arguments to CMAKE_ARGS that specify paths related to openssl so
    header files and libraies of selected openssl stack are used instead
    of the ones of base system.

    PR:             273659
    Reported by:    doctor@doctor.nl2k.ab.ca, Andrey Pevnev
    MFH:            2023Q3

 security/clamav-lts/Makefile | 6 +++++-
 security/clamav/Makefile     | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-09-12 11:58:17 UTC
A commit in branch 2023Q3 references this bug:

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

commit 9bbfd2ca4a73abf419e99bc8b13dc3eecf8efaff
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2023-09-12 11:39:21 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2023-09-12 11:57:34 +0000

    security/{clamav,clamav-lts}: Fix build with non-default openssl setting

    Add arguments to CMAKE_ARGS that specify paths related to openssl so
    header files and libraies of selected openssl stack are used instead
    of the ones of base system.

    PR:             273659
    Reported by:    doctor@doctor.nl2k.ab.ca, Andrey Pevnev
    MFH:            2023Q3

    (cherry picked from commit 0146693b1a61ab6410b0009c11b7a69406c0aa27)

 security/clamav-lts/Makefile | 6 +++++-
 security/clamav/Makefile     | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
Comment 7 Yasuhiro Kimura freebsd_committer freebsd_triage 2023-09-12 12:00:46 UTC
Should be fixed with ports 0146693b1a61.
Please re-open PR if build error still happens.