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

$HOME/bin must be in the PATH #508

Closed
gopherbot opened this issue Jan 10, 2010 · 8 comments
Closed

$HOME/bin must be in the PATH #508

gopherbot opened this issue Jan 10, 2010 · 8 comments

Comments

@gopherbot
Copy link
Contributor

by ewald.pankratz:

I followed the installation description and had a problem with
$ cd $GOROOT/src
$ make all

because my $HOME/bin was not in the PATH and it couldn't find 
gomake


waldi@digitec-03:~$ echo $GOOS
linux
waldi@digitec-03:~$ echo $GOARCH
amd64
waldi@digitec-03:~$ 



Which revision are you using?  (hg identify)


Please provide any additional information below.
@rsc
Copy link
Contributor

rsc commented Jan 10, 2010

Comment 1:

Can you please post the transcript of the broken build, or at least the last 20 lines or 
so?

Status changed to WaitingForReply.

@gopherbot
Copy link
Contributor Author

Comment 2 by ewald.pankratz:

ERROR
=======
make[1]: Leaving directory `/home/waldi/go/src/cmd/godefs'
make[1]: Entering directory `/home/waldi/go/src/cmd/godoc'
rm -f *.[568vq] godoc
make[1]: Leaving directory `/home/waldi/go/src/cmd/godoc'
make[1]: Entering directory `/home/waldi/go/src/cmd/gofmt'
rm -f *.[568vq] gofmt
make[1]: Leaving directory `/home/waldi/go/src/cmd/gofmt'
make[1]: Entering directory `/home/waldi/go/src/cmd/gotest'
make[1]: Leaving directory `/home/waldi/go/src/cmd/gotest'
make[1]: Entering directory `/home/waldi/go/src/cmd/goyacc'
rm -f *.[568vq] goyacc
make[1]: Leaving directory `/home/waldi/go/src/cmd/goyacc'
make[1]: Entering directory `/home/waldi/go/src/cmd/hgpatch'
rm -f *.[568vq] hgpatch
make[1]: Leaving directory `/home/waldi/go/src/cmd/hgpatch'
make[1]: Entering directory `/home/waldi/go/src/cmd/prof'
rm -f *.o 6prof
make[1]: Leaving directory `/home/waldi/go/src/cmd/prof'
make[1]: Entering directory `/home/waldi/go/src/pkg'
cd archive/tar && gomake clean
/bin/sh: gomake: not found
make[1]: *** [archive/tar.clean] Error 127
make[1]: Leaving directory `/home/waldi/go/src/pkg'
make: *** [build] Error 2
waldi@digitec-03:~/go/src$ 
REVISION
=========
waldi@digitec-03:~/go$ hg identify
3887d4d81bca release.2010-01-05/release
COMMENT
========
I suppose $GOBIN must be in the path. I set it to my $HOME/bin.
I didn't see it in the description. May I have overlooked it?

@dhobsd
Copy link
Contributor

dhobsd commented Jan 18, 2010

Comment 3:

If GOBIN is unset, it automatically chooses $HOME/bin for you. It should not need to
be in your PATH anymore as of release.2010-01-13 and I am unable to duplicate it at
that release point. Can you confirm the issue has been fixed for you in this latest
release?

@gopherbot
Copy link
Contributor Author

Comment 4 by tuhong.tao:

I install the Go today, I also has the problem of GOBIN, if GOBIN is unset, the 
compile is not finished.

@gopherbot
Copy link
Contributor Author

Comment 5 by spiceman:

Same problem here. Failed to find 6a if $HOME/bin is not in $PATH (even with GOBIN
properly set!).
4:09 spiceman@cynic ~/go/src % echo $PATH
/home/spiceman/perl5/bin:/usr/local/bin:/usr/bin:/bin
4:09 spiceman@cynic ~/go/src % env | grep GO
GOROOT=/home/spiceman/go
GOOS=linux
GOARCH=amd64
GOBIN=/home/spiceman/bin
4:10 spiceman@cynic ~/go/src % make all
.
.make[3]: Entering directory `/home/spiceman/go/src/pkg/debug/elf'
rm -f _test/debug/elf.a _gotest_.6
make[3]: Leaving directory `/home/spiceman/go/src/pkg/debug/elf'
make[3]: Entering directory `/home/spiceman/go/src/pkg/debug/elf'
/home/spiceman/bin/6g -o _gotest_.6 elf.go file.go  elf_test.go file_test.go
rm -f _test/debug/elf.a
/home/spiceman/bin/gopack grc _test/debug/elf.a _gotest_.6 
make[3]: Leaving directory `/home/spiceman/go/src/pkg/debug/elf'
PASS
make[2]: Leaving directory `/home/spiceman/go/src/pkg/debug/elf'
cd debug/gosym && /home/spiceman/bin/gomake test
make[2]: Entering directory `/home/spiceman/go/src/pkg/debug/gosym'
/home/spiceman/bin/gotest
sh: 6a: not found
make[2]: *** [test] Error 1
make[2]: Leaving directory `/home/spiceman/go/src/pkg/debug/gosym'
make[1]: *** [debug/gosym.test] Error 2
make[1]: Leaving directory `/home/spiceman/go/src/pkg'
make: *** [run] Error 2

@gopherbot
Copy link
Contributor Author

Comment 6 by katzeleia:

hello,
I had similar problems like you. 
the following shellscript solved my problems. 
Maybe it works for you as well.
copy the following lines into a script and make it executable.
---- script begin ----
GOROOT=$HOME/go
export GOROOT
GOARCH=amd64
export GOARCH
GOOS=linux
export GOOS
GOBIN=$GOROOT/bin
export GOBIN
PATH=$PATH:$GOBIN
export PATH
hg clone -r release https://go.googlecode.com/hg/ $GOROOT
cd $GOROOT
mkdir bin
cd $GOROOT/src
hg pull
hg update
hg commit
./all.bash
--- script end ----
call the script from bash this way 
. ./myscript.sh 
I hope that helps.

@rsc
Copy link
Contributor

rsc commented Feb 12, 2010

Comment 7:

I tested this and believe it is now fixed: $HOME/bin need not be in the path.
changeset:   4727:54f5573c885c
user:        Russ Cox <rsc@golang.org>
date:        Thu Jan 28 18:18:40 2010 -0800
files:       doc/install.html src/cmd/gotest/gotest
description:
two minor build fixes
Fixes issue #572.
Fixes issue #570.
R=r
CC=golang-dev
http://golang.org/cl/194134

Owner changed to r...@golang.org.

Status changed to Fixed.

@gopherbot
Copy link
Contributor Author

Comment 8 by Erlan.Sergaziev:

I had the same problem. The only deviation from the guide was that I installed 
mercurial by "apt-get install mercurial" rather than "easy_install mercurial".
This is what solved the problem for me:
$ mkdir $GOROOT/bin
$ export GOBIN=$GOROOT/bin
$ export PATH=$PATH:$GOBIN

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants