Found this out after dev-libs/icu update because preserve-libs kicked in: # qlist -e clamav | xargs --no-run-if-empty scanelf -L -n -q -F '%n #F' | tr , '\n' | xargs --no-run-if-empty readlink -f | uniq | xargs --no-run-if-empty qfile -CS | sort -u | grep -F "dev-libs/icu" dev-libs/icu:0/62.1 (/usr/lib64/libicudata.so.62.1) dev-libs/icu:0/62.1 (/usr/lib64/libicui18n.so.62.1) dev-libs/icu:0/62.1 (/usr/lib64/libicuuc.so.62.1)
I did not have time anymore to get onto my dev box last night, but i just checked on one of our machines @ work .. which version are you using? My 0.99.3 does not depend on icu here
# qlist -CIve clamav app-antivirus/clamav-0.100.1
ok thanks that narrows it down a bit. i will see that i look later
it seems to be that icu is linked because of libxml2 checking xml2-config version... 2.9.4 -I/usr/include/libxml2 -lxml2 -lz -llzma -licui18n -licuuc -licudata -lm -ldl checking for xmlreader.h in /usr... found CPPFLAGS: -I/usr/include/libxml2 LD_FLAGS: -lxml2 -lz -llzma -licui18n -licuuc -licudata -lm -ldl looking into how to best deal with this
it seems like xml2-config adds ICU to the linker flags, so maybe port to pkg-config # xml2-config --cflags -I/usr/include/libxml2 # xml2-config --libs -lxml2 -lz -llzma -licui18n -licuuc -licudata -lm -ldl in contrast: # pkg-config libxml-2.0 --cflags -I/usr/include/libxml2 # pkg-config libxml-2.0 --libs -lxml2 so xml2-config seems to add a lot of unneeded libs to the linker .. submitted a bug upstream reporting a problem with --disable-xml and also askign them to port the autotools stuff from using xml2-config to pkg-config
Here's the link to the bug in clamav's bugzilla: https://bugzilla.clamav.net/show_bug.cgi?id=12202 (since all their bugs are marked as "security" they are not visible to the public by default, but I would think that'll be removed when someone looks at it making it publically viewable)
Created attachment 571132 [details, diff] clamav-0.101.2-libxml2_pkgconfig.patch Possible fix. Perhaps not the most elegant solution but the one with as minimal changes required as possible.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23f936685079e75931b026d5dcdb2e18015daf71 commit 23f936685079e75931b026d5dcdb2e18015daf71 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-07-31 12:02:32 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-07-31 12:07:20 +0000 app-antivirus/clamav: Revbump to remove automagic dep on dev-libs/icu Fixed without excplicit permission due to maintainer timeout. Bug: https://bugs.gentoo.org/661328 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> ...mav-0.101.2.ebuild => clamav-0.101.2-r1.ebuild} | 15 ++--- .../files/clamav-0.101.2-libxml2_pkgconfig.patch | 78 ++++++++++++++++++++++ 2 files changed, 85 insertions(+), 8 deletions(-)
Keeping this bug open until the patch has finally been submitted to and accepted by upstream.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f593e3ceffb4852d91cd62263c52bb33d38c3444 commit f593e3ceffb4852d91cd62263c52bb33d38c3444 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-10-14 07:10:09 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-10-14 07:11:46 +0000 app-antivirus/clamav: Remove automagic dep on dev-libs/icu (again) Bug: https://bugs.gentoo.org/661328 Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> app-antivirus/clamav/clamav-0.102.0.ebuild | 1 + .../files/clamav-0.102.0-libxml2_pkgconfig.patch | 101 +++++++++++++++++++++ 2 files changed, 102 insertions(+)
Thanks Lars. The upstream bug is now visible, and I attached your most recent patch to it.
yeah unfortunately upstream really doesn't seem to care much .. thanks lars for the patch though. Maybe they will actually fix it upstream now.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21602230e4da2f80db97331ac2cfe78051d39395 commit 21602230e4da2f80db97331ac2cfe78051d39395 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-11-25 16:15:30 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-11-25 16:27:40 +0000 app-antivirus/clamav: Revbump to fix various linking issues - Don't call configure with --with-zlib=/usr or else we end up having "-L/usr/lib" in linker flags which breaks 64bit compilations in 17.1 profiles - Once again (third time) use pkg-config to check for libxml2 in order to avoud automagic and unnecessary linking to dev-libs/icu Bug: https://bugs.gentoo.org/661328 Closes: https://bugs.gentoo.org/699296 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> ...mav-0.102.1.ebuild => clamav-0.102.1-r1.ebuild} | 41 +++---- .../files/clamav-0.102.1-libxml2_pkgconfig.patch | 120 +++++++++++++++++++++ 2 files changed, 143 insertions(+), 18 deletions(-)
> > - Don't call configure with --with-zlib=/usr or else we end up having > "-L/usr/lib" in linker flags which breaks 64bit compilations in 17.1 > profiles > > - Once again (third time) use pkg-config to check for libxml2 in order > to avoud automagic and unnecessary linking to dev-libs/icu Mea culpa, thanks for fixing that again. The ClamAV blog says that this release contains "build system fixes ... to correctly link with libxml2 when detected" and, as if I'm completely new at this, I believed them. Also thanks for tracking down the zlib issue which looks like it was a PITA.