Mikael Lyngvig
2013-Dec-07 12:23 UTC
[LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.
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>
Duncan P. N. Exon Smith
2013-Dec-07 18:00 UTC
[LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.
On 2013 Dec 7, at 04:23, Mikael Lyngvig <mikael at lyngvig.org> wrote:> I am using the -std=c++11 flag to GCC.I didn’t even look at your errors, but my understanding is that -std=gnu++11 is more used (and much better tested) than -std=c++11. Any chance that fixes it for you?
Simon Atanasyan
2013-Dec-07 21:33 UTC
[LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.
On Sat, Dec 7, 2013 at 10:00 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:> On 2013 Dec 7, at 04:23, Mikael Lyngvig <mikael at lyngvig.org> wrote: > >> I am using the -std=c++11 flag to GCC. > > I didn’t even look at your errors, but my understanding is that -std=gnu++11 is more used (and much better tested) than -std=c++11. Any chance that fixes it for you?FYI The same problem on gcc 4.7/4.8/4.9 with -std=c++11 and -std=gnu++11. It looks like a bug in the gcc but that fact does not help to build lld. -- Simon
Mikael Lyngvig
2013-Dec-08 04:52 UTC
[LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.
I'll give it a try, thanks. -- Mikael 2013/12/7 Duncan P. N. Exon Smith <dexonsmith at apple.com>> On 2013 Dec 7, at 04:23, Mikael Lyngvig <mikael at lyngvig.org> wrote: > > > I am using the -std=c++11 flag to GCC. > > I didn’t even look at your errors, but my understanding is that > -std=gnu++11 is more used (and much better tested) than -std=c++11. Any > chance that fixes it for you? >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131208/b5a477db/attachment.html>
Possibly Parallel Threads
- [LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.
- [LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.
- [LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.
- [LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.
- [LLVMdev] GNU LLD build error? Seems that Clang likes LLD just fine.