-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
gccgo: cannot be used to bootstrap go 1.5 #10092
Comments
When I link then the source code to the ~/go1.4/src we get a different error
and then
So you turn off the deleting of the dist tool and build it manually. |
see my branch here with the make file cpu info did not build, skipped it turn off the build of dist |
/cc @ianlancetaylor |
I think the "import cycle not allowed" problem happens when gccgo sees packages that have the same name as packages in GOROOT. Because gccgo has no GOROOT, it gets confused and thinks those packages are the ones in GOROOT. That is, if GOPATH has a time package, gccgo thinks that is the package it is supposed to use for import "time", even though really it will use the standard time package. This doesn't happen with the gc compiler because it sees the GOROOT time package and knows that one will be used first. Since gccgo has no GOROOT, this does not happen. The way that the go tool handles GOROOT needs to change when using gccgo. |
Yes, that is right. The problem with the cycle was resolved when I On Fri, Mar 13, 2015 at 5:25 PM, Ian Lance Taylor [email protected]
James Michael DuPont |
fixes golang#10092 Change-Id: I7307753896962d37f087e581854b06f4945db5ef
I'm not sure what is going on with this bug, but if I use the go-5 binary that comes with the gccgo-5 package on vivid (as in "mkdir -p ~/gccgo_for_bootstrap/bin; ln -s /usr/bin/go-5 |
See linked branch for a fix for that; with this applied, the bootstrap completes for me. |
Great news, will check it out. |
https://go-review.googlesource.com/8809 Please test |
Note that you don't need to make a GOROOT directory structure.
If you installed gccgo to /usr/local, then setting
GOROOT_BOOTSTRAP=/usr/local
should do.
|
I have been able to do this now. setting these environmental variables can run ./make.bash to produce a go binary. thanks for your help, I learned a lot in this long process. mike |
You don't need anything but GOROOT_BOOTSTRAP and LD_LIBRARY_PATH. On Wed, 15 Apr 2015 02:24 James Michael DuPont [email protected]
|
The go cmd does not find my compiler. I do not have root and it is not installed. Without the PATH I get this :
Without setting the GCCGO, I get
I added a -n build to the dist too and that show this :
It does not find the compiler. So the flags that I absolutly need for my building of gccgo from source and installing it in my homedir are :
BTW, If I run the compilation again with the new go, I get :
|
What is builddist.sh, is it part of Go. I think the issue you are having is unrelated to this bug. On Wed, 15 Apr 2015 14:09 James Michael DuPont [email protected]
|
The builddist.sh is my script, oh i see. Let me checkout the master branch again.
bash make.bash
The compiler is not installed in usr/local/bin that is why i needed to compile dist with my script my builddist script is just the output from the go build command cleaned up. |
Your GOROOT_BOOTSTRAP is wrong, it should point to the same value as your passed to gcc's ./configure --prefix
|
I have the same problem there.
I am going to try and rebuild the compiler cleanly again. |
Perhaps you didn't set the correct --prefix when configuring gccgo.
|
It was a problem with the prefix, yes, I thought I fixed it but did not clean the previous build correctly.
and then the bootstrap build works out of the box. this works! thank you everyone for your patience in helping me learn this amazing new system. mike |
There is a strange bug when you run the go command from this source tree compiled with gccgo 4.9
Using gccgo-5
gccgo-5 (Debian 5-20150226-1) 5.0.0 20150226 (experimental) [trunk revision 220999]
compile like this
ln -s ~/experiments/go/src/go6 ~/go1.4/bin/go
run then like this
errors out with
The text was updated successfully, but these errors were encountered: