On Wed, Mar 24, 2021 at 11:18 AM Shiva <emailshivasubraman...@gmail.com> wrote: > > Thank you for that, Ian. > > Just to confirm, I see the following - > > *_linux.c, > *_linux.h, > *_linux.go, > *_linux.s, > *_linux.pl > > They are in different directories - crypto, internal\syscall, net, os, > runtime, sync\atomic and syscall under the src directory. But you had earlier > mentioned only runtime and syscall packages so do I have to add the rest too? > > After this I suppose I run bootstrap.bash which should create a go package > that I should try and run on the Nonstop.
In the long run you will most likely have to handle all of those one way or another, yes. Except probably for mksysnum_linux.pl. Ian > On Tuesday, March 23, 2021 at 6:51:55 PM UTC Ian Lance Taylor wrote: >> >> On Tue, Mar 23, 2021 at 9:41 AM Shiva <emailshiva...@gmail.com> wrote: >> > >> > Trying to pick this up where it was left, we have the list of files >> > *_linux.go, *_linux.s but not all of them have the build statements, do we >> > create new nsx files only for those which have build statements in them or >> > for all of those files? >> >> For all of them. And add build tags to all of them. The use of build >> tags in *_linux files is not consistent because the go tool has always >> recognized *_linux file names specially. >> >> Ian >> >> > On Sunday, June 7, 2020 at 2:38:09 AM UTC+1 Ian Lance Taylor wrote: >> >> >> >> On Sat, Jun 6, 2020 at 8:57 AM Randall Becker <the.n...@gmail.com> wrote: >> >> > >> >> > Thanks. Where do fix the linker. I found the files to modify - so will >> >> > basically copy the *_linux.go, *_linux.s in both runtime and syscalls >> >> > to *_nsx.go and *_nsx.s, replacing +build lines with nsx instead of >> >> > linux, I assume. Currently looking for an assembler cross-compiler for >> >> > the platform (I may have to write one, something I'm much more >> >> > comfortable with than the GO port) - I can wrap asm in C code, but I >> >> > don't know how to get GO to recognize that. >> >> >> >> Go uses its own assembler, in cmd/asm. >> >> >> >> Ian >> >> >> >> >> >> > On Friday, 5 June 2020 19:03:07 UTC-4, Ian Lance Taylor wrote: >> >> >> >> >> >> On Fri, Jun 5, 2020 at 3:46 PM Randall Becker <the....@gmail.com> >> >> >> wrote: >> >> >> > >> >> >> > That's actually what I figured. So where do I look to add nsx to the >> >> >> > toolchain? >> >> >> >> >> >> You'll have to fix the linker to generate whatever nsx expects. >> >> >> You'll have to add code to support nsx in the runtime and syscall >> >> >> packages. Pick which supported OS is most like nsx; let's say it's >> >> >> linux. Look for *_linux.go and *_linux.s files; you'll need nsx >> >> >> versions of those files. Look for +build lines in files that say >> >> >> linux; you'll need to add nsx, or write a separate file that works on >> >> >> nsx. >> >> >> >> >> >> It's a lot of work. >> >> >> >> >> >> Ian >> >> >> >> >> >> >> >> >> > On Friday, 5 June 2020 17:03:11 UTC-4, Ian Lance Taylor wrote: >> >> >> >> >> >> >> >> On Fri, Jun 5, 2020 at 12:49 PM Randall Becker <the....@gmail.com> >> >> >> >> wrote: >> >> >> >> > >> >> >> >> > Some progress. I've managed to build 1.14.4 using the Windows GO >> >> >> >> > implementation. The trouble I was having was using cygwin64. >> >> >> >> > After figuring that part out... >> >> >> >> > >> >> >> >> > I checked out a new branch from release_go1.14 named nonstop_port >> >> >> >> > >> >> >> >> > Then ran >> >> >> >> > >> >> >> >> > GOARCH=amd64 GOOS=nsx bootstrap.bash >> >> >> >> > which failed because I am using cygwin64, but then ran make.bat >> >> >> >> > from inside ../../go-nsx-amd64-bootstrap >> >> >> >> > That installed a go binary in go-nsx-amd64-bootstrap/bin >> >> >> >> > >> >> >> >> > This still used the whatever compiler it chose to use, presumably >> >> >> >> > gcc-generated code, but the executable will not run on the >> >> >> >> > NonStop platform at all. The key here is that I need to use c99 >> >> >> >> > for cross-compilation. >> >> >> >> > >> >> >> >> > Where do I go next, please? >> >> >> >> >> >> >> >> I'm sure how to answer that except to say that you need to add >> >> >> >> support >> >> >> >> for nsx to the Go toolchain. The Go toolchain is written in Go, not >> >> >> >> C, so the mention of c99 seems irrelevant. Your first step is to >> >> >> >> build a Go toolchain that runs on your host system (not your nsx >> >> >> >> system), which you've done. The second step is to add nsx support to >> >> >> >> the toolchain. The third step is to run bootstrap.bash. The fact >> >> >> >> that bootstrap.bash gives you a program that won't run on nsx >> >> >> >> suggests >> >> >> >> that the second step is not complete. >> >> >> >> >> >> >> >> Ian >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > On Wednesday, 27 May 2020 08:01:17 UTC-4, Randall Becker wrote: >> >> >> >> >> >> >> >> >> >> We've gotten nowhere on this despite trying. Installing GO on >> >> >> >> >> windows went fine, based on what Ian suggested, but specifying >> >> >> >> >> GOOS=nsx fails immediately as being unrecognized (rather >> >> >> >> >> obvious). The archictture is not a powerPC, so I'm not sure why >> >> >> >> >> I would start there - it is a big-endian x86. >> >> >> >> >> >> >> >> >> >> On Wednesday, 13 May 2020 11:33:00 UTC-4, Bruno Albuquerque >> >> >> >> >> wrote: >> >> >> >> >>> >> >> >> >> >>> Now you create your branch or whatever of the Go code and start >> >> >> >> >>> porting it to your platform. As a first step, you will probably >> >> >> >> >>> want to add the new nsx GOOS. Then you use your go1.14.2 >> >> >> >> >>> installation to compile it (with bootstarp.sh) setting GOOS=nsx >> >> >> >> >>> for cross compiling. Something like this: >> >> >> >> >>> >> >> >> >> >>> GOOS=nsx GOARCH=ppc64 bootstrap.bash >> >> >> >> >>> >> >> >> >> >>> That will not work at first. Now you have to make it work, >> >> >> >> >>> which *IS* the porting process. >> >> >> >> >>> >> >> >> >> >>> Eventually you will be able to compile everything and generate >> >> >> >> >>> a go toolchain for your platform. At that point you will copy >> >> >> >> >>> the generated files to the target platform and test it. >> >> >> >> >>> >> >> >> >> >>> That will most likely fail in your first attempt. Then go back, >> >> >> >> >>> fix what you think is broken and try again. >> >> >> >> >>> >> >> >> >> >>> On Wed, May 13, 2020 at 8:11 AM Randall Becker >> >> >> >> >>> <the....@gmail.com> wrote: >> >> >> >> >>>> >> >> >> >> >>>> >> >> >> >> >>>> >> >> >> >> >>>> On Tuesday, 12 May 2020 20:02:01 UTC-4, Ian Lance Taylor wrote: >> >> >> >> >>>>> >> >> >> >> >>>>> On Tue, May 12, 2020 at 2:17 PM Randall Becker >> >> >> >> >>>>> <the....@gmail.com> wrote: >> >> >> >> >>>>> > >> >> >> >> >>>>> > On Tuesday, 12 May 2020 16:55:54 UTC-4, Ian Lance Taylor >> >> >> >> >>>>> > wrote: >> >> >> >> >>>>> >> >> >> >> >> >>>>> >> On Tue, May 12, 2020 at 1:11 PM Randall Becker >> >> >> >> >>>>> >> <the....@gmail.com> wrote: >> >> >> >> >>>>> >> > >> >> >> >> >>>>> >> > I have the go repository with release-branch.go1.4 >> >> >> >> >>>>> >> > checked out on a Windows/cygwin64 installation. Looking >> >> >> >> >>>>> >> > for the bootstrap.bash and not finding one in that >> >> >> >> >>>>> >> > branch. Assuming that my eventual target will be called >> >> >> >> >>>>> >> > nsx (rather the standard name for other open source >> >> >> >> >>>>> >> > projects), would this be amd64 as a starting point, or >> >> >> >> >>>>> >> > does that not matter? Not sure about the next step. >> >> >> >> >>>>> >> > make.bat to build for Windows first? >> >> >> >> >>>>> >> >> >> >> >> >>>>> >> The only reason to use go1.4 is to use it to build a newer >> >> >> >> >>>>> >> version of >> >> >> >> >>>>> >> Go, ideally the current version. Once you've built the >> >> >> >> >>>>> >> current >> >> >> >> >>>>> >> version, use that for everything else, and set your go1.4 >> >> >> >> >>>>> >> build aside >> >> >> >> >>>>> >> unless and until you need to build Go from scratch again. >> >> >> >> >>>>> >> >> >> >> >> >>>>> >> Yes, I assume that you would use amd64 as a starting >> >> >> >> >>>>> >> point, since your >> >> >> >> >>>>> >> target is 64-bit x86 based >> >> >> >> >>>>> > >> >> >> >> >>>>> > >> >> >> >> >>>>> > So if I get this, build go1.4 from source under Windows, >> >> >> >> >>>>> > and bootstrap.bash (but that does not exist in the branch), >> >> >> >> >>>>> > with the GOOS=nsx and GOARCH=amd64, then build within the >> >> >> >> >>>>> > created tree using the cross compilers. Then build the >> >> >> >> >>>>> > newest on the target platform using the go1.4 cross >> >> >> >> >>>>> > compiled version. >> >> >> >> >>>>> > >> >> >> >> >>>>> > Still wondering what to use for bootstrap.bash, though. >> >> >> >> >>>>> >> >> >> >> >>>>> No, build Go1.4 from source on Windows. Use that to build Go >> >> >> >> >>>>> 1.14.2 >> >> >> >> >>>>> (say) on Windows, as described at >> >> >> >> >>>>> https://golang.org/doc/install-source.html. Then use Go >> >> >> >> >>>>> 1.14.2 with >> >> >> >> >>>>> bootstrap.bash. Go 1.14.2 comes with bootstrap.bash. >> >> >> >> >>>>> >> >> >> >> >>>>> Once you have Go 1.14.2, throw away Go1.4 and never use it >> >> >> >> >>>>> again. The >> >> >> >> >>>>> only reason to use Go1.4 is to build a newer version of Go. >> >> >> >> >>>>> Once >> >> >> >> >>>>> you've done that, use the newer version of Go for everything. >> >> >> >> >>>>> >> >> >> >> >>>>> For that matter, you can just download Go 1.14.2 for Windows. >> >> >> >> >>>>> Go 1.4 >> >> >> >> >>>>> is there for people who want to bootstrap from source rather >> >> >> >> >>>>> than rely >> >> >> >> >>>>> on downloaded binaries. >> >> >> >> >>>>> >> >> >> >> >>>>> Ian >> >> >> >> >>>> >> >> >> >> >>>> >> >> >> >> >>>> I have Go 1.14.2 installed and working under Windows. Not sure >> >> >> >> >>>> the next step. Sorry, I was assuming a source build, so I'm a >> >> >> >> >>>> bit clueless. >> >> >> >> >>>> >> >> >> >> >>>> -- >> >> >> >> >>>> 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 golan...@googlegroups.com. >> >> >> >> >>>> To view this discussion on the web visit >> >> >> >> >>>> https://groups.google.com/d/msgid/golang-nuts/708b93b8-6aea-4339-85bb-06a69a32a481%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 golan...@googlegroups.com. >> >> >> >> > To view this discussion on the web visit >> >> >> >> > https://groups.google.com/d/msgid/golang-nuts/736500a7-2dbd-4aba-8996-68b23c6532f5o%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 golan...@googlegroups.com. >> >> >> > To view this discussion on the web visit >> >> >> > https://groups.google.com/d/msgid/golang-nuts/2b6e78c3-a733-4162-801d-d50623018893o%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 golang-nuts...@googlegroups.com. >> >> > To view this discussion on the web visit >> >> > https://groups.google.com/d/msgid/golang-nuts/8c4b6dbd-f1af-4df4-a413-88e41d1b558co%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 golang-nuts...@googlegroups.com. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msgid/golang-nuts/d12e5a2a-28f1-4f1f-9655-040fb0023878n%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 golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/c1277ef8-b1d4-42bc-9692-c9ef2a226723n%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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUixUTfsE2hEqPDXSZfJAYUbynznj1Uu5KpUe11oppYCA%40mail.gmail.com.