Hello, The gollvm build with LLVM tip is currently broken; there have been some upstream LLVM changes that aren't compatible with the Gollvm bridge code (notably the opaque pointer migration), which causes build failures. This is a known problem, I haven't had enough free time to fix it recently.
I suggest building with slightly older versions of the LLVM and related repos. For example, this should work: gollvm commit: 3452ec6bebaa1b432aabed1991475f4444c1775e libbacktrace commit: fd9442f7b5413e7788dfcf356f6261afcedb56e8 libffi commit: 2e825e219fa06d308b9a9863d70320606d67490d gofrontend commit 1c5bfd57131b68b91d8400bb017f35d416f7aa7b llvm-project commit 09629215c272f09e3ebde6cc7eac9625d28910ff Let me know if you have issues building with this setup. Thanks, Than On Tue, Jan 31, 2023 at 1:04 AM 张勇强 <skymyweakn...@gmail.com> wrote: > I build gollvm on linux. Is gollvm depend on a fiexed version of llvm? > what's the version? thx > -- Retry after 5 seconds (attempt #3) ... > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GC.cpp:47:3: > 错误:‘Optional’不是一个类型名 > 47 | Optional<bool> isGCManagedPointer(const Type *Ty) const override > { > | ^~~~~~~~ > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GC.cpp: > 在函数‘void emitCallsiteEntries(llvm::StackMaps&, llvm::MCStreamer&)’中: > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GC.cpp:174:29: > 错误:cannot convert ‘int’ to ‘llvm::Align’ > 174 | OS.emitValueToAlignment(8); > | ^ > | | > | int > In file included from > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GC.cpp:25: > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/include/llvm/MC/MCStreamer.h:861:43: > 附注: 初始化‘virtual void llvm::MCStreamer::emitValueToAlignment(llvm::Align, > int64_t, unsigned int, unsigned int)’的实参 1 > 861 | virtual void emitValueToAlignment(Align Alignment, int64_t Value > = 0, > | ~~~~~~^~~~~~~~~ > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GC.cpp: > 在成员函数‘virtual bool > {anonymous}::GoGCPrinter::emitStackMaps(llvm::StackMaps&, > llvm::AsmPrinter&)’中: > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GC.cpp:186:6: > 错误:‘class llvm::MCStreamer’ has no member named ‘SwitchSection’; did you > mean ‘switchSection’? > 186 | OS.SwitchSection(StackMapSection); > | ^~~~~~~~~~~~~ > | switchSection > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1265:15: > 错误:‘ArgMemOnly’不是‘llvm::Attribute’的成员 > 1265 | Attribute::ArgMemOnly, Attribute::InaccessibleMemOnly, > | ^~~~~~~~~~ > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1265:38: > 错误:‘InaccessibleMemOnly’不是‘llvm::Attribute’的成员 > 1265 | Attribute::ArgMemOnly, Attribute::InaccessibleMemOnly, > | ^~~~~~~~~~~~~~~~~~~ > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1266:15: > 错误:‘InaccessibleMemOrArgMemOnly’不是‘llvm::Attribute’的成员 > 1266 | Attribute::InaccessibleMemOrArgMemOnly, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp: > 在函数‘void makeStatepointExplicitImpl(llvm::CallBase*, > llvm::SmallVectorImpl<llvm::Value*>&, llvm::SmallVectorImpl<llvm::Value*>&, > {anonymous}::PartiallyConstructedSafepointRecord&, > std::vector<{anonymous}::DeferredReplacement>&)’中: > /home/zyq/strength/gollvm/workarea/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:1433:50: > 错误:‘class llvm::PointerType’ has no member named ‘getElementType’; did you > mean ‘getArrayElementType’? > 1433 | Type *T = cast<PointerType>(V->getType())->getElementType(); > | ^~~~~~~~~~~~~~ > | > getArrayElementType > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/2d6a3e36-ea7a-475e-9994-5ecf1d393021n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/2d6a3e36-ea7a-475e-9994-5ecf1d393021n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2BUr55EE54Y0X_vRrJyCcovEo9ZyTZY_T4GMT3Gas0spuWQC1g%40mail.gmail.com.