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

BASH scripts don't quote environmental variables; spaces cause errors. #115

Closed
gopherbot opened this issue Nov 12, 2009 · 5 comments
Closed

Comments

@gopherbot
Copy link
Contributor

by alex.melhuish6388:

What steps will reproduce the problem?
1. Set up environmental variables which include spaces.
 $ export GOROOT="${HOME}/Development Projects/go"
2. Clone the Go source tree:
 hg clone -r release https://go.googlecode.com/hg/ "$GOROOT"
3. Try to build Go:
 cd "$GOROOT"/src; ./all.bash

What is the expected output? What do you see instead?
I expect to see build progress. I actually get:
 make.bash: line 10: test: /Users/alex/Development: binary operator expected

What is your $GOOS?  $GOARCH?
$GOOS=darwin
$GOARCH=386

But I think both are irrelevant here…

Which revision are you sync'ed to?  (hg log -l 1)
Again, irrelevant I think, but see above: it's the 'release' tag.

Please provide any additional information below.
I side-stepped this problem by making a symlink at '$HOME/.go' pointing to 
'$HOME/Development Projects/go', and set '$HOME/.go' as $GOROOT. It's not a true fix
though.
@agl
Copy link
Contributor

agl commented Nov 12, 2009

Comment 1:

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 2:

Status changed to LongTerm.

@rsc
Copy link
Contributor

rsc commented Nov 24, 2009

Comment 3:

This issue was closed by revision 6fc8207.

Status changed to Fixed.

Merged into issue #-.

@rsc
Copy link
Contributor

rsc commented Nov 30, 2009

Comment 4:

This issue was closed by revision be98bc4.

Merged into issue #-.

@gopherbot
Copy link
Contributor Author

Comment 5 by Woods.Greg.A:

seems like this bug continues to exist:
On my OS X system:
--- cd ../test
180,191d179
< =========== fixedbugs/bug248.go
< 6l: conflicting definitions for "/Volumes/Macintosh
< bug2.6:    type "/Volumes/Macintosh HD Part 2/woods/m-go/test/bug0".T struct { X int;
Y int }
< bug2.6:    type "/Volumes/Macintosh HD Part 2/woods/m-go/test/bug1".T struct { X int;
Y int }
< 6l: conflicting definitions for "/Volumes/Macintosh
< bug2.6:    type "/Volumes/Macintosh HD Part 2/woods/m-go/test/bug0".T struct { X int;
Y int }
< bug2.6:    type "/Volumes/Macintosh HD Part 2/woods/m-go/test/bug0".I interface { M(? 
"/Volumes/Macintosh HD Part 2/woods/m-go/test/bug0".T) }
< 6l: conflicting definitions for "/Volumes/Macintosh
< bug2.6:    type "/Volumes/Macintosh HD Part 2/woods/m-go/test/bug0".T struct { X int;
Y int }
< bug2.6:    type "/Volumes/Macintosh HD Part 2/woods/m-go/test/bug1".I interface { M(? 
"/Volumes/Macintosh HD Part 2/woods/m-go/test/bug1".T) }
< BUG: failed to compile
< 
2 known bugs; 1 unexpected bugs; test output differs
FAILED

@golang golang locked and limited conversation to collaborators Jun 24, 2016
FiloSottile pushed a commit to FiloSottile/go that referenced this issue Oct 12, 2018
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes golang#115.

R=rsc, dsymonds1
https://golang.org/cl/157067
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