From ArchWiki
Jump to navigation Jump to search

Permission problems

Installing Go with pacman might cause some permission problems. For example,

$ go install -tags netgo -ldflags="-s -w"
go install net: open /usr/lib/go/pkg/linux_amd64/net.a: permission denied

Managing Go packages

Maybe we should have some discussions about the packaging? NonerKao (talk) 01:41, 14 October 2017 (UTC)

Are you looking for Go package guidelines? --Franklin Yu (talk) 05:49, 27 November 2019 (UTC)

gccgo vs gc

The gccgo compiler (from gcc-go) is usually slower to compile but generally has more optimizations than the gc compiler (from go).

The Go language has always been defined by a spec, not an implementation. The Go team has written two different compilers that implement that spec: gc and gccgo.
  • Gc is the original compiler, and the go tool uses it by default.
  • Gccgo is a different implementation with a different focus
Compared to gc, gccgo is slower to compile code but supports more powerful optimizations, so a CPU-bound program built by gccgo will usually run faster.
The gc compiler supports only the most popular processors: x86 (32-bit and 64-bit) and ARM.
Gccgo, however, supports all the processors that GCC supports.
Not all those processors have been thoroughly tested for gccgo, but many have, including x86 (32-bit and 64-bit), SPARC, MIPS, PowerPC and even Alpha.
Gccgo has also been tested on operating systems that the gc compiler does not support, notably Solaris.
Gccgo in GCC 4.7.1 (July 2012, slightly reformatted for clarity)

-- The Puzzlemaker (talk) 04:46, 8 March 2020 (UTC)

Recent 2019 benchmarks appear to show that gc has improved more quickly than gccgo has (probably because it's received more attention), so even though gccgo has made significant improvements, gc seems like the better choice in most circumstances: Skyfaller (talk) 12:52, 11 April 2020 (UTC)