Hi all,

204 views
Skip to first unread message

Kavindu Gimhan Zoysa

unread,
Jun 23, 2021, 3:04:38 PM6/23/21
to golang-nuts
By following `gollvm` document I started to build it. But I got this error in the middle of the build process. 

/home/kavindu/GIT/llvm-project/llvm/tools/gollvm/passes/GC.cpp:20:10: fatal error: llvm/CodeGen/GCStrategy.h: No such file or directory
   20 | #include "llvm/CodeGen/GCStrategy.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Could you please help me to solve this issue. 
I have used the llvm-project's main branch to build this. Do we need to strict to a special commit in llvm-project to build gollvm?

I am building this on ubuntu 20.04

Thank you,
Kavindu

Than McIntosh

unread,
Jun 23, 2021, 5:31:01 PM6/23/21
to Kavindu Gimhan Zoysa, golang-nuts
Hi,

I'll take a look -- stay tuned.   

Than


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c33bd416-c366-4fb0-a966-17553ffd0a76n%40googlegroups.com.

Than McIntosh

unread,
Jun 24, 2021, 9:23:31 AM6/24/21
to Kavindu Gimhan Zoysa, golang-nuts
Hello, 

I sent a CL to fix this problem: https://go-review.googlesource.com/c/gollvm/+/330609. I'll let you know when it is submitted. 

Thanks, Than

Kavindu Gimhan Zoysa

unread,
Jun 24, 2021, 9:26:31 AM6/24/21
to golang-nuts
Thanks a lot.

Than McIntosh

unread,
Jun 24, 2021, 11:36:28 AM6/24/21
to Kavindu Gimhan Zoysa, golang-nuts
This change has been submitted; if you update your gollvmn repo you should be able to build cleanly now.

Thanks, Than

Kavindu Gimhan Zoysa

unread,
Jun 24, 2021, 1:55:20 PM6/24/21
to golang-nuts
Thank you. Do not I need to check out for a special commit? Can I build the gollvm by checking out the latest commits in all dependant repositories(llvm-project, libbacktrace, libgo etc)?

Thank you,
Kavindu

Kavindu Gimhan Zoysa

unread,
Jun 27, 2021, 12:21:56 AM6/27/21
to golang-nuts
Hi,

cmake -DCMAKE_INSTALL_PREFIX=/my/install/dir -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=gold -G Ninja ../llvm-project/llvm
I have tried to run the above command with updated third-party repositories(latest llvm-project) and got the below error. Any idea on this?

error: ‘class llvm::opt::OptTable’ has no member named ‘PrintHelp’; did you mean ‘printHelp’?
  104 |     opts_->PrintHelp(errs(), progname, "Gollvm (LLVM-based Go compiler)",
      |            ^~~~~~~~~
      |            printHelp
ninja: build stopped: subcommand failed.

Than McIntosh

unread,
Jun 29, 2021, 1:31:41 PM6/29/21
to Kavindu Gimhan Zoysa, golang-nuts
I sent a CL to fix this, please stay tuned. https://go-review.googlesource.com/c/gollvm/+/331729

Thanks, Than


Than McIntosh

unread,
Jun 29, 2021, 2:01:51 PM6/29/21
to Kavindu Gimhan Zoysa, golang-nuts
OK, fix https://go-review.googlesource.com/c/gollvm/+/331729 submitted. Thanks for reporting.

Than

Kavindu Gimhan Zoysa

unread,
Jun 29, 2021, 3:25:43 PM6/29/21
to golang-nuts
Thank you, I will run a build.
Reply all
Reply to author
Forward
0 new messages