You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
I am using the following llvm
git clone -b roc-3.7.x https://github.com/RadeonOpenCompute/llvm-project.git
when I tried to compile with master branch, I got following errors:
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp: In member function 'int AssemblerExample::RunAssemble()':
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:116:85: error: no matching function for call to 'llvm::Target::createMCAsmInfo(const llvm::MCRegisterInfo&, const char*&) const'
:unique_ptr MAI(TheTarget->createMCAsmInfo(MRI, TripleName));
^
In file included from /work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:54:0:
/opt/rocm/llvm/include/llvm/Support/TargetRegistry.h:339:14: note: candidate: llvm::MCAsmInfo llvm::Target::createMCAsmInfo(const llvm::MCRegisterInfo&, llvm::StringRef, const llvm::MCTargetOptions&) const
MCAsmInfo createMCAsmInfo(const MCRegisterInfo &MRI, StringRef TheTriple,
^~~~~~~~~~~~~~~
/opt/rocm/llvm/include/llvm/Support/TargetRegistry.h:339:14: note: candidate expects 3 arguments, 2 provided
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:125:59: error: 'Default' is not a member of 'llvm::CodeModel'
MOFI.InitMCObjectFileInfo(TheTriple, true, CodeModel::Default, Ctx);
^~~~~~~
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:125:59: note: suggested alternatives:
In file included from /opt/rocm/llvm/include/llvm/MC/MCObjectFileInfo.h:19:0,
from /work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:50:
/opt/rocm/llvm/include/llvm/Support/CodeGen.h:37:18: note: 'Default'
enum Level { Default=0, Small=1, Large=2 };
^~~~~~~
/opt/rocm/llvm/include/llvm/Support/CodeGen.h:55:7: note: 'Default'
Default = 2, // -O2, -Os
^~~~~~~
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:140:88: error: no matching function for call to 'llvm::Target::createMCAsmBackend(const llvm::MCRegisterInfo&, const char&, const char*&, llvm::MCTargetOptions&) const'
ackend *MAB = TheTarget->createMCAsmBackend(MRI, TripleName, MCPU, MCOptions);
^
In file included from /work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:54:0:
/opt/rocm/llvm/include/llvm/Support/TargetRegistry.h:407:17: note: candidate: llvm::MCAsmBackend llvm::Target::createMCAsmBackend(const llvm::MCSubtargetInfo&, const llvm::MCRegisterInfo&, const llvm::MCTargetOptions&) const
MCAsmBackend *createMCAsmBackend(const MCSubtargetInfo &STI,
^~~~~~~~~~~~~~~~~~
/opt/rocm/llvm/include/llvm/Support/TargetRegistry.h:407:17: note: candidate expects 3 arguments, 4 provided
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:143:52: error: 'make_unique' was not declared in this scope
std::unique_ptr<raw_string_ostream> DataStream(make_unique<raw_string_ostream>(Data));
^~~~~~~~~~~
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:143:52: note: suggested alternative:
In file included from /usr/include/c++/7/memory:80:0,
from /opt/rocm/llvm/include/llvm/ADT/Optional.h:22,
from /opt/rocm/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:12,
from /work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:45:
/usr/include/c++/7/bits/unique_ptr.h:836:5: note: 'std::make_unique'
make_unique(_Args&&...) = delete;
^~~~~~~~~~~
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:143:82: error: expected primary-expression before '>' token
ique_ptr<raw_string_ostream> DataStream(make_unique<raw_string_ostream>(Data));
^
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:144:67: error: expected primary-expression before '>' token
std::unique_ptr<buffer_ostream> BOS(make_unique<buffer_ostream>(DataStream));
^
/work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:148:66: error: no matching function for call to 'llvm::Target::createMCObjectStreamer(llvm::Triple&, llvm::MCContext&, llvm::MCAsmBackend&, llvm::buffer_ostream&, llvm::MCCodeEmitter&, llvm::MCSubtargetInfo&, bool, bool, bool) const'
TheTriple, Ctx, *MAB, *BOS, CE, STI, false, false, false));
^
In file included from /work/rocm/LLVM-AMDGPU-Assembler-Extra/examples/api/assemble/assemble.cpp:54:0:
/opt/rocm/llvm/include/llvm/Support/TargetRegistry.h:470:15: note: candidate: llvm::MCStreamer llvm::Target::createMCObjectStreamer(const llvm::Triple&, llvm::MCContext&, std::unique_ptrllvm::MCAsmBackend&&, std::unique_ptrllvm::MCObjectWriter&&, std::unique_ptrllvm::MCCodeEmitter&&, const llvm::MCSubtargetInfo&, bool, bool, bool) const
MCStreamer *createMCObjectStreamer(const Triple &T, MCContext &Ctx,
^~~~~~~~~~~~~~~~~~~~~~
/opt/rocm/llvm/include/llvm/Support/TargetRegistry.h:470:15: note: no known conversion for argument 3 from 'llvm::MCAsmBackend' to 'std::unique_ptrllvm::MCAsmBackend&&'
examples/api/assemble/CMakeFiles/assemble.dir/build.make:84: recipe for target 'examples/api/assemble/CMakeFiles/assemble.dir/assemble.cpp.o' failed
make[2]: *** [examples/api/assemble/CMakeFiles/assemble.dir/assemble.cpp.o] Error 1
make[2]: Leaving directory '/work/rocm/LLVM-AMDGPU-Assembler-Extra/build'
CMakeFiles/Makefile2:846: recipe for target 'examples/api/assemble/CMakeFiles/assemble.dir/all' failed
make[1]: *** [examples/api/assemble/CMakeFiles/assemble.dir/all] Error 2
make[1]: Leaving directory '/work/rocm/LLVM-AMDGPU-Assembler-Extra/build'
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
root@sriov-guest:/work/rocm/LLVM-AMDGPU-Assembler-Extra/build# cd ..
root@sriov-guest:/work/rocm/LLVM-AMDGPU-Assembler-Extra# git status
On branch master
Your branch is up to date with 'origin/master'.
it seems there is mismatch of llvm api signatures.
Is there any advice how to fix these errors?
The text was updated successfully, but these errors were encountered: