ClamAV build failure: no matching function for call to min()

Bug #1752929 reported by Alex Rousskov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
eCAP
Fix Committed
Undecided
Unassigned

Bug Description

Building ecap on my Raspbian Pi 3+ (Runs with Minibian):

$ tar -xzf ecap_clamav_adapter-2.0.0.tar.gz
$ cd ecap_clamav_adapter-2.0.0
$ ./configure
...
$ make
...
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed:
Xaction.cc:305:49: note: mismatched types 'std::initializer_list<_Tp>' and 'unsigned int'
         bufSize = std::min(bufSize, tricklingMax);
                                                 ^
In file included from /usr/include/c++/6/algorithm:62:0,
                 from Xaction.cc:19:
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^~~
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed:
Xaction.cc:305:49: note: mismatched types 'std::initializer_list<_Tp>' and 'unsigned int'
         bufSize = std::min(bufSize, tricklingMax);
                                                 ^
Makefile:561: recipe for target 'ecap_clamav_adapter_la-Xaction.lo' failed

Revision history for this message
Alex Rousskov (rousskov) wrote :

I cannot reproduce this error, neither with your compiler version (GCC v6.3) nor with newer (more picky) GCC v7 and clang compilers. However, I have a hunch. Does the attached patch help?

description: updated
description: updated
Revision history for this message
Gill Bates (gillbates) wrote :

Boy, you don't make it easy for me to assist you getting closer to this issue.

I assume you asked me to modify the src/Xaction.cc file from your tar-Archive

Compiling failed with this error:

Xaction.cc:10:30: fatal error: atk/misc/Gadgets.h: No such file or directory
 #include "atk/misc/Gadgets.h"
                              ^
compilation terminated.
Makefile:561: recipe for target 'ecap_clamav_adapter_la-Xaction.lo' failed
make[2]: *** [ecap_clamav_adapter_la-Xaction.lo] Error 1
make[2]: Leaving directory '/home/pi/ecap_clamav_adapter-2.0.0/src'
Makefile:391: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pi/ecap_clamav_adapter-2.0.0/src'
Makefile:406: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Revision history for this message
Alex Rousskov (rousskov) wrote :

Replaced the posted (and probably useless) master-based patch with a v2.0.0-based patch (after reproducing the fixed-in-master problem using v2.0.0 sources on a 32bit platform).

Revision history for this message
Alex Rousskov (rousskov) wrote :

> Boy, you don't make it easy for me to assist you getting closer to this issue.

I regret that the quality of my support did not meet your expectations. FWIW, I completely misjudged your building-from-source skill level when responding to the original question, jumping to wrong conclusions and giving you wrong/inadequate information/instructions. I have corrected my assumptions and hope that the triage process will become more enjoyable for you going forward.

I also managed to reproduce a similar problem on a 32bit platform. It looks like we have fixed it some time ago, but have not released the new adapter version containing that fix. I adjusted the posted patch accordingly.

> I assume you asked me to modify the src/Xaction.cc file from your tar-Archive

To test the new patch, please run the following commands, adjusting their environment-specific aspects (e.g., the output redirection syntax) as needed to match your environment requirements:

---------
mkdir eclam-test
cd eclam-test
wget -q http://www.measurement-factory.com/tmp/ecap/ecap_clamav_adapter-2.0.0.tar.gz
wget -q https://bugs.launchpad.net/ecap/+bug/1752929/+attachment/5068296/+files/min-deduction-v2p0p0.patch
tar -xzf ecap_clamav_adapter-2.0.0.tar.gz
cd ecap_clamav_adapter-2.0.0
patch -p1 < ../min-deduction-v2p0p0.patch
(./configure && make -k) 1> build.log 2>&1 || echo "Build failed!"
---------

If any command up to (but not including) the last command fails, and you cannot fix it yourself, then please post the error message here. No need to run the last build command unless all the previous commands (or their equivalents) were successful.

If the last command prints "Build failed!", then please attach the build.log file (created by that last command) to this bug report for further analysis. Otherwise, please report success here so that we know that the posted patch fixed the problem for you.

Changed in ecap:
status: New → Fix Committed
Alex Rousskov (rousskov)
summary: - ClamAV build failure: recipe for Xaction.lo failed
+ ClamAV build failure: no matching function for call to min()
Revision history for this message
Gill Bates (gillbates) wrote :

Thanks Alex! You're awesome. Thanks for your patience. This patch solved the issue!

Here the last four lines of the build.log:

make[2]: Leaving directory '/home/pi/eclam-test/ecap_clamav_adapter-2.0.0/src'
make[1]: Leaving directory '/home/pi/eclam-test/ecap_clamav_adapter-2.0.0/src'
make[1]: Entering directory '/home/pi/eclam-test/ecap_clamav_adapter-2.0.0'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/home/pi/eclam-test/ecap_clamav_adapter-2.0.0'

What was the issue?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.