Ich versuche, die neueste Version (Spitze des Master-Zweigs) von Go aus der Quelle zu bauen.Error Gebäude Go Compiler von Quelle
Die offizielle Go-Dokumentation (https://golang.org/doc/install/source) besagt, dass Sie Go 1.4-Binärdateien herunterladen sollten, um eine neuere Version zu erstellen. Es sollte jedoch möglich sein, alles aus der Quelle zu erstellen.
Um dies zu tun, habe ich Variablen in .bashrc
:
PATH="$HOME/go/bin:$PATH"
export GOPATH=$HOME
dann bauen auf 1,4 von Quelle gehen:
source ~/.bashrc
git clone https://go.googlesource.com/go
mkdir ~/go1.4
cd ~/go
git archive --format=tar go1.4.3 |tar -xv -C ~/go1.4
cd ~/go1.4/src
./make.bash
und schließlich die neueste Version bauen:
cd ~/go/src/
GOROOT_BOOTSTRAP=$HOME/go1.4 ./make.bash
Ich erinnere mich, dass ich das vor Monaten ohne Probleme gemacht habe, aber heute bekomme ich diese Fehler beim Bauen von 1. 4 make.bash
:
# cmd/pprof
.../go1.4/pkg/linux_amd64/runtime/cgo.a(_all.o): unknown relocation type 42; compiled without -fpic?
.../go1.4/pkg/linux_amd64/runtime/cgo.a(_all.o): unknown relocation type 42; compiled without -fpic?
runtime/cgo(.text): unexpected relocation type 298
runtime/cgo(.text): unexpected relocation type 298
...
Gibt es etwas falsch in meiner Methode?
1. Niemals GOROOT einstellen. 2 Erstellen Tipp wie 'GOROOT_BOOTSTRAP =/Pfad/zu/go1.6/go/tool./ make.bash' – Volker
Auch nicht go1.4/bin in Ihrem Pfad. – JimB
@Volker: ok ich benutze nicht GOROOT, aber GOROOT_BOOSTRAP sollte auf einen bestehenden GO-Compiler zeigen. Ich habe die Frage aktualisiert, aber das Problem bleibt bestehen. – psadac