package/clamav: select musl-fts if not glibc
PATCH 1/2 package/clamav: select musl-fts if not glibc
By selecting musl-fts, a build failure on internal fts is avoided
Fixes:
- http://autobuild.buildroot.org/results/8f0d45202c9a7dbb4d0c7431040384990f04008b
--- package/clamav/Config.in | 1 + package/clamav/clamav.mk | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-)
package/clamav/Config.in +1 -0
@@ -7,6 +7,7 @@ config BR2_PACKAGE_CLAMAV select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBMSPACK select BR2_PACKAGE_LIBTOOL + select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_ZLIB help
package/clamav/clamav.mk +8 -3
@@ -25,10 +25,16 @@ CLAMAV_CONF_ENV = \ have_cv_ipv6=yes ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) -CLAMAV_CONF_ENV += LIBS=-latomic +CLAMAV_LIBS += -latomic endif -# UCLIBC_HAS_FTS is disabled, therefore disable fanotify (missing fts.h) +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),) +CLAMAV_DEPENDENCIES += musl-fts +CLAMAV_LIBS += -lfts +endif + +CLAMAV_CONF_ENV += LIBS="$(CLAMAV_LIBS)" + CLAMAV_CONF_OPTS = \ --with-dbdir=/var/lib/clamav \ --with-ltdl-include=$(STAGING_DIR)/usr/include \
@@ -40,7 +46,6 @@ CLAMAV_CONF_OPTS = \ --disable-zlib-vcheck \ --disable-rpath \ --disable-clamav \ - --disable-fanotify \ --disable-milter \ --disable-llvm \ --disable-clamdtop \
Signature · 1 line
2.23.0
PATCH 2/2 package/clamav: fix clamsubmit linking
Fixes:
- http://autobuild.buildroot.org/results/49973b2283c65de5155deaf633cd6569a37af375
--- ...ix-using-wrong-linker-for-clamsubmit.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 59f7ec0046e399e33003f83dd76f968441066ed4 Mon Sep 17 00:00:00 2001 +From: arlecchino <[email protected]> +Date: Mon, 9 Sep 2019 14:58:54 +0200 +Subject: [PATCH] Fix using wrong linker for clamsubmit + +Changing from Objective-C linker to C linker for clamsubmit + +[Retrieved from: +https://github.com/Cisco-Talos/clamav-devel/pull/108/commits/59f7ec0046e399e33003f83dd76f968441066ed4] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + clamsubmit/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clamsubmit/Makefile.in b/clamsubmit/Makefile.in +index 1ada5c620c..142f0f0291 100644 +--- a/clamsubmit/Makefile.in ++++ b/clamsubmit/Makefile.in +@@ -679,7 +679,7 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) + + clamsubmit$(EXEEXT): $(clamsubmit_OBJECTS) $(clamsubmit_DEPENDENCIES) $(EXTRA_clamsubmit_DEPENDENCIES) + @rm -f clamsubmit$(EXEEXT) +- $(AM_V_OBJCLD)$(OBJCLINK) $(clamsubmit_OBJECTS) $(clamsubmit_LDADD) $(LIBS) ++ $(AM_V_CCLD)$(LINK) $(clamsubmit_OBJECTS) $(clamsubmit_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT)
Signature · 1 line
2.23.0
PATCH 2/2 package/clamav: fix clamsubmit linking
Quoted 29 lines · Fabrice Fontaine
Fixes:
- http://autobuild.buildroot.org/results/49973b2283c65de5155deaf633cd6569a37af375Signed-off-by Fabrice Fontaine <[email protected]>--- ...ix-using-wrong-linker-for-clamsubmit.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patchpackage/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +14
-0@@ -0,0 +1,27 @@ +From 59f7ec0046e399e33003f83dd76f968441066ed4 Mon Sep 17 00:00:00 2001 +From: arlecchino <[email protected]> +Date: Mon, 9 Sep 2019 14:58:54 +0200 +Subject: [PATCH] Fix using wrong linker for clamsubmit + +Changing from Objective-C linker to C linker for clamsubmit + +[Retrieved from: +https://github.com/Cisco-Talos/clamav-devel/pull/108/commits/59f7ec0046e399e33003f83dd76f968441066ed4] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + clamsubmit/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch line 24
Quoted 10 lines
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +10
-0+diff --git a/clamsubmit/Makefile.in b/clamsubmit/Makefile.in +index 1ada5c620c..142f0f0291 100644 +--- a/clamsubmit/Makefile.in ++++ b/clamsubmit/Makefile.in +@@ -679,7 +679,7 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) + + clamsubmit$(EXEEXT): $(clamsubmit_OBJECTS) $(clamsubmit_DEPENDENCIES) $(EXTRA_clamsubmit_DEPENDENCIES) + @rm -f clamsubmit$(EXEEXT) +- $(AM_V_OBJCLD)$(OBJCLINK) $(clamsubmit_OBJECTS) $(clamsubmit_LDADD) $(LIBS) ++ $(AM_V_CCLD)$(LINK) $(clamsubmit_OBJECTS) $(clamsubmit_LDADD) $(LIBS)
The upstream commit [1] looks better, could you submit that one?
Regards,
Arnout
[1]
https://github.com/Cisco-Talos/clamav-devel/commit/a78fd7e91b77b83d73dcca84d4b48bebda27953f
Quoted 4 lines
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +3
-0+ + mostlyclean-compile: + -rm -f *.$(OBJEXT)
PATCH 2/2 package/clamav: fix clamsubmit linking
Dear Arnout,
Le dim. 13 oct. 2019 ? 22:35, Arnout Vandecappelle <[email protected]> a ?crit :
Quoted 37 lines · Fabrice Fontaine
Quoted 33 lines
Fixes:
- http://autobuild.buildroot.org/results/49973b2283c65de5155deaf633cd6569a37af375Signed-off-by Fabrice Fontaine <[email protected]>--- ...ix-using-wrong-linker-for-clamsubmit.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patchpackage/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +18
-0@@ -0,0 +1,27 @@ +From 59f7ec0046e399e33003f83dd76f968441066ed4 Mon Sep 17 00:00:00 2001 +From: arlecchino <[email protected]> +Date: Mon, 9 Sep 2019 14:58:54 +0200 +Subject: [PATCH] Fix using wrong linker for clamsubmit + +Changing from Objective-C linker to C linker for clamsubmit + +[Retrieved from: +https://github.com/Cisco-Talos/clamav-devel/pull/108/commits/59f7ec0046e399e33003f83dd76f968441066ed4] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + clamsubmit/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clamsubmit/Makefile.in b/clamsubmit/Makefile.in +index 1ada5c620c..142f0f0291 100644 +--- a/clamsubmit/Makefile.in ++++ b/clamsubmit/Makefile.in
Quoted 8 lines
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch line 24
Quoted 6 lines
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +6
-0+@@ -679,7 +679,7 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) + + clamsubmit$(EXEEXT): $(clamsubmit_OBJECTS) $(clamsubmit_DEPENDENCIES) $(EXTRA_clamsubmit_DEPENDENCIES) + @rm -f clamsubmit$(EXEEXT) +- $(AM_V_OBJCLD)$(OBJCLINK) $(clamsubmit_OBJECTS) $(clamsubmit_LDADD) $(LIBS) ++ $(AM_V_CCLD)$(LINK) $(clamsubmit_OBJECTS) $(clamsubmit_LDADD) $(LIBS)The upstream commit [1] looks better, could you submit that one?
This upstream commit is already in the current version (0.102.0) so obviously it isn't enough to fix our build failures.
I'm not an expert in Objective C and so I don't know why upstream wants to use it instead of C linker.
Quoted 12 lines
Regards,
Arnout[1]
https://github.com/Cisco-Talos/clamav-devel/commit/a78fd7e91b77b83d73dcca84d4b48bebda27953fQuoted 4 lines
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +3
-0+ + mostlyclean-compile: + -rm -f *.$(OBJEXT)
Best Regards,
Fabrice
PATCH 2/2 package/clamav: fix clamsubmit linking
Quoted 48 lines · Fabrice Fontaine
Dear Arnout,
Le dim. 13 oct. 2019 ? 22:35, Arnout Vandecappelle <[email protected]> a ?crit :
Quoted 37 lines · Fabrice Fontaine
Quoted 33 lines
Fixes:
- http://autobuild.buildroot.org/results/49973b2283c65de5155deaf633cd6569a37af375Signed-off-by Fabrice Fontaine <[email protected]>--- ...ix-using-wrong-linker-for-clamsubmit.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patchpackage/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +18
-0@@ -0,0 +1,27 @@ +From 59f7ec0046e399e33003f83dd76f968441066ed4 Mon Sep 17 00:00:00 2001 +From: arlecchino <[email protected]> +Date: Mon, 9 Sep 2019 14:58:54 +0200 +Subject: [PATCH] Fix using wrong linker for clamsubmit + +Changing from Objective-C linker to C linker for clamsubmit + +[Retrieved from: +https://github.com/Cisco-Talos/clamav-devel/pull/108/commits/59f7ec0046e399e33003f83dd76f968441066ed4] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + clamsubmit/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clamsubmit/Makefile.in b/clamsubmit/Makefile.in +index 1ada5c620c..142f0f0291 100644 +--- a/clamsubmit/Makefile.in ++++ b/clamsubmit/Makefile.inQuoted 8 lines
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch line 24
Quoted 6 lines
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +6
-0+@@ -679,7 +679,7 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) + + clamsubmit$(EXEEXT): $(clamsubmit_OBJECTS) $(clamsubmit_DEPENDENCIES) $(EXTRA_clamsubmit_DEPENDENCIES) + @rm -f clamsubmit$(EXEEXT) +- $(AM_V_OBJCLD)$(OBJCLINK) $(clamsubmit_OBJECTS) $(clamsubmit_LDADD) $(LIBS) ++ $(AM_V_CCLD)$(LINK) $(clamsubmit_OBJECTS) $(clamsubmit_LDADD) $(LIBS)The upstream commit [1] looks better, could you submit that one?
Quoted 4 lines
This upstream commit is already in the current version (0.102.0) so obviously it isn't enough to fix our build failures.
I'm not an expert in Objective C and so I don't know why upstream wants to use it instead of C linker.
So I studied this a little further and I understand the issue.
First of all, clamav sets AC_PROG_OBJC in configure.ac because they need that
to be able to link with MacOS libraries. For compilation this makes no difference because automake will automatically detect that .c files need CC and .cxx files need CXX. So OBJC is only used for linking. On Linux, at least for native compilation, it happens to work because AC_PROG_OBJC happens to default to gcc. But the effect is that we use the system gcc instead of the cross compiler for linking.
The patch you provided works, but only because we don't AUTORECONF, because
autoreconfiguring will undo the change. And obviously it's not upstreamable.
I have no idea what the proper solution is at the autotools level.
However, I just added 'OBJC=$(TARGET_CC)' to clamav's CONF_ENV and that seems
to work.
Regards,
Arnout
Quoted 16 lines
Quoted 12 lines
Regards,
Arnout[1]
https://github.com/Cisco-Talos/clamav-devel/commit/a78fd7e91b77b83d73dcca84d4b48bebda27953fQuoted 4 lines
package/clamav/0003-Fix-using-wrong-linker-for-clamsubmit.patch new file +3
-0+ + mostlyclean-compile: + -rm -f *.$(OBJEXT)Best Regards,
Fabrice
PATCH 2/2 package/clamav: fix clamsubmit linking
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle <[email protected]> writes:
Hi,
Quoted 4 lines
I have no idea what the proper solution is at the autotools level.
However, I just added 'OBJC=$(TARGET_CC)' to clamav's
CONF_ENVand that seems
to work.
That seems like the simplest/sanest workaround to me as well.
Signature · 1 line
Bye, Peter Korsgaard
Arnout Vandecappelle
AppliedPATCH 1/2 package/clamav: select musl-fts if not glibc
In reply to Fabrice FontaineQuoted 6 lines · Fabrice Fontaine
By selecting musl-fts, a build failure on internal fts is avoided
Fixes:
- http://autobuild.buildroot.org/results/8f0d45202c9a7dbb4d0c7431040384990f04008bSigned-off-by Fabrice Fontaine <[email protected]>
Applied to master, thanks.
Regards,
Arnout