I'm not sure what you mean when you ask which C library version I am using. 
Are you asking the version of my libc?

I am cross-compiling on Debian 10 using Go 1.19 and gcc 4.7.4 (but my 
understanding is that a C compiler is only used for the cgo parts of the Go 
source tree, and that most of the Go source tree is compiled by Go). My 
target is Solaris 11.
On Wednesday, August 17, 2022 at 10:16:10 PM UTC-4 Ian Lance Taylor wrote:

> On Wed, Aug 17, 2022 at 4:28 PM Shane <skull...@gmail.com> wrote:
> >
> > I am trying to follow what I believe to be the official instructions for 
> building Go from source. (I am not trying to build my own Go code, I am 
> trying to build the Go project itself.)
> >
> > The reason I want to do this is to build a Go 1.19 compiler for Solaris, 
> since there are no prebuilt Go 1.19 binaries for Solaris available on the 
> Go downloads page.
> >
> > On the official instructions page, under the "Optional environment 
> variables" section, it says "The Go compilation environment can be 
> customized by environment variables."
> >
> > Later in this same section, it then says that the GOOS and GOARCH 
> environment variables can be used to set the target operating system and 
> compilation architecture.
> >
> > I tried building like this, after cloning the source code and checking 
> out the go1.19 tag, but the build fails:
> >
> > $ GOOS=solaris GOARCH=amd64 GOROOT_FINAL=../publish ./all.bash
> > Building Go cmd/dist using /usr/local/go. (go1.19 linux/amd64)
> > Building Go toolchain1 using /usr/local/go.
> > Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
> > Building Go toolchain2 using go_bootstrap and Go toolchain1.
> > Building Go toolchain3 using go_bootstrap and Go toolchain2.
> > Building packages and commands for host, linux/amd64.
> > # runtime/cgo
> > linux_syscall.c: In function '_cgo_libc_setresgid':
> > linux_syscall.c:67:2: error: implicit declaration of function 
> 'setresgid' [-Werror=implicit-function-declaration]
> > linux_syscall.c: In function '_cgo_libc_setresuid':
> > linux_syscall.c:73:2: error: implicit declaration of function 
> 'setresuid' [-Werror=implicit-function-declaration]
> > cc1: all warnings being treated as errors
> > go tool dist: FAILED: 
> /some/redacted/parent/dirs/go/goroot/pkg/tool/linux_amd64/go_bootstrap 
> install std cmd: exit status 2
> >
> > I am building on Linux. I have gcc and Go 1.19 installed on my Linux 
> system, and both tools are on my PATH.
> >
> > I am looking for help fixing these errors.
>
> See src/bootstrap.bash for a script that can build a toolchain for a
> different target.
>
> That said, that's a strange error. What C library version are you using?
>
> Ian
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/84132b4b-64ef-4250-a162-1783cfd559bcn%40googlegroups.com.

Reply via email to