I have now duped all of the linux files and created nsx variants, I've also
set the environment variables GOOS to nsx and GOARCH to amd64. When I tried
to run make.bat (If you try to port and run bootstrap.sh on windows, you
get an error message directing you to run make.bat instead on windows), it
complained that I should not uncomment "+build" or "+go:build" statements,
so I commented them again on the nsx files that it complained about. Now I
get the below error which makes sense as it sees multiple delcarations -
but I'm unsure how to go about fixing it. Can you please advice?
C:\Users\Sh\Documents\GitHub\goroot\src>make.bat
Building Go cmd/dist using C:\Users\Sh\Documents\GitHub\goroot
warning: GOPATH set to GOROOT (C:\Users\Sh\Documents\GitHub\goroot) has no
effect
# runtime
runtime\defs_windows.go:10:2: _PROT_NONE redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\defs_nsx_amd64.go:12:16:
previous declaration
runtime\defs_windows.go:11:2: _PROT_READ redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\defs_nsx_amd64.go:13:16:
previous declaration
runtime\defs_windows.go:12:2: _PROT_WRITE redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\defs_nsx_amd64.go:14:16:
previous declaration
runtime\defs_windows.go:13:2: _PROT_EXEC redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\defs_nsx_amd64.go:15:16:
previous declaration
runtime\defs_windows.go:15:2: _MAP_ANON redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\defs_nsx_amd64.go:17:17:
previous declaration
runtime\defs_windows.go:16:2: _MAP_PRIVATE redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\defs_nsx_amd64.go:18:17:
previous declaration
runtime\defs_windows.go:21:2: _SIGINT redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\defs_nsx_amd64.go:32:15:
previous declaration
runtime\mem_windows.go:27:6: sysAlloc redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\mem_nsx.go:20:47:
previous declaration
runtime\mem_windows.go:32:6: sysUnused redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\mem_nsx.go:39:36:
previous declaration
runtime\mem_windows.go:62:6: sysUsed redeclared in this block
C:\Users\Sh\Documents\GitHub\goroot\src\runtime\mem_nsx.go:119:34:
previous declaration
runtime\mem_windows.go:62:6: too many errors
C:\Users\Sh\Documents\GitHub\goroot\src>
On Friday, May 7, 2021 at 3:04:34 PM UTC+1 [email protected] wrote:
> This is about as far as I got on the last attempt. Hopefully we can figure
> out how to generate code that will start to run on NonStop at some point
> soon.
> -Randall
>
> On Thursday, May 6, 2021 at 10:35:27 p.m. UTC-4 Ian Lance Taylor wrote:
>
>> On Thu, May 6, 2021 at 6:16 AM Shiva <[email protected]> wrote:
>> >
>> > Thank you, that helps.
>> >
>> > Now, as I continue to work on 'porting', I have a question. The go
>> compiler that will be used for creating this 'bootstrap' version of go1.16
>> - does this come from the go1.16 windows binary or the go1.4 windows
>> binary? I ask because I have 'produced' both of them on different
>> directories (as I should) and wanted to make sure I set the right
>> 'GOROOT'/'GOPATH'/'GOBIN' variables and/or PATH to be able to produce the
>> bootstrap version.
>>
>> The Go compiler used to create the bootstrap compiler will be the Go
>> 1.16 Windows binary.
>>
>> Ian
>>
>>
>>
>> > On Wednesday, May 5, 2021 at 10:08:20 PM UTC+1 Ian Lance Taylor wrote:
>> >>
>> >> On Wed, May 5, 2021 at 1:00 PM Shiva <[email protected]> wrote:
>> >> >
>> >> > So I've now done the following steps as you suggested after removing
>> all the previous traces of Go from my machine to start from the scratch.
>> >> >
>> >> > 1. Install go1.4
>> >> > 2. Set GOROOT_BOOTSTRAP to go1.4
>> >> > 3. git clone go1.16
>> >> > 4. Run make.bat to 'make' Go on windows just to confirm that it does
>> build fine (which it clearly does)
>> >> >
>> >> > Now, I suppose I have to 'port' the current go1.16 src folder by
>> creating 'nsx' files similar to 'linux'? I'm now working on them and
>> hopefully will be able to break some ground.
>> >>
>> >> Yes.
>> >>
>> >> > But I also have a question - I think the reason we chose to port go
>> 1.4 instead of the latest source is because the latest source requires a
>> pre-existing go compiler and Nonstop (our target) machine didn't have one.
>> I suppose your earlier response suggests that as long as the intermediate
>> system has a pre-existing go compiler that can be used, it doesn't matter
>> if the target environment doesn't have a Go compiler - we can still
>> bootstrap the latest version of the source. I just wanted to confirm this
>> as I continued.
>> >>
>> >> Yes. That is what bootstrap.bash is for. See the description in the
>> >> comment near the start of bootstrap.bash.
>> >>
>> >> 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 [email protected].
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/golang-nuts/d1337a2d-46ee-430c-bd92-bd7f3168b28en%40googlegroups.com
>> .
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/19fb8d53-26bd-48fe-8b41-0bb3dc7732c7n%40googlegroups.com.