Re: Newbie: Can't compile

Peter Wiehe <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel
Message-ID <CAJzXLLzTLtnf_edzLiSYfiGFgxXE=Jz616A+BLPWWLLo56bmfA@mail.gmail.com>
2018-02-13 12:37 GMT+01:00, Gianluigi Tiesi <[email protected]>:
> On 02/10/2018 11:00 PM, Peter Wiehe wrote:
>> ...
>> So what can I do to get clamav sourcecode compiled?
>> ...
>
> apply this patch with -p1 withing libclamav/c++/llvm directory:
> https://github.com/llvm-mirror/llvm/commit/16c3b647eb100fe404ee65f106d563ddef6c74b7.patch
>
Many thanks. I've done so. Here is the resulting error output from "make":
...
make[5]: Entering directory
'/home/peter/Schreibtisch/clamav/clamav-0.99.3/libclamav/c++'
  CXX    libllvmx86codegen_la-X86CodeEmitter.lo
In file included from ./llvm/include/llvm/BasicBlock.h:18:0,
                 from ./llvm/include/llvm/Function.h:23,
                 from llvm/lib/Target/X86/X86JITInfo.h:17,
                 from llvm/lib/Target/X86/X86CodeEmitter.cpp:17:
./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;
                                                     ^~~~~~~
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:70: 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:70: error: narrowing
conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { }
[-Wnarrowing]
llvm/lib/Target/X86/X86CodeEmitter.cpp:570:70: error: narrowing
conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { }
[-Wnarrowing]
llvm/lib/Target/X86/X86CodeEmitter.cpp:570:70: error: narrowing
conversion of ‘-1’ from ‘int’ to ‘unsigned int’ inside { }
[-Wnarrowing]
llvm/lib/Target/X86/X86CodeEmitter.cpp:570:70: 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);
          ^~~~~~~~~~~
Makefile:4072: recipe for target 'libllvmx86codegen_la-X86CodeEmitter.lo' failed
...

--------------
What can I do now? *puzzled*

Kind regards
Peter Wiehe
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

http://www.clamav.net/contact.html#ml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.