Bugzilla – Bug 12026
Can't compile latest clamav-0.99.3
Last modified: 2018-03-05 05:36:51 EST
make[5]: Entering directory '/tmp/clamav-0.99.3/libclamav/c++' CXX libclamavcxx_la-bytecode2llvm.lo In file included from ./../dconf.h:28:0, from bytecode2llvm.cpp:199: ./../clamav.h:37:29: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] #if defined(HAVE_STAT64) && STAT64_BLACKLIST ^~~~~~~~~~~~~~~~ ./../clamav.h:37:29: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] In file included from bytecode2llvm.cpp:39:0: ./llvm/include/llvm/ADT/BitVector.h: In member function ‘int llvm::BitVector::find_next(unsigned int) const’: ./llvm/include/llvm/ADT/BitVector.h:161:20: warning: left shift of negative value [-Wshift-negative-value] Copy &= ~0L << BitPos; ^~~~~~ ./llvm/include/llvm/ADT/BitVector.h: In member function ‘void llvm::BitVector::set_unused_bits(bool)’: ./llvm/include/llvm/ADT/BitVector.h:376:37: warning: left shift of negative value [-Wshift-negative-value] Bits[UsedWords-1] &= ~(~0L << ExtraBits); ^~~~~~~~~ In file included from ./llvm/include/llvm/Support/Allocator.h:17:0, from ./llvm/include/llvm/ADT/StringMap.h:18, from bytecode2llvm.cpp:41: ./llvm/include/llvm/Support/AlignOf.h: At global scope: ./llvm/include/llvm/Support/AlignOf.h:57:24: error: expected unqualified-id before ‘alignof’ static inline unsigned alignof() { return AlignOf<T>::Alignment; } ^~~~~~~ In file included from ./llvm/include/llvm/ADT/StringMap.h:18:0, from bytecode2llvm.cpp:41: ./llvm/include/llvm/Support/Allocator.h: In member function ‘void llvm::SpecificBumpPtrAllocator<T>::DestroyAll()’: ./llvm/include/llvm/Support/Allocator.h:204:46: error: expected primary-expression before ‘<’ token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ ./llvm/include/llvm/Support/Allocator.h:204:39: warning: ISO C++ does not allow ‘alignof’ with a non-type [-Wpedantic] Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^~~~~~~ ./llvm/include/llvm/Support/Allocator.h:204:48: error: expected primary-expression before ‘>’ token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ ./llvm/include/llvm/Support/Allocator.h:204:50: error: expected primary-expression before ‘)’ token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ In file included from bytecode2llvm.cpp:41:0: ./llvm/include/llvm/ADT/StringMap.h: In static member function ‘static llvm::StringMapEntry<ValueTy>* llvm::StringMapEntry<ValueTy>::Create(const char*, const char*, AllocatorTy&, InitType)’: ./llvm/include/llvm/ADT/StringMap.h:170:33: error: expected primary-expression before ‘<’ token unsigned Alignment = alignof<StringMapEntry>(); ^ ./llvm/include/llvm/ADT/StringMap.h:170:26: warning: ISO C++ does not allow ‘alignof’ with a non-type [-Wpedantic] unsigned Alignment = alignof<StringMapEntry>(); ^~~~~~~ ./llvm/include/llvm/ADT/StringMap.h:170:48: error: expected primary-expression before ‘>’ token unsigned Alignment = alignof<StringMapEntry>(); ^ ./llvm/include/llvm/ADT/StringMap.h:170:50: error: expected primary-expression before ‘)’ token unsigned Alignment = alignof<StringMapEntry>(); ^ In file included from bytecode2llvm.cpp:69:0: ./llvm/include/llvm/Support/CommandLine.h: In member function ‘void llvm::cl::alias::done()’: ./llvm/include/llvm/Support/CommandLine.h:1326:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (AliasFor == 0) ^~ ./llvm/include/llvm/Support/CommandLine.h:1328:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ addArgument(); ^~~~~~~~~~~ bytecode2llvm.cpp: In function ‘void setGuard(unsigned char*)’: bytecode2llvm.cpp:2432:49: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] cl_hash_data("md5", salt, 48, guardbuf, NULL); ^ make[5]: *** [Makefile:2070: libclamavcxx_la-bytecode2llvm.lo] Error 1 make[5]: Leaving directory '/tmp/clamav-0.99.3/libclamav/c++' make[4]: *** [Makefile:1469: all] Error 2 make[4]: Leaving directory '/tmp/clamav-0.99.3/libclamav/c++' make[3]: *** [Makefile:3376: all-recursive] Error 1 make[3]: Leaving directory '/tmp/clamav-0.99.3/libclamav' make[2]: *** [Makefile:1089: all] Error 2 make[2]: Leaving directory '/tmp/clamav-0.99.3/libclamav' make[1]: *** [Makefile:675: all-recursive] Error 1 make[1]: Leaving directory '/tmp/clamav-0.99.3' make: *** [Makefile:503: all] Error 2 # gcc --version gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2) # g++ --version g++ (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2) # uname -as Linux localhost 4.14.14-300.fc27.x86_64 #1 SMP Fri Jan 19 13:19:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Same here. I would add the next too: Compiling on the same and also different machines with gcc 4.8.3 works correctly. Looking at the messages it seems to me that gcc 7.2.0, 7.2.1 and 7.3.0 are more strict. Also, this behavior was also in rc1/2 of 0.99.3. ----------------- Using the git with checkout 0.99.3, it does compile more but then the next error came: ^~~~~~~ ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp: In instantiation of ‘void {anonymous}::Emitter<CodeEmitter>::emitMemModRMByte(const llvm::MachineInstr&, unsigned int, unsigned int, intptr_t) [with CodeEmitter = llvm::JITCodeEmitter; intptr_t = long int]’: ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:835:21: required from ‘void {anonymous}::Emitter<CodeEmitter>::emitInstruction(const llvm::MachineInstr&, const llvm::TargetInstrDesc*) [with CodeEmitter = llvm::JITCodeEmitter]’ ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:137:24: required from ‘bool {anonymous}::Emitter<CodeEmitter>::runOnMachineFunction(llvm::MachineFunction&) [with CodeEmitter = llvm::JITCodeEmitter]’ ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:984:1: required from here ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 }; ^~~~~~~ ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp: At global scope: ../../../git-clamav-devel/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp:96:10: warning: ‘void {anonymous}::Emitter<CodeEmitter>::emitSIBByte(unsigned int, unsigned int, unsigned int) [with CodeEmitter = llvm::JITCodeEmitter]’ used but never defined void emitSIBByte(unsigned SS, unsigned Index, unsigned Base); ^~~~~~~~~~~ make[5]: *** [Makefile:4151: libllvmx86codegen_la-X86CodeEmitter.lo] Error 1 make[5]: Leaving directory '/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build/libclamav/c++' make[4]: *** [Makefile:1539: all] Error 2 make[4]: Leaving directory '/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build/libclamav/c++' make[3]: *** [Makefile:3514: all-recursive] Error 1 make[3]: Leaving directory '/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build/libclamav' make[2]: *** [Makefile:1216: all] Error 2 make[2]: Leaving directory '/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build/libclamav' make[1]: *** [Makefile:758: all-recursive] Error 1 make[1]: Leaving directory '/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build' make: *** [Makefile:586: all] Error 2 ----------------------------------------------------------- with master, I get the same errors as above. Sofar, clamav is not usable anymore on (at least) with gcc 7.2.0, 7.2.1 and 7.3.0 Regards, Frans.
We have problems in combination with DirectAdmin and Debian 9 Stretch: Trying to make clamav... make all-recursive make[1]: Entering directory '/usr/local/directadmin/custombuild/clamav-0.99.3' Making all in libltdl make[2]: Entering directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libltdl' make all-am make[3]: Entering directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libltdl' CC dlopen.lo CC libltdlc_la-preopen.lo CC libltdlc_la-lt__alloc.lo CC libltdlc_la-lt_dlloader.lo CC libltdlc_la-lt_error.lo CC libltdlc_la-ltdl.lo CC libltdlc_la-slist.lo CC lt__strl.lo CCLD dlopen.la ar: `u' modifier ignored since `D' is the default (see `U') CCLD libltdlc.la ar: `u' modifier ignored since `D' is the default (see `U') make[3]: Leaving directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libltdl' make[2]: Leaving directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libltdl' Making all in libclamav make[2]: Entering directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libclamav' make all-recursive make[3]: Entering directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libclamav' Making all in c++ make[4]: Entering directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libclamav/c++' make all-am make[5]: Entering directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libclamav/c++' CXX libclamavcxx_la-bytecode2llvm.lo CXX libclamavcxx_la-ClamBCRTChecks.lo In file included from bytecode2llvm.cpp:39:0: ./llvm/include/llvm/ADT/BitVector.h: In member function 'int llvm::BitVector::find_next(unsigned int) const': ./llvm/include/llvm/ADT/BitVector.h:161:20: warning: left shift of negative value [-Wshift-negative-value] Copy &= ~0L << BitPos; ^~~~~~ ./llvm/include/llvm/ADT/BitVector.h: In member function 'void llvm::BitVector::set_unused_bits(bool)': ./llvm/include/llvm/ADT/BitVector.h:376:37: warning: left shift of negative value [-Wshift-negative-value] Bits[UsedWords-1] &= ~(~0L << ExtraBits); ^~~~~~~~~ In file included from ./llvm/include/llvm/BasicBlock.h:18:0, from ./llvm/include/llvm/Function.h:23, from ./llvm/include/llvm/Analysis/CallGraph.h:54, from ClamBCRTChecks.cpp:31: ./llvm/include/llvm/SymbolTableListTraits.h: In member function 'ItemParentClass* llvm::SymbolTableListTraits<ValueSubClass, ItemParentClass>::getListOwner()': ./llvm/include/llvm/SymbolTableListTraits.h:49:53: warning: typedef 'Sublist' locally defined but not used [-Wunused-local-typedefs] typedef iplist<ValueSubClass> ItemParentClass::*Sublist; ^~~~~~~ In file included from ./llvm/include/llvm/Support/Allocator.h:17:0, from ./llvm/include/llvm/ADT/StringMap.h:18, from ./llvm/include/llvm/PassRegistry.h:20, from ./llvm/include/llvm/PassSupport.h:25, from ./llvm/include/llvm/Pass.h:366, from ./llvm/include/llvm/Analysis/CallGraph.h:55, from ClamBCRTChecks.cpp:31: ./llvm/include/llvm/Support/AlignOf.h: At global scope: ./llvm/include/llvm/Support/AlignOf.h:57:24: error: expected unqualified-id before 'alignof' static inline unsigned alignof() { return AlignOf<T>::Alignment; } ^~~~~~~ In file included from ./llvm/include/llvm/Support/Allocator.h:17:0, from ./llvm/include/llvm/ADT/StringMap.h:18, from bytecode2llvm.cpp:41: ./llvm/include/llvm/Support/AlignOf.h: At global scope: ./llvm/include/llvm/Support/AlignOf.h:57:24: error: expected unqualified-id before 'alignof' static inline unsigned alignof() { return AlignOf<T>::Alignment; } ^~~~~~~ In file included from ./llvm/include/llvm/ADT/StringMap.h:18:0, from bytecode2llvm.cpp:41: ./llvm/include/llvm/Support/Allocator.h: In member function 'void llvm::SpecificBumpPtrAllocator<T>::DestroyAll()': ./llvm/include/llvm/Support/Allocator.h:204:46: error: expected primary-expression before '<' token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ ./llvm/include/llvm/Support/Allocator.h:204:39: warning: ISO C++ does not allow 'alignof' with a non-type [-Wpedantic] Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^~~~~~~ ./llvm/include/llvm/Support/Allocator.h:204:48: error: expected primary-expression before '>' token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ ./llvm/include/llvm/Support/Allocator.h:204:50: error: expected primary-expression before ')' token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ In file included from bytecode2llvm.cpp:41:0: ./llvm/include/llvm/ADT/StringMap.h: In static member function 'static llvm::StringMapEntry<ValueTy>* llvm::StringMapEntry<ValueTy>::Create(const char*, const char*, AllocatorTy&, InitType)': ./llvm/include/llvm/ADT/StringMap.h:170:33: error: expected primary-expression before '<' token unsigned Alignment = alignof<StringMapEntry>(); ^ ./llvm/include/llvm/ADT/StringMap.h:170:26: warning: ISO C++ does not allow 'alignof' with a non-type [-Wpedantic] unsigned Alignment = alignof<StringMapEntry>(); ^~~~~~~ ./llvm/include/llvm/ADT/StringMap.h:170:48: error: expected primary-expression before '>' token unsigned Alignment = alignof<StringMapEntry>(); ^ ./llvm/include/llvm/ADT/StringMap.h:170:50: error: expected primary-expression before ')' token unsigned Alignment = alignof<StringMapEntry>(); ^ In file included from ./llvm/include/llvm/ADT/StringMap.h:18:0, from ./llvm/include/llvm/PassRegistry.h:20, from ./llvm/include/llvm/PassSupport.h:25, from ./llvm/include/llvm/Pass.h:366, from ./llvm/include/llvm/Analysis/CallGraph.h:55, from ClamBCRTChecks.cpp:31: ./llvm/include/llvm/Support/Allocator.h: In member function 'void llvm::SpecificBumpPtrAllocator<T>::DestroyAll()': ./llvm/include/llvm/Support/Allocator.h:204:46: error: expected primary-expression before '<' token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ ./llvm/include/llvm/Support/Allocator.h:204:39: warning: ISO C++ does not allow 'alignof' with a non-type [-Wpedantic] Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^~~~~~~ ./llvm/include/llvm/Support/Allocator.h:204:48: error: expected primary-expression before '>' token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ ./llvm/include/llvm/Support/Allocator.h:204:50: error: expected primary-expression before ')' token Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); ^ In file included from ./llvm/include/llvm/PassRegistry.h:20:0, from ./llvm/include/llvm/PassSupport.h:25, from ./llvm/include/llvm/Pass.h:366, from ./llvm/include/llvm/Analysis/CallGraph.h:55, from ClamBCRTChecks.cpp:31: ./llvm/include/llvm/ADT/StringMap.h: In static member function 'static llvm::StringMapEntry<ValueTy>* llvm::StringMapEntry<ValueTy>::Create(const char*, const char*, AllocatorTy&, InitType)': ./llvm/include/llvm/ADT/StringMap.h:170:33: error: expected primary-expression before '<' token unsigned Alignment = alignof<StringMapEntry>(); ^ ./llvm/include/llvm/ADT/StringMap.h:170:26: warning: ISO C++ does not allow 'alignof' with a non-type [-Wpedantic] unsigned Alignment = alignof<StringMapEntry>(); ^~~~~~~ ./llvm/include/llvm/ADT/StringMap.h:170:48: error: expected primary-expression before '>' token unsigned Alignment = alignof<StringMapEntry>(); ^ ./llvm/include/llvm/ADT/StringMap.h:170:50: error: expected primary-expression before ')' token unsigned Alignment = alignof<StringMapEntry>(); ^ In file included from bytecode2llvm.cpp:69:0: ./llvm/include/llvm/Support/CommandLine.h: In member function 'void llvm::cl::alias::done()': ./llvm/include/llvm/Support/CommandLine.h:1326:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (AliasFor == 0) ^~ ./llvm/include/llvm/Support/CommandLine.h:1328:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' addArgument(); ^~~~~~~~~~~ In file included from ClamBCRTChecks.cpp:59:0: ./llvm/include/llvm/Support/CommandLine.h: In member function 'void llvm::cl::alias::done()': ./llvm/include/llvm/Support/CommandLine.h:1326:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (AliasFor == 0) ^~ ./llvm/include/llvm/Support/CommandLine.h:1328:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' addArgument(); ^~~~~~~~~~~ bytecode2llvm.cpp: In function 'void setGuard(unsigned char*)': bytecode2llvm.cpp:2432:49: warning: ISO C++ forbids converting a string constant to 'char*' [-Wpedantic] cl_hash_data("md5", salt, 48, guardbuf, NULL); ^ Makefile:2077: recipe for target 'libclamavcxx_la-ClamBCRTChecks.lo' failed make[5]: *** [libclamavcxx_la-ClamBCRTChecks.lo] Error 1 make[5]: *** Waiting for unfinished jobs.... Makefile:2070: recipe for target 'libclamavcxx_la-bytecode2llvm.lo' failed make[5]: *** [libclamavcxx_la-bytecode2llvm.lo] Error 1 make[5]: Leaving directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libclamav/c++' Makefile:1469: recipe for target 'all' failed make[4]: *** [all] Error 2 make[4]: Leaving directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libclamav/c++' Makefile:3376: recipe for target 'all-recursive' failed make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libclamav' Makefile:1089: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/usr/local/directadmin/custombuild/clamav-0.99.3/libclamav' Makefile:675: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/usr/local/directadmin/custombuild/clamav-0.99.3' Makefile:503: recipe for target 'all' failed make: *** [all] Error 2 *** The make has failed, do you want to try to make again? (y,n): If I remove G++ on our test machine, the installation from ClamAV 0.99.3 works fine. But other packages didn't installed. That was not an option. It doesn't work on: Debian 9 Stretch # gcc --version gcc (Debian 6.3.0-18) 6.3.0 20170516 # g++ --version g++ (Debian 6.3.0-18) 6.3.0 20170516 # uname -as Linux servername 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux It works fine on: Debian 8 Jessie # gcc --version gcc (Debian 4.9.2-10) 4.9.2 # g++ --version g++ (Debian 4.9.2-10) 4.9.2 # uname -as Linux servername 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u3 (2017-08-15) x86_64 GNU/Linux
Ok, today's git (2018-2-8) - master branch - shows the same errors as with 0.99.3. Seems to be an assignment issue. Frans.
you need this commit: https://github.com/Cisco-Talos/clamav-devel/commit/73992eb2fab83075dac06f47da8850ef07bc2dd2#diff-fb6ba4e28aaf8aebb3d7c62a4c66ca1d
apply this patch with -p1 within libclamav/c++/llvm directory: https://github.com/llvm-mirror/llvm/commit/16c3b647eb100fe404ee65f106d563ddef6c74b7.patch
Lots of warnings when compiling...like: ./llvm/include/llvm/ADT/BitVector.h: In member function ‘void llvm::BitVector::set_unused_bits(bool)’: ./llvm/include/llvm/ADT/BitVector.h:376:37: warning: left shift of negative value [-Wshift-negative-value] Bits[UsedWords-1] &= ~(~0L << ExtraBits); The compilation eventually fails with: llvm/lib/Target/X86/X86CodeEmitter.cpp: In instantiation of ‘void {anonymous}::Emitter<CodeEmitter>::emitMemModRMByte(const llvm::MachineInstr&, unsigned int, unsigned int, intptr_t) [with CodeEmitter = llvm::JITCodeEmitter; intptr_t = long int]’: llvm/lib/Target/X86/X86CodeEmitter.cpp:835:21: required from ‘void {anonymous}::Emitter<CodeEmitter>::emitInstruction(const llvm::MachineInstr&, const llvm::TargetInstrDesc*) [with CodeEmitter = llvm::JITCodeEmitter]’ llvm/lib/Target/X86/X86CodeEmitter.cpp:137:24: required from ‘bool {anonymous}::Emitter<CodeEmitter>::runOnMachineFunction(llvm::MachineFunction&) [with CodeEmitter = llvm::JITCodeEmitter]’ llvm/lib/Target/X86/X86CodeEmitter.cpp:984:1: required from here llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 }; ^~~~~~~ llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] llvm/lib/Target/X86/X86CodeEmitter.cpp:570:25: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { } [-Wnarrowing] llvm/lib/Target/X86/X86CodeEmitter.cpp: At global scope: llvm/lib/Target/X86/X86CodeEmitter.cpp:96:10: warning: ‘void {anonymous}::Emitter<CodeEmitter>::emitSIBByte(unsigned int, unsigned int, unsigned int) [with CodeEmitter = llvm::JITCodeEmitter]’ used but never defined void emitSIBByte(unsigned SS, unsigned Index, unsigned Base); ^~~~~~~~~~~ make[5]: *** [Makefile:4072: libllvmx86codegen_la-X86CodeEmitter.lo] Error 1 make[5]: Leaving directory '/tmp/clamav-0.99.3/libclamav/c++' make[4]: *** [Makefile:1469: all] Error 2 make[4]: Leaving directory '/tmp/clamav-0.99.3/libclamav/c++' make[3]: *** [Makefile:3376: all-recursive] Error 1 make[3]: Leaving directory '/tmp/clamav-0.99.3/libclamav' make[2]: *** [Makefile:1089: all] Error 2 make[2]: Leaving directory '/tmp/clamav-0.99.3/libclamav' make[1]: *** [Makefile:675: all-recursive] Error 1 make[1]: Leaving directory '/tmp/clamav-0.99.3' make: *** [Makefile:503: all] Error 2 /tmp/clamav-0.99.3
Gianluigi Tiesi's solution to grab the commit they linked to allowed it to compile cleanly and install.
Clamav 0.99.4 is out, and includes changes to code to better support C++11 and therefore GCC 6. Please give it a try. Warm regards, Micah
Thank you! I can build ClamAV 0.99.4 on Debian 9 Stretch :) Problem solved.