Install Go on Sparc. Getting confused, please help!

I have a need for the software Syncthing, it requires the software Go. This is on/for an Sparc 64bit machine. I believe that I am reading that I cant use the cgo (see instruction sets supported here: https://golang.org/doc/install/source#environment), so I believe I can use gogcc to compile a version of the Go software?

gcc --version

gcc (GCC) 4.8.2
Copyright © 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

uname -a

SunOS hostname 5.11 11.2 sun4v sparc SUNW,SPARC-Enterprise-T5220

I am getting confused of what I can and can’t do and the right way to move forward.

Please help

-Mike

The Go compiler, (which we call gc), from https://golang.org/ does not support SPARC yet.

You’ll have to use gccgo, and you’ll probably have to compile it from source to get a more recent version than 4.8.2

1 Like

ok…so I have gcc 4.8.2 installed on my server. Please help me figure out the below…

  1. Can I just go and download go source code and compile go on a SPARC machine? I would need Go 1.5 specifically, but apparently I could possibly use 1.3 or 1.4.
  2. Do I need to download a newer gcc software than 4.8.2 to be able to use or compile gccgo? Once I compile gccgo I would get the binary go so I can build my package?
  3. Might I possibly have to compile a newer version of gcc, then compile gccgo, then run go install_package to get the package I need…this all on SPARC.

I am trying to install syncthing on SPARC and I don’t compile, etc very often and need help/more direction than most to get to where I need to be.

Any help would be appreciated!!

-Mike

Someone has written a guide on cross compiling a GCC with GCCgo from Linux, which may be a starting point:

If I understand things correctly, you need at least GCC 5 to get a Go 1.3+ compatible compiler.

All of this will probably be complicated, painful and difficult. As the author of syncthing I applaud your enthusiasm, but I’m not sure the end result will be worth it, if it even runs.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.