[LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.

Mikael Lyngvig mikael at lyngvig.org
Sat Dec 7 04:23:44 PST 2013


Hi,

I am trying to add a PowerPC/GNU LLD builder.  Therefore I am building
manually until everything is fine and I can link the builder into Zorg.

It almost completed but then I got this error:

[ 97%] Building CXX object
tools/lld/lib/ReaderWriter/ELF/X86_64/CMakeFiles/lldX86_64ELFTarget.dir/X86_64LinkingContext.cpp.o
/home/buildbot/buildbot/llvm-trunk/tools/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:
In member function ‘virtual llvm::ArrayRef<unsigned char>
{anonymous}::X86_64InitAtom::rawContent() const’:
/home/buildbot/buildbot/llvm-trunk/tools/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:40:12:
error: could not convert ‘(const uint8_t*)(&
{anonymous}::x86_64InitFiniAtomContent)’ from ‘const uint8_t* {aka
const unsigned char*}’ to ‘llvm::ArrayRef<unsigned char>’
     return x86_64InitFiniAtomContent;
            ^
/home/buildbot/buildbot/llvm-trunk/tools/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:
In member function ‘virtual llvm::ArrayRef<unsigned char>
{anonymous}::X86_64FiniAtom::rawContent() const’:
/home/buildbot/buildbot/llvm-trunk/tools/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:56:12:
error: could not convert ‘(const uint8_t*)(&
{anonymous}::x86_64InitFiniAtomContent)’ from ‘const uint8_t* {aka
const unsigned char*}’ to ‘llvm::ArrayRef<unsigned char>’
     return x86_64InitFiniAtomContent;
            ^
/home/buildbot/buildbot/llvm-trunk/tools/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:
In member function ‘virtual llvm::ArrayRef<unsigned char>
{anonymous}::X86_64InitAtom::rawContent() const’:
/home/buildbot/buildbot/llvm-trunk/tools/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:41:3:
warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
/home/buildbot/buildbot/llvm-trunk/tools/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:
In member function ‘virtual llvm::ArrayRef<unsigned char>
{anonymous}::X86_64FiniAtom::rawContent() const’:
/home/buildbot/buildbot/llvm-trunk/tools/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp:57:3:
warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
make[2]: *** [tools/lld/lib/ReaderWriter/ELF/X86_64/CMakeFiles/lldX86_64ELFTarget.dir/X86_64LinkingContext.cpp.o]
Error 1
make[1]: *** [tools/lld/lib/ReaderWriter/ELF/X86_64/CMakeFiles/lldX86_64ELFTarget.dir/all]
Error 2
make: *** [all] Error 2

It seems to me that there is a possible incompatibility between GCC
v4.8.2 and Clang because the Clang builders did the build without
errors.  I am using the -std=c++11 flag to GCC.

Any advice on how to proceed?  The problem seems related to a recent
change that eliminated the makeArrayRef() call in that very module.
Perhaps GCC and Clang differ in opinion on when to do automatic casts
are not?


-- Mikael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131207/6b3e4cbc/attachment.html>


More information about the llvm-dev mailing list