Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 661328 - app-antivirus/clamav has automagic dependency on dev-libs/icu
Summary: app-antivirus/clamav has automagic dependency on dev-libs/icu
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2018-07-16 15:31 UTC by Lars Wendler (Polynomial-C)
Modified: 2020-10-15 19:33 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
clamav-0.101.2-libxml2_pkgconfig.patch (clamav-0.101.2-libxml2_pkgconfig.patch,2.21 KB, patch)
2019-03-29 06:54 UTC, Lars Wendler (Polynomial-C)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) gentoo-dev 2018-07-16 15:31:54 UTC
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)
Comment 1 Thomas Raschbacher gentoo-dev 2018-07-17 05:19:43 UTC
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
Comment 2 Lars Wendler (Polynomial-C) gentoo-dev 2018-07-17 05:59:49 UTC
# qlist -CIve clamav
app-antivirus/clamav-0.100.1
Comment 3 Thomas Raschbacher gentoo-dev 2018-07-17 06:33:33 UTC
ok thanks that narrows it down a bit. i will see that i look later
Comment 4 Thomas Raschbacher gentoo-dev 2018-10-05 06:30:43 UTC
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
Comment 5 Thomas Raschbacher gentoo-dev 2018-10-05 09:52:49 UTC
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
Comment 6 Thomas Raschbacher gentoo-dev 2018-10-05 11:10:14 UTC
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)
Comment 7 Lars Wendler (Polynomial-C) gentoo-dev 2019-03-29 06:54:37 UTC
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.
Comment 8 Larry the Git Cow gentoo-dev 2019-07-31 12:07:26 UTC
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(-)
Comment 9 Lars Wendler (Polynomial-C) gentoo-dev 2019-07-31 12:08:29 UTC
Keeping this bug open until the patch has finally been submitted to and accepted by upstream.
Comment 10 Larry the Git Cow gentoo-dev 2019-10-14 07:11:52 UTC
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(+)
Comment 11 Michael Orlitzky gentoo-dev 2019-10-14 14:29:44 UTC
Thanks Lars. The upstream bug is now visible, and I attached your most recent patch to it.
Comment 12 Thomas Raschbacher gentoo-dev 2019-10-15 05:17:02 UTC
yeah unfortunately upstream really doesn't seem to care much .. thanks lars for the patch though. Maybe they will actually fix it upstream now.
Comment 13 Larry the Git Cow gentoo-dev 2019-11-25 16:27:50 UTC
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(-)
Comment 14 Michael Orlitzky gentoo-dev 2019-11-25 23:44:21 UTC
>     
>     - 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.