Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-09-01 Thread Ian Lance Taylor
On Thu, Sep 1, 2022 at 6:13 AM Shane wrote: > > Does that mean it is not possible to cross-compile Go for a Solaris target on > a Linux host until one or both of those issues have been fixed? You can set the GO_LDSO environment variable to the correct value when running make.bash. That might

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-09-01 Thread Shane
Does that mean it is not possible to cross-compile Go for a Solaris target on a Linux host until one or both of those issues have been fixed? On Thursday, September 1, 2022 at 4:11:16 AM UTC-4 se...@liao.dev wrote: > That's a known issue, see: > https://go.dev/issue/53813 >

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-09-01 Thread 'Sean Liao' via golang-nuts
That's a known issue, see: https://go.dev/issue/53813 https://go.dev/issue/54197 - sean On Wed, Aug 31, 2022, 21:35 Shane wrote: > I was finally able to compile the bootstrap on Linux (I had to install the > missing libc). > > However, after copying the .tbz file onto my Solaris 11u4 AMD64

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-31 Thread Shane
I was finally able to compile the bootstrap on Linux (I had to install the missing libc). However, after copying the .tbz file onto my Solaris 11u4 AMD64 machine to build the final Go tools, building fails: $ GOROOT_BOOTSTRAP=/tmp/bootstap-goroot CGO_ENABLED=1 ./all.bash Building Go cmd/dist

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-27 Thread Ian Lance Taylor
On Sat, Aug 27, 2022 at 12:15 PM Shane wrote: > > My understanding then is that cmd/dist first builds for the host here (in my > case, for Linux) and then builds for the target starting here. Since there is > always a build for the host first, then since my host OS is Linux, the >

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-27 Thread Shane
Ah, I see now, sorry for not noticing that. My understanding then is that cmd/dist first builds for the host here (in my case, for Linux) and then builds for the target starting here

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-27 Thread 'Sean Liao' via golang-nuts
make.bash calls cmd/dist which does the build chaining, calling it directly doesn't skip the process. - sean On Sat, Aug 27, 2022, 19:54 Shane wrote: > > Is there some way I can skip straight to building Go for my Solaris > target using my existing Linux Go tools? > Sorry, this question was

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-27 Thread Shane
> Is there some way I can skip straight to building Go for my Solaris target using my existing Linux Go tools? Sorry, this question was foolish. Of course I can skip straight to building for Solaris, by using the make.bash script. But as I pointed out earlier, > I looked at the POSIX docs

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-27 Thread Shane
I already have a working Go 1.19 for Linux with cgo support on my build machine that I downloaded and installed from https://go.dev. Given this, is it still necessary to build for the host? Is there some way I can skip straight to building Go for my Solaris target using my existing Linux Go

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-27 Thread 'Sean Liao' via golang-nuts
The bootstrap process is a chain of builds that each build the next stage, to minimize any effects of the host system, in order to produce a consistent final artifact. Your builds are failing before it has successfully built the final host stage, cross compiling hasn't come into the picture yet.

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-27 Thread Shane
I noticed bootstrap.bash just calls make.bash here , and make.bash runs go build with the GOOS and GOARCH set to empty strings here . Does this mean

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-27 Thread Brian Candler
On Saturday, 27 August 2022 at 17:10:21 UTC+1 Shane wrote: > Is it expected that linux_syscall.c would be compiled when the GOOS > environment variable is set to solaris? I see the log output does include this line: Building packages and commands for host, linux/amd64. Although I'm not sure

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-19 Thread Shane
Compiling with the boostrap.bash script also fails: $ GOOS=solaris GOARCH=amd64 ./bootstrap.bash Copying to ../../go-solaris-amd64-bootstrap Cleaning ../../go-solaris-amd64-bootstrap Removing src@tmp/ Building ../../go-solaris-amd64-bootstrap Building Go cmd/dist using

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-18 Thread Ian Lance Taylor
On Thu, Aug 18, 2022 at 5:05 PM Shane wrote: > > 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

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-18 Thread Shane
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

Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-17 Thread Ian Lance Taylor
On Wed, Aug 17, 2022 at 4:28 PM Shane 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

[go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-17 Thread Shane
Hi fellow Gophers! 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.)