On Wed, Jun 9, 2021 at 6:16 AM Shiva <emailshivasubraman...@gmail.com> wrote:
>
> 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

You need to

1) Teach your toolchain about the nsx build tag by adding it to
goosList in go/build/syslist.go and okgoos in cmd/dist/build.go and
KnownOS in cmd/go/internal/imports/build.go.
2) Add +build and go:build lines to your new files with an nsx build
tag, so that older toolchains don't get confused (for example see
runtime/os_aix.go that both has aix in the file name and also has
+build/go:build lines).

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/CAOyqgcVOapok%2B%2B5TR6Aw2sZ_AMNubc6pEW%3Dqh%2BMZ%2BH94eKX0jw%40mail.gmail.com.

Reply via email to