2

I'm trying to use golang on Solaris 5.10 i86c (x86 + x86_64) but I can't find a package made for Solaris.

In addition, I want this to make a binary file for Filebeat which runs in Solaris 5.10 systems. The actual release of Filebeat (amd64) doesn't work on my Solaris distro.

Anyone can guide me a little bit?

Niharika
  • 1,188
  • 15
  • 37

1 Answers1

3

Go supports Solaris 11 on amd64, but not sparc. To build for sparc you need to use gccgo.

To build a pure Go project for Solaris/amd64 you can use:

$ GOOS=solaris GOARCH=amd64 go build

See this answer https://stackoverflow.com/a/37419289/503798 for more info about Filebeat on Solaris (it includes a link to a Filebeat binary for solaris 11 on amd64).

Community
  • 1
  • 1
A J
  • 2,508
  • 21
  • 26
  • For an official source that Go only supports AMD64-based Solaris 11 and later (at least as of time of writing): https://go.dev/doc/go1.3#solaris (I know this is a link to a really old Go version, but to my understanding, at the time of writing this comment, no new Go version has expanded official Go support to older Solaris versions or to non-AMD64 Solaris). – Shane Bishop Jul 29 '22 at 18:24