[llvm-dev] Cannot build master
Rainer Orth via llvm-dev
llvm-dev at lists.llvm.org
Thu Apr 23 12:18:17 PDT 2020
"Luke A. Guest via llvm-dev" <llvm-dev at lists.llvm.org> writes:
> Another attempt, using the following:
>
> cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm10-git
> -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
> -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON
> -DLLVM_HOST_TRIPLE=x86_64-pc-linux-gnu
> -DLLVM_TARGETS_TO_BUILD="AMDGPU;MSP430;WebAssembly;X86"
> -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR"
> -DLLVM_ENABLE_SPHINX=ON -DLIBUNWIND_INCLUDE_DOCS=ON -DLLVM_BUILD_DOCS=ON
> -DLLVM_ENABLE_PROJECTS="mlir;clang;clang-tools-extra;lld;compiler-rt;openmp;lldb;libcxx;libcxxabi;pstl;polly;parallel-libs;libclc"
> -G "Ninja" ../llvm
>
> Fails at:
[...]
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> lib/Object/CMakeFiles/LLVMObject.dir/ArchiveWriter.cpp.o: in function
> `llvm::writeArchive(llvm::StringRef,
> llvm::ArrayRef<llvm::NewArchiveMember>, bool,
> llvm::object::Archive::Kind, bool, bool,
> std::unique_ptr<llvm::MemoryBuffer,
> std::default_delete<llvm::MemoryBuffer> >)':
> ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1767):
> undefined reference to `llvm::raw_string_ostream::current_pos() const'
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x179d):
> undefined reference to `llvm::raw_string_ostream::current_pos() const'
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x17d4):
> undefined reference to `llvm::raw_string_ostream::current_pos() const'
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x180a):
> undefined reference to `llvm::raw_string_ostream::current_pos() const'
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1841):
> undefined reference to `llvm::raw_string_ostream::current_pos() const'
> /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> lib/Object/CMakeFiles/LLVMObject.dir/ArchiveWriter.cpp.o:ArchiveWriter.cpp:(.text._ZN4llvm12writeArchiveENS_9StringRefENS_8ArrayRefINS_16NewArchiveMemberEEEbNS_6object7Archive4KindEbbSt10unique_ptrINS_12MemoryBufferESt14default_deleteIS8_EE+0x1889):
> more undefined references to `llvm::raw_string_ostream::current_pos()
> const' follow
> collect2: error: ld returned 1 exit status
I've seen the same error in a shared build on Solaris with gcc 9.3.0.
Try using gcc 8.x or 7.x instead: that fixed the problem for me.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the llvm-dev
mailing list