https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: app-antivirus/clamav-1.3.0 fails to compile. Discovered on: arm (internal ref: tinderbox_arm) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Created attachment 887856 [details] build.log build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: FAILED: armv7-unknown-linux-gnueabihf/release/libclamav_rust.a /var/tmp/portage/app-antivirus/clamav-1.3.0/work/clamav-clamav-1.3.0_build/armv7-unknown-linux-gnueabihf/release/libclamav_rust.a error: literal out of range for `isize`
Also fails to build on x32. This is due to a bug in the "onenote" component. It uses custom discriminant values for enum variants for "PropertType" without specifying the type. This causes it to default to "isize" which on 64bit platforms is big enough to hold the 32bit constants, but causes overflow when isize is 32bit. It should be using u32. I guess nobody tests 32bit platforms with Rust?!? I'll attach a patch...
Created attachment 894555 [details, diff] patch for onenote to fix 32bit platforms This will need to be applied via eapply due to onenote being unpacked above ${S}. Patch against clamav-1.3.1, probably applies cleanly to 1.3.0 too.
Please send the patch upstream.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b99345bb35e9a6a208a3aa3cd6660b4d606cdb3 commit 7b99345bb35e9a6a208a3aa3cd6660b4d606cdb3 Author: Matt Jolly <kangie@gentoo.org> AuthorDate: 2024-06-24 10:24:55 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-06-24 11:04:15 +0000 app-antivirus/clamav: package maintenance revbump 1.3.1 with the following fixes: - add postinst message for 'clamonacc' - fix x32 builds - fix PID paths - drop py310; add py313 Bug: https://github.com/Cisco-Talos/clamav/issues/1076 Bug: https://bugs.gentoo.org/921088 Bug: https://bugs.gentoo.org/916147 Bug: https://bugs.gentoo.org/787233 Closes: https://bugs.gentoo.org/927214 Signed-off-by: Matt Jolly <kangie@gentoo.org> app-antivirus/clamav/clamav-1.3.1-r1.ebuild | 409 +++++++++++++++++++++ .../clamav/files/clamav-1.3.1-onenote-rs.patch | 30 ++ 2 files changed, 439 insertions(+)
I've submitted a PR upstream, however it looks pretty dead - outstanding PR from micah for the git crate we're using from clamav. I've raised a linked issue on the clamav GitHub so that this can be addressed upstream in the git crate or something, but until then we have a patch that we can apply.