Using the tar on the current OpenSuSE Tumbleweed, I get:
In file included from
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/Support/Allocator.h:17:0,
from
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/ADT/StringMap.h:18,
from
../../../clamav-0.99.3/libclamav/c++/bytecode2llvm.cpp:41:
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/Support/AlignOf.h:
At global scope:
../../../clamav-0.99.3/libclamav/c++/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
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/ADT/StringMap.h:18:0,
from
../../../clamav-0.99.3/libclamav/c++/bytecode2llvm.cpp:41:
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/Support/Allocator.h:
In member function ‘void llvm::SpecificBumpPtrAllocator<T>::DestroyAll()’:
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/Support/Allocator.h:204:46:
error: expected primary-expression before ‘<’ token
Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
^
../../../clamav-0.99.3/libclamav/c++/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>());
^~~~~~~
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/Support/Allocator.h:204:48:
error: expected primary-expression before ‘>’ token
Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
^
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/Support/Allocator.h:204:50:
error: expected primary-expression before ‘)’ token
Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
^
In file included from
../../../clamav-0.99.3/libclamav/c++/bytecode2llvm.cpp:41:0:
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/ADT/StringMap.h:
In static member function ‘static llvm::StringMapEntry<ValueTy>*
llvm::StringMapEntry<ValueTy>::Create(const char*, const char*,
AllocatorTy&, InitType)’:
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/ADT/StringMap.h:170:33:
error: expected primary-expression before ‘<’ token
unsigned Alignment = alignof<StringMapEntry>();
^
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/ADT/StringMap.h:170:26:
warning: ISO C++ does not allow ‘alignof’ with a non-type [-Wpedantic]
unsigned Alignment = alignof<StringMapEntry>();
^~~~~~~
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/ADT/StringMap.h:170:48:
error: expected primary-expression before ‘>’ token
unsigned Alignment = alignof<StringMapEntry>();
^
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/ADT/StringMap.h:170:50:
error: expected primary-expression before ‘)’ token
unsigned Alignment = alignof<StringMapEntry>();
^
In file included from
../../../clamav-0.99.3/libclamav/c++/bytecode2llvm.cpp:69:0:
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/Support/CommandLine.h:
In member function ‘void llvm::cl::alias::done()’:
../../../clamav-0.99.3/libclamav/c++/llvm/include/llvm/Support/CommandLine.h:1326:5:
warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (AliasFor == 0)
^~
../../../clamav-0.99.3/libclamav/c++/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();
^~~~~~~~~~~
../../../clamav-0.99.3/libclamav/c++/bytecode2llvm.cpp: In function
‘void setGuard(unsigned char*)’:
../../../clamav-0.99.3/libclamav/c++/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
'/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build/libclamav/c++'
make[4]: *** [Makefile:1469: all] Error 2
make[4]: Leaving directory
'/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build/libclamav/c++'
make[3]: *** [Makefile:3376: all-recursive] Error 1
make[3]: Leaving directory
'/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build/libclamav'
make[2]: *** [Makefile:1089: all] Error 2
make[2]: Leaving directory
'/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build/libclamav'
make[1]: *** [Makefile:675: all-recursive] Error 1
make[1]: Leaving directory
'/mnt/raidarray/fdb-data/projects/linux/security/clamav/clamav-build'
make: *** [Makefile:503: all] Error 2
--------------------------------------------------------------------
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 is more
strict.
Also, this behaviour 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 useable anymore on (at least) with gcc 7.2.0
Am I the only one?
Regards,
Frans.
_______________________________________________
clamav-users mailing list
clamav-users@lists.clamav.net
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users
Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq
http://www.clamav.net/contact.html#ml