Bug 106619

Summary: [OpenCL][llvm-svn]build failure addPassesToEmitFile candidate expects 6 arguments, 3 provided
Product: Mesa Reporter: LoneVVolf <lonewolf>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 99553    
Attachments: build log

Description LoneVVolf 2018-05-22 16:41:36 UTC
Created attachment 139683 [details]
build log

Both autotools and meson give the same error.

Archlinux, gcc 8.1 , llvm-svn rev 332974 , mesa-git fe2edb25dd

for configure settings see https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mesa-git

Full build log attached, last relevant line :

llvm/codegen/native.cpp:135:49: error: no matching function for call to ‘llvm::TargetMachine::addPassesToEmitFile(clover::llvm::compat::pass_manager&, llvm::raw_svector_ostream&, llvm::TargetMachine::CodeGenFileType&)’
          if (tm->addPassesToEmitFile(pm, fos, ft))
                                                 ^
In file included from ./llvm/compat.hpp:50,
                 from llvm/codegen/native.cpp:31:
/usr/include/llvm/Target/TargetMachine.h:254:16: note: candidate: ‘virtual bool llvm::TargetMachine::addPassesToEmitFile(llvm::legacy::PassManagerBase&, llvm::raw_pwrite_stream&, llvm::raw_pwrite_stream*, llvm::TargetMachine::CodeGenFileType, bool, llvm::MachineModuleInfo*)’
   virtual bool addPassesToEmitFile(PassManagerBase &, raw_pwrite_stream &,
Comment 1 Jan Vesely 2018-05-22 23:45:26 UTC
Possible fix https://patchwork.freedesktop.org/patch/224857/
Comment 2 Levis Raju 2018-05-23 13:28:30 UTC
Same error here : 

llvm/codegen/native.cpp:135:49: error: no matching function for call to ‘llvm::TargetMachine::addPassesToEmitFile(clover::llvm::compat::pass_manager&, llvm::raw_svector_ostream&, llvm::TargetMachine::CodeGenFileType&)’
          if (tm->addPassesToEmitFile(pm, fos, ft))

Using Arch Linux 
llvm-svn 7.0
Comment 3 LoneVVolf 2018-05-24 15:02:49 UTC
Patch 1-3-clover-Fix-build-after-llvm-r332881.patch as suggested by jan vesely is now being applied to the archlinux AUR mesa-git package.

Build goes fine now and running clinfo gives a usable report.
(without clover supported hardware i can't test further.)

Levis, is your HW opencl capable and if so could you run some simple tests ?
Comment 4 Jan Vesely 2018-05-29 22:30:09 UTC
Fixed by d424be0feda503307692db8447f5989fa8e4a843
"clover: Fix build after llvm r332881."

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.