Issues compiling selftests XADD - "Invalid usage of the XADD return value"
Hi All,
After rebasing (my MTU patchset) to bpf-next (232164e041e925a) I'm getting this error when compiling selftests (full error below signature):
"CLNG-BPF [test_maps] atomics.o"
"fatal error: error in backend: line 27: Invalid usage of the XADD return value" "PLEASE submit a bug report to https://bugs.llvm.org/ [...]"
It looked like a LLVM bug, so I compiled llvm-11.1.0-rc1, but it still fails.
I noticed Brendan Jackman changes... could this be related?
- -
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
dirs ~/git/kernel/bpf-next/tools/testing/selftests/bpf
CLNG-BPF [test_maps] atomics.o
fatal error: error in backend: line 27: Invalid usage of the XADD return value
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/local/bin/clang -g -mlittle-endian -Wno-compare-distinct-pointer-types -O2 -target bpf -mcpu=v3 -fcolor-diagnostics -D__TARGET_ARCH_x86 -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/tools/include -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf -I/home/jbrouer/git/kernel/bpf-next/tools/include/uapi -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/local/stow/llvm-11.1.0-rc1-git-9bbcb554cdbf/lib/clang/11.1.0/include -idirafter /usr/include -DENABLE_ATOMICS_TESTS -c -o /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/atomics.o progs/atomics.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'progs/atomics.c'.
4. Running pass 'BPF PreEmit Checking' on function '@add'
#0 0x0000000001969e8a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/local/bin/clang+0x1969e8a)
#1 0x0000000001967f84 llvm::sys::RunSignalHandlers() (/usr/local/bin/clang+0x1967f84)
#2 0x0000000001968478 llvm::sys::CleanupOnSignal(unsigned long) (/usr/local/bin/clang+0x1968478)
#3 0x00000000018f2b34 llvm::CrashRecoveryContext::HandleExit(int) (/usr/local/bin/clang+0x18f2b34)
#4 0x0000000001961ea7 llvm::sys::Process::Exit(int) (/usr/local/bin/clang+0x1961ea7)
#5 0x000000000095ca03 LLVMErrorHandler(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) (/usr/local/bin/clang+0x95ca03)
#6 0x00000000018f7ca5 llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/local/bin/clang+0x18f7ca5)
#7 0x00000000018f7dfe (/usr/local/bin/clang+0x18f7dfe)
#8 0x000000000096d5d1 (anonymous namespace)::BPFMIPreEmitChecking::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/bin/clang+0x96d5d1)
#9 0x0000000000f68484 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/local/bin/clang+0xf68484)
#10 0x0000000001348a68 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/bin/clang+0x1348a68)
#11 0x00000000013490e3 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/bin/clang+0x13490e3)
#12 0x0000000001347dc3 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/bin/clang+0x1347dc3)
#13 0x0000000001bd2514 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/bin/clang+0x1bd2514)
#14 0x0000000001bd32d1 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/bin/clang+0x1bd32d1) #15 0x00000000027798ce clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/clang+0x27798ce)
#16 0x00000000032c7449 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/clang+0x32c7449)
#17 0x0000000002176081 clang::FrontendAction::Execute() (/usr/local/bin/clang+0x2176081)
#18 0x000000000212e21b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/clang+0x212e21b)
#19 0x00000000022307a0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/clang+0x22307a0)
#20 0x000000000095d153 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang+0x95d153)
#21 0x000000000095b03b ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/usr/local/bin/clang+0x95b03b)
#22 0x0000000002011215 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/usr/local/bin/clang+0x2011215)
#23 0x00000000018f29c3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/local/bin/clang+0x18f29c3)
#24 0x0000000002011c71 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/usr/local/bin/clang+0x2011c71)
#25 0x0000000001fe9d21 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/usr/local/bin/clang+0x1fe9d21)
#26 0x0000000001fea54d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/usr/local/bin/clang+0x1fea54d)
#27 0x0000000001ff571f clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/usr/local/bin/clang+0x1ff571f)
#28 0x00000000008ee422 main (/usr/local/bin/clang+0x8ee422)
#29 0x00007f2417f0b1a3 __libc_start_main (/lib64/libc.so.6+0x271a3)
#30 0x000000000095abee _start (/usr/local/bin/clang+0x95abee)
make: *** [Makefile:417: /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/atomics.o] Error 1
Hi Jesper,
Quoted 6 lines · Jesper Dangaard Brouer
Hi All,
After rebasing (my MTU patchset) to bpf-next (
232164e041e925a) I'm getting this error when compiling selftests (full error below signature):
Quoted 7 lines
"CLNG-BPF [
test_maps] atomics.o"
"fatal error: error in backend: line 27: Invalid usage of the XADD return value" "PLEASE submit a bug report to https://bugs.llvm.org/ [...]"It looked like a LLVM bug, so I compiled llvm-11.1.0-rc1, but it still fails.
I noticed Brendan Jackman changes... could this be related?
Yes, since bpf-next commit 98d666d05a1d970 ("bpf: Add tests for new BPF atomic operations") you need llvm-project commit 286daafd6512 (was
https://reviews.llvm.org/D72184) for the selftests, which will be in Clang 12. You'll need to build LLVM from master.
Quoted 51 lines
- -
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouerdirs ~/git/kernel/bpf-next/tools/testing/selftests/bpf
CLNG-BPF [
test_maps] atomics.o
fatal error: error in backend: line 27: Invalid usage of the XADD return value
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump:0. Program arguments: /usr/local/bin/clang -g -mlittle-endian -Wno-compare-distinct-pointer-types -O2 -target bpf -mcpu=v3 -fcolor-diagnostics -D__TARGET_ARCH_x86 -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/tools/include -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf -I/home/jbrouer/git/kernel/bpf-next/tools/include/uapi -I/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/local/stow/llvm-11.1.0-rc1-git-9bbcb554cdbf/lib/clang/11.1.0/include -idirafter /usr/include -DENABLE_ATOMICS_TESTS -c -o /home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/atomics.o progs/atomics.c 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'progs/atomics.c'. 4. Running pass 'BPF PreEmit Checking' on function '@add'#0
0x0000000001969e8allvm::sys::PrintStackTrace(llvm::raw_ostream&)(/usr/local/bin/clang+0x1969e8a)
#10x0000000001967f84llvm::sys::RunSignalHandlers()(/usr/local/bin/clang+0x1967f84)
#20x0000000001968478llvm::sys::CleanupOnSignal(unsigned long)(/usr/local/bin/clang+0x1968478)
#30x00000000018f2b34llvm::CrashRecoveryContext::HandleExit(int)(/usr/local/bin/clang+0x18f2b34)
#40x0000000001961ea7llvm::sys::Process::Exit(int)(/usr/local/bin/clang+0x1961ea7)
#50x000000000095ca03LLVMErrorHandler(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) (/usr/local/bin/clang+0x95ca03)
#60x00000000018f7ca5llvm::report_fatal_error(llvm::Twine const&, bool)(/usr/local/bin/clang+0x18f7ca5)
#70x00000000018f7dfe(/usr/local/bin/clang+0x18f7dfe)
#80x000000000096d5d1(anonymous namespace)::BPFMIPreEmitChecking::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/bin/clang+0x96d5d1)
#90x0000000000f68484llvm::MachineFunctionPass::runOnFunction(llvm::Function&)(/usr/local/bin/clang+0xf68484)
#100x0000000001348a68llvm::FPPassManager::runOnFunction(llvm::Function&)(/usr/local/bin/clang+0x1348a68)
#110x00000000013490e3llvm::FPPassManager::runOnModule(llvm::Module&)(/usr/local/bin/clang+0x13490e3)
#120x0000000001347dc3llvm::legacy::PassManagerImpl::run(llvm::Module&)(/usr/local/bin/clang+0x1347dc3)
#130x0000000001bd2514(anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/bin/clang+0x1bd2514)
#140x0000000001bd32d1clang::EmitBackendOutput(clang::DiagnosticsEngine&,clang::HeaderSearchOptionsconst&,clang::CodeGenOptionsconst&,clang::TargetOptionsconst&,clang::LangOptionsconst&,llvm::DataLayoutconst&, llvm::Module*,clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/local/bin/clang+0x1bd32d1) #150x00000000027798ceclang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)(/usr/local/bin/clang+0x27798ce)
#160x00000000032c7449clang::ParseAST(clang::Sema&, bool, bool)(/usr/local/bin/clang+0x32c7449)
#170x0000000002176081clang::FrontendAction::Execute()(/usr/local/bin/clang+0x2176081)
#180x000000000212e21bclang::CompilerInstance::ExecuteAction(clang::FrontendAction&)(/usr/local/bin/clang+0x212e21b)
#190x00000000022307a0clang::ExecuteCompilerInvocation(clang::CompilerInstance*)(/usr/local/bin/clang+0x22307a0)
#200x000000000095d153cc1_main(llvm::ArrayRef<char const*>, char const*, void*)(/usr/local/bin/clang+0x95d153)
#210x000000000095b03bExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)(/usr/local/bin/clang+0x95b03b)
#220x0000000002011215void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) (/usr/local/bin/clang+0x2011215)
#230x00000000018f29c3llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)(/usr/local/bin/clang+0x18f29c3)
#240x0000000002011c71clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const (.part.0) (/usr/local/bin/clang+0x2011c71)
#250x0000000001fe9d21clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&)const (/usr/local/bin/clang+0x1fe9d21)
#260x0000000001fea54dclang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int,clang::driver::Commandconst*> >&) const (/usr/local/bin/clang+0x1fea54d)
#270x0000000001ff571fclang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int,clang::driver::Commandconst*> >&) (/usr/local/bin/clang+0x1ff571f)
#280x00000000008ee422main (/usr/local/bin/clang+0x8ee422)
#290x00007f2417f0b1a3__libc_start_main(/lib64/libc.so.6+0x271a3)
#300x000000000095abee_start(/usr/local/bin/clang+0x95abee)
make: *** [Makefile:417:/home/jbrouer/git/kernel/bpf-next/tools/testing/selftests/bpf/atomics.o] Error 1
Quoted 1 line · Brendan Jackman
[...]
Quoted 6 lines
Yes, since bpf-next commit
98d666d05a1d970("bpf: Add tests for new BPF atomic operations") you need llvm-project commit286daafd6512(was
https://reviews.llvm.org/D72184) for the selftests, which will be in Clang 12. You'll need to build LLVM from master.
I ran into this as well, so a (shameless) plug: for folks running Debian derivatives, there's https://apt.llvm.org/ where you can get daily Clang snapshot builds.
Björn
Quoted 11 lines · On Mon, 18 Jan 2021 14:47:36 +0100 Brendan Jackman <[email protected]> wrote:
Quoted 10 lines · Jesper Dangaard Brouer
Hi All,
After rebasing (my MTU patchset) to bpf-next (
232164e041e925a) I'm getting this error when compiling selftests (full error below signature):"CLNG-BPF [
test_maps] atomics.o"
"fatal error: error in backend: line 27: Invalid usage of the XADD return value" "PLEASE submit a bug report to https://bugs.llvm.org/ [...]"
Quoted 9 lines
Quoted 3 lines
It looked like a LLVM bug, so I compiled llvm-11.1.0-rc1, but it still fails.
I noticed Brendan Jackman changes... could this be related?
Yes, since bpf-next commit
98d666d05a1d970("bpf: Add tests for new BPF atomic operations") you need llvm-project commit286daafd6512(was
https://reviews.llvm.org/D72184) for the selftests, which will be in Clang 12. You'll need to build LLVM from master.
I'm compiling from LLVM 'main' branch (commit e6d758de82b6) but it unfortunately fails to compile (see error below).
Any recommended LLVM commit id that works?
[...]../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1513:27: note: remove ‘std::move’ call ../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1519:27: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
1519 | return std::move(Err);
| ^../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1519:27: note: remove ‘std::move’ call ../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1526:29: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
1526 | return std::move(Err);
| ^../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1526:29: note: remove ‘std::move’ call
[2237/3183] Building CXX object tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o
FAILED: tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o/usr/lib64/ccache/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/ASTMatchers/Dynamic -I/home/jbrouer/git/llvm-project/clang/lib/ASTMatchers/Dynamic -I/home/jbrouer/git/llvm-project/clang/include -Itools/clang/include -Iinclude -I/home/jbrouer/git/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O2 -DNDEBUG -fno-exceptions -fno-rtti -std=c++14 -MD -MT tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o -MF tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o.d -o tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o -c /home/jbrouer/git/llvm-project/clang/lib/ASTMatchers/Dynamic/Registry.cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
[2255/3183] Building CXX object tools/clang/lib/ASTMatchers/CMakeFiles/obj.clangASTMatchers.dir/ASTMatchFinder.cpp.o
[2262/3183] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExpr.cpp.o
ninja: build stopped: subcommand failed.
Signature · 4 lines
Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer
Quoted 4 lines · Jesper Dangaard Brouer
I'm compiling from LLVM 'main' branch (commit
e6d758de82b6) but it unfortunately fails to compile (see error below).Any recommended LLVM commit id that works?
:(
I'm on 6f4ee6f87060 and things are working.
Quoted 21 lines
[...]
../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1513:27: note: remove ‘std::move’ call../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1519:27: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
1519 | returnstd::move(Err);
| ^../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1519:27: note: remove ‘std::move’ call../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1526:29: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
1526 | returnstd::move(Err);
| ^../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1526:29: note: remove ‘std::move’ call
[2237/3183] Building CXX objecttools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o
FAILED:tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o/usr/lib64/ccache/c++-DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/ASTMatchers/Dynamic -I/home/jbrouer/git/llvm-project/clang/lib/ASTMatchers/Dynamic -I/home/jbrouer/git/llvm-project/clang/include -Itools/clang/include -Iinclude -I/home/jbrouer/git/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O2 -DNDEBUG -fno-exceptions -fno-rtti -std=c++14 -MD -MTtools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o-MFtools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o.d-otools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o-c/home/jbrouer/git/llvm-project/clang/lib/ASTMatchers/Dynamic/Registry.cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.[2255/3183] Building CXX object
tools/clang/lib/ASTMatchers/CMakeFiles/obj.clangASTMatchers.dir/ASTMatchFinder.cpp.o[2262/3183] Building CXX object
tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExpr.cpp.o
ninja: build stopped: subcommand failed.
Quoted 9 lines · On Mon, 18 Jan 2021 16:24:10 +0100 Brendan Jackman <[email protected]> wrote:
Quoted 4 lines · Jesper Dangaard Brouer
I'm compiling from LLVM 'main' branch (commit
e6d758de82b6) but it unfortunately fails to compile (see error below).Any recommended LLVM commit id that works?
:(
I'm on
6f4ee6f87060and things are working.
I got compiling to work on this commit. But the error below, were likely caused by my compile machine simply ran out of memory (it "only" have 16GB RAM).
I reduced the number of parallel jobs (ninja -j6) and have now successfully compiled devel branch of LLVM.
Now the compile of BPF-selftests is possible again.
Quoted 22 lines
Quoted 21 lines
[...]
../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1513:27: note: remove ‘std::move’ call../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1519:27: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
1519 | returnstd::move(Err);
| ^../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1519:27: note: remove ‘std::move’ call../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1526:29: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
1526 | returnstd::move(Err);
| ^../include/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h:1526:29: note: remove ‘std::move’ call
[2237/3183] Building CXX objecttools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o
FAILED:tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o/usr/lib64/ccache/c++-DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/ASTMatchers/Dynamic -I/home/jbrouer/git/llvm-project/clang/lib/ASTMatchers/Dynamic -I/home/jbrouer/git/llvm-project/clang/include -Itools/clang/include -Iinclude -I/home/jbrouer/git/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O2 -DNDEBUG -fno-exceptions -fno-rtti -std=c++14 -MD -MTtools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o-MFtools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o.d-otools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o-c/home/jbrouer/git/llvm-project/clang/lib/ASTMatchers/Dynamic/Registry.cpp
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.[2255/3183] Building CXX object
tools/clang/lib/ASTMatchers/CMakeFiles/obj.clangASTMatchers.dir/ASTMatchFinder.cpp.o[2262/3183] Building CXX object
tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExpr.cpp.o
ninja: build stopped: subcommand failed.
Signature · 4 lines
Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer