1

I installed gccgo using:

sudo pacman -S gcc-go

When I tried building my code using go build -buildvcs=false -compiler gccgo ., the following error was returned:

# github.com/CompeyDev/nemo/prisma/db
gccgo: fatal error: Killed signal terminated program go1
compilation terminated.
note: module requires Go 1.19

So, I ran go version which returned go version unknown linux/amd64; note the "unknown". I have no clue how the version can return unknown.

Thanks to @JimB pointing out how the arch gcc-go package was compatible with version 1.18 only, I was able to downgrade go, and this fixed the compilation issue. However, now I have a new error:

# github.com/CompeyDev/nemo/prisma/db
gccgo: fatal error: Killed signal terminated program go1
compilation terminated.
DevComp
  • 11
  • 7
  • 1
    Why are you using gccgo? The go tool probably can't get the version from gccgo, but are you sure you can install gccgo with a version compatible with go1.19 in the first place, the arch gcc-go package claims 1.18. – JimB Dec 08 '22 at 15:54
  • @JimB, You're right -- I hadn't realized that gcc-go was compatible with 1.18 only. But now I get another error, updating the question accordingly. – DevComp Dec 08 '22 at 17:31
  • gccgo is going to be harder to debug, can you build your project with the standard toolchain to check for other errors? – JimB Dec 08 '22 at 18:30
  • The standard go build command does not exactly cause errors, that's that odd thing. – DevComp Dec 09 '22 at 02:46
  • Well if the project builds with the gc compiler, then you at least know it's something specific to gccgo. Maybe try with the `-x` flag to see what exactly is failing? Do you actually need gccgo at all? – JimB Dec 09 '22 at 14:56
  • The main reason why I need gccgo is for the binary size, as normal go builds are comparatively larger than gccgo builds. Size is of essence. I've actually run the command with the `-x` flag, but it does not exactly display any errors except for the one mentioned above, which is why I decided to seek help. – DevComp Dec 10 '22 at 13:42
  • The lack of error sounds like it’s killed externally. Are you running on a small instance where you could be running out of memory? – JimB Dec 10 '22 at 13:59
  • I have around 4 GB of memory, I think that should be enough. – DevComp Dec 10 '22 at 15:25

0 Answers0