Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: cross compiling go with a bootstrap fails with error on plan9 #17737

Closed
sirnewton01 opened this issue Nov 2, 2016 · 7 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9
Milestone

Comments

@sirnewton01
Copy link
Contributor

What version of Go are you using (go version)?

1.7.3 (the bootstrap)
master branch (source)

What operating system and processor architecture are you using (go env)?

Plan 9 (9front) 386

What did you do?

-Download a bootstrap for go 1.7.3 from here:
http://www.9legacy.org/download/go/go1.7.3-plan9-386-bootstrap.tbz
-Extract the archive
-Set GOROOT_BOOTSTRAP to the extracted directory
-Download git script for plan 9 and install in path
hget http://9legacy.org/tools/git > /root/rc/bin/git
chmod a+x /root/rc/bin/git
-Clone the latest from the go master branch:
git clone https://go.googlesource.com/go go
-Cross compile for plan9 arm:
cd go/src
GOOS=plan9 GOARCH=arm GOARM=6 ./make.rc

What did you expect to see?

I expected to see that go is cross-compiled for plan9/arm

What did you see instead?

Building Go bootstrap tool works. Building Go toolchain using ... works. Building go_bootstrap for host, plan9/386 works. Building packages and commands for host, plan9/386 fails with the following error:

install: './install' not found

It appears that the make.rc script (or some part of the process) calls out to a command called "install" on the system path, but it is not present on a standard installation.

I tried once again with an imposter install shell script that captures the command-line arguments and dumps them to a file. This time when I run make.rc I captured the arguments.

install -gcflags -ldflags -v std cmd

Putting the install shell script on the path seems to work around the problem and the cross-compilation appears to complete.

@josharian josharian changed the title Cross compiling go with a bootstrap fails with error on plan9 build: cross compiling go with a bootstrap fails with error on plan9 Nov 2, 2016
@josharian
Copy link
Contributor

install -gcflags -ldflags -v std cmd looks suspiciously liked it ought to be go install -gcflags -ldflags -v std cmd. Perhaps whatever builds that command (perhaps make.rc line 83 or 89) looked for the go path, didn't find it, and ended up with an empty string there instead? Can you provide the full output out of the make.rc invocation?

@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 3, 2016
@quentinmit quentinmit added this to the Go1.8Maybe milestone Nov 3, 2016
@rsc
Copy link
Contributor

rsc commented Nov 11, 2016

Does rc print 'rc: null list in concatenation' before the crash?

Please post the output of:

cd go/src
GOOS=plan9 GOARCH=arm GOARM=6 rc -x -e ./make.rc

Thanks.

@sirnewton01
Copy link
Contributor Author

I am not seeing the message 'rc: nun list in concatenation' before the script fails.

I have attached the stdout stderr log after running the command suggested above.
output.txt

@sirnewton01
Copy link
Contributor Author

The 'go' command from my bootstrap is not on my system path or in /bin.

@rsc
Copy link
Contributor

rsc commented Nov 11, 2016

Please try this diff, which I've mailed as CL 33144:

diff --git a/src/make.rc b/src/make.rc
index 243f83c..ba3554c 100755
--- a/src/make.rc
+++ b/src/make.rc
@@ -80,7 +80,7 @@ if(~ $sysname vx32)

 if(! ~ $GOHOSTARCH $GOARCH || ! ~ $GOHOSTOS $GOOS){
    echo '##### Building packages and commands for host,' $GOHOSTOS/$GOHOSTARCH^.
-   GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOBIN= \
+   GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOBIN=() \
        $GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std cmd
    echo
 }

@gopherbot
Copy link

CL https://golang.org/cl/33144 mentions this issue.

@sirnewton01
Copy link
Contributor Author

That seems to have fixed it. Thank you.

@golang golang locked and limited conversation to collaborators Nov 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9
Projects
None yet
Development

No branches or pull requests

5 participants