../src/gallium/state_trackers/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’: ../src/gallium/state_trackers/clover/llvm/invocation.cpp:203:81: error: no matching function for call to ‘clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, const char* const*, const char* const*, clang::DiagnosticsEngine&)’ 203 | c->getInvocation(), copts.data(), copts.data() + copts.size(), diag)) | ^ In file included from /usr/local/include/clang/Frontend/CompilerInstance.h:15, from ../src/gallium/state_trackers/clover/llvm/codegen.hpp:37, from ../src/gallium/state_trackers/clover/llvm/invocation.cpp:49: /usr/local/include/clang/Frontend/CompilerInvocation.h:157:15: note: candidate: ‘static bool clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, llvm::ArrayRef<const char*>, clang::DiagnosticsEngine&)’ 157 | static bool CreateFromArgs(CompilerInvocation &Res, | ^~~~~~~~~~~~~~ /usr/local/include/clang/Frontend/CompilerInvocation.h:157:15: note: candidate expects 3 arguments, 4 provided ../src/gallium/state_trackers/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<llvm::Module> {anonymous}::link(llvm::LLVMContext&, const clang::CompilerInstance&, const std::vector<clover::module>&, std::string&)’: ../src/gallium/state_trackers/clover/llvm/invocation.cpp:360:23: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 360 | return std::move(mod); | ~~~~~~~~~^~~~~ ../src/gallium/state_trackers/clover/llvm/invocation.cpp:360:23: note: remove ‘std::move’ call
In theory, the following should be enough to get things going again, but it'd need to be wrapped in some logic to do clang version detection to keep the older versions working: diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 0a677ce2eaa..0ce3e970303 100644 --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp @@ -200,7 +200,7 @@ namespace { const std::string &device_clc_version = dev.device_clc_version(); if (!clang::CompilerInvocation::CreateFromArgs( - c->getInvocation(), copts.data(), copts.data() + copts.size(), diag)) + c->getInvocation(), copts, diag)) throw invalid_build_options_error(); diag_buffer->FlushDiagnostics(diag); Haven't tested it yet though beyond just building and running clinfo.
Caused by clang commit (1fac68b0dc19b03fd2c5e9856f0f2c5a11691348): https://reviews.llvm.org/D66797
I might be able to get to this tonight if no one else has by then. Gotta go do family things first.
See https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1794
(In reply to Laurent carlier from comment #4) > See https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1794 Thank you Laurent and Aaron, Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> /opt/opencl-example> ./run_tests.sh [snip] Running ./vec-load Passed 71 passes, 0 fails
*** Bug 111510 has been marked as a duplicate of this bug. ***
Created attachment 145235 [details] build failure log with patch applied After applying the change in the patch I get other clang realted errors that break clover build, log attached.
(In reply to LoneVVolf from comment #7) > Created attachment 145235 [details] > build failure log with patch applied > > After applying the change in the patch I get other clang realted errors that > break clover build, log attached. With a very quick look over your log, it seems to be a configuration problem on your site. Do you have old libs around? /usr/xxx vs /usr/local/xxx ? Fully removed old LLVM ~/build tree?
(In reply to Dieter Nützel from comment #8) > (In reply to LoneVVolf from comment #7) > > Created attachment 145235 [details] > > build failure log with patch applied > > > > After applying the change in the patch I get other clang realted errors that > > break clover build, log attached. > > With a very quick look over your log, it seems to be a configuration problem > on your site. > Do you have old libs around? > > /usr/xxx vs /usr/local/xxx ? > > Fully removed old LLVM ~/build tree? Oh, I had another look. Do you build libclc before Mesa git with the same LLVM version yourself, too? libMesaOpenCL.so.1.0.0 is OLD and if I'm right obsolete. Maybe try without OSMesa: libOSMesa(Gallium) I don't need and have it in my devel git tree. Sorry, I do not have much more time currently 'cause I'm involved in the funeral of my best friend on Wednesday.
(In reply to Dieter Nützel from comment #9) > (In reply to Dieter Nützel from comment #8) > > (In reply to LoneVVolf from comment #7) > > > Created attachment 145235 [details] > > > build failure log with patch applied > > > > > > After applying the change in the patch I get other clang realted errors that > > > break clover build, log attached. > > > > With a very quick look over your log, it seems to be a configuration problem > > on your site. > > Do you have old libs around? > > > > /usr/xxx vs /usr/local/xxx ? > > > > Fully removed old LLVM ~/build tree? > > Oh, I had another look. > > Do you build libclc before Mesa git with the same LLVM version yourself, too? > libMesaOpenCL.so.1.0.0 is OLD and if I'm right obsolete. > Maybe try without > OSMesa: libOSMesa(Gallium) > I don't need and have it in my devel git tree. > > Sorry, I do not have much more time currently 'cause I'm involved in the > funeral of my best friend on Wednesday. Old ~/.ccache dir?
nothing in /usr/local or usr , cleaning ~/.ccache dir and building against libclc-git also gave same error . I then checked the log more thoroughly, noticed this was the first time it went wrong : /usr/bin/ld: /usr/lib/libclangAST.a(ASTContext.cpp.o): in function `clang::ASTContext::getInterpContext()': Looked up history for ASTContext.cpp here https://github.com/llvm/llvm-project/commits/master/clang/lib/AST/ASTContext.cpp My most recent llvm trunk build was between those last 2 commits. Building fresh llvm trunk now, will report later.
Problem was indeed with llvm/clang commits, everything works now. I'm not good with feelings, but loosing someone you're close to is never easy. You have my best wishes, Dieter.
Should be fixed with: https://cgit.freedesktop.org/mesa/mesa/commit/?id=55c912883c9b3624ee060fe1a0232cf71e329d80 Sorry to hear about your friend Dieter. Best wishes to you and their family.
Fixed with: https://cgit.freedesktop.org/mesa/mesa/commit/?id=55c912883c9b3624ee060fe1a0232cf71e329d80 Thanks. Even for your condolence.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.