Please, please, please do not set GOROOT.
Leave GOROOT unset and cd into the src/ sub directory of the copy of Go you are trying to build.
Just to repeat, do not set GOROOT if you are building from source.
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
How did you build the cross compiling go? What were the exact commands you used?
You need to show us exactly the steps you used if we are to offer any useful help.
Also, if you are using Aram's port, you can build it natively on your SPARC64 host. There is no need to cross compile a toolchain Intel to sparc64
I don't have a go binary release for sparc-Solaris and Aram suggested that I build on any platform where I have go available so I built on intel-Linux. Here are the steps I followed:on intel-Linux machine:% cd go-sparc64/src% ./make.bashThis builds the cross-go and installs under go-sparc64/bin.
To use this compiler I did the following steps:% export PATH=<path-to-cross-go>/$PATH% cd .../hello% lshello.go% go build% lshello hello.go
% file hellohello: ELF 64-bit MSB executable, SPARC V9, total store ordering, version 1 (Solaris), dynamically linked (uses shared libs), not strippedOn a sparc-Solaris machine I try to run this hello:% helloruntime: address space conflict: map(0xc420000000) = 0xffffffff7eb00000
fatal error: runtime: address space conflict
On Tue, 23 May 2017, 13:33 Mukesh Kapoor <mu...@yahoo.com> wrote:I don't have a go binary release for sparc-Solaris and Aram suggested that I build on any platform where I have go available so I built on intel-Linux. Here are the steps I followed:on intel-Linux machine:% cd go-sparc64/src% ./make.bashThis builds the cross-go and installs under go-sparc64/bin.Unless you have set GOARCH=SPARC64 this will not build a cross compiling version.
To use this compiler I did the following steps:% export PATH=<path-to-cross-go>/$PATH% cd .../hello% lshello.go% go build% lshello hello.goYou can just run path-to-go-sparc64/bin/go buildAgain, make sure you have exported GOARCH=sparc64 if you want to compile for that architecture.% file hellohello: ELF 64-bit MSB executable, SPARC V9, total store ordering, version 1 (Solaris), dynamically linked (uses shared libs), not strippedOn a sparc-Solaris machine I try to run this hello:% helloruntime: address space conflict: map(0xc420000000) = 0xffffffff7eb00000
fatal error: runtime: address space conflictYup, that's a bug, I think the sparc64 port is based off a version of Go that is 2.5 years old now, many changes to the runtime have landed since then.
On Tue, May 23, 2017 at 1:53 PM, mu11 via golang-dev
<golan...@googlegroups.com> wrote:
>
>
> On Monday, May 22, 2017 at 8:38:28 PM UTC-7, Dave Cheney wrote:
>>
>>
>>
>> On Tue, 23 May 2017, 13:33 Mukesh Kapoor <mu...@yahoo.com> wrote:
>>>
>>> I don't have a go binary release for sparc-Solaris and Aram suggested
>>> that I build on any platform where I have go available so I built on
>>> intel-Linux. Here are the steps I followed:
>>>
>>> on intel-Linux machine:
>>> % cd go-sparc64/src
>>> % ./make.bash
>>>
>>> This builds the cross-go and installs under go-sparc64/bin.
>>
>>
>> Unless you have set GOARCH=SPARC64 this will not build a cross compiling
>> version.
>
>
> I had not set GOARCH for this step.
Then I have no idea how your toolchain produced a solaris/sparc64
binary; it should have produced an intel one.
Now my next task: bootstrap sparc64-go using the cross-go to create a native sparc go...
Excellent news!
--
Aram Hăvărneanu
On Tuesday, May 23, 2017 at 3:22:42 AM UTC-7, Aram Hăvărneanu wrote:On Tue, May 23, 2017 at 5:38 AM, Dave Cheney <da...@cheney.net> wrote:
> I think the sparc64 port is based off a version of Go that is 2.5 years old
> now, many changes to the runtime have landed since then.
Not really, it's based on the last version of Go 1.8 development tree
(so 1.7+) that still contained the old compiler, plus some more recent
changes.Any idea when it will be ported using the latest Go sources and when it will be available for download from the golang.org website?
> ##### Building Go bootstrap tool.
> cmd/dist
> go tool dist: unknown architecture: sun4v
>
> What's wrong now?
Possibly a bug, try setting up GOHOSTARCH=sparc64.
--
Aram Hăvărneanu
What is the output of your "uname -a" command ? This is the output on my system and I got a lot further than what you had:
uname -a
SunOS <system_name> 5.11 11.3 sun4v sparc sun4v
--
Aram Hăvărneanu
$> /export/home/wmuser/agent/go-solaris-sparc64-bootstrap/bin # ./go runtime: address space conflict: map(0xc420000000) = 0xffffffff7e200000 fatal error: runtime: address space conflict runtime stack: runtime.throw(0x74f60d, 0x1f) /home/ayasuda/agent/go-solaris-sparc64-bootstrap/src/runtime/panic.go:567 +0xe4 fp=0xffffffff7fffe230 sp=0xffffffff7fffe170 runtime.sysMap(0xc420000000, 0x100000, 0x0, 0x94b018) /home/ayasuda/agent/go-solaris-sparc64-bootstrap/src/runtime/mem_bsd.go:84 +0x1f4 fp=0xffffffff7
Solaris 10 10/09 s10s_u8wos_08a SPARC
Any lead is highly appreciated.
A. Yasuda