go version)?$ go version 1.13
with 1.15 & 1,14, I ran into another error in earlier steps.
when i executed 'env GOOS=linux GOARCH=ppc64 ./bootstrap.bash', 'unsupported GOARCH ppc64' was shown in logs.
go env)?go env Output
$ go env
uname -a
Linux ppclinux 3.10.0-1160.el7.ppc64 #1 SMP Wed Sep 30 02:20:51 UTC 2020 ppc64 ppc64 ppc64 GNU/Linux
cat /etc/redhat-release
CentOS Linux release 7.9.2009 (AltArch)
lscpu
Architecture: ppc64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Big Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 4
Core(s) per socket: 1
Socket(s): 8
NUMA node(s): 1
Model: 2.3 (pvr 003f 0203)
Model name: POWER7 (architected), altivec supported
Hypervisor vendor: pHyp
Virtualization type: para
L1d cache: 32K
L1i cache: 32K
NUMA node0 CPU(s): 0-31
Build Go 1.4 on linux/amd64:
git clone https://go.googlesource.com/go $HOME/go1.4
cd $HOME/go1.4/src
git checkout release-branch.go1.4
./make.bash
Build Go 1.13 on linux/amd64:
git clone https://go.googlesource.com/go $HOME/go
cd $HOME/go/src
git checkout release-branch.go1.15
env GOROOT_BOOTSTRAP=$HOME/go1.4 ./make.bash
Build a bootstrap distribution for linux/ppc64 on linux/amd64
cd $HOME/go/src
env GOOS=linux GOARCH=ppc64 ./bootstrap.bash
scp .tbz file to linux/ppc64 $HOME
Build Go 1.13 on linux/ppc64:
tar -xvjf go-linux-ppc64-bootstrap.tbz
git clone https://go.googlesource.com/go $HOME/go
cd $HOME/go/src
git checkout release-branch.go1.13
env GOROOT_BOOTSTRAP=$HOME/go-linux-ppc64-bootstrap ./all.bash
ALL TESTS PASSED
Installed Go for linux/ppc64 in $HOME/go.
Installed commands in $HOME/go/bin.
* You need to add $HOME/go/bin to your $PATH. *
cmd/dist
./make.bash: line 121: 24013 Illegal instruction GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
From https://github.com/golang/go/wiki/MinimumRequirements#ppc64-big-endian
ppc64 (big endian)
POWER5 and above. Starting with Go 1.9, only POWER8 and above are supported.
ppc64le (little endian)
POWER8 and above.
So go 1.13 doesn't support POWER7.
From https://github.com/golang/go/wiki/MinimumRequirements#ppc64-big-endian
ppc64 (big endian)
POWER5 and above. Starting with Go 1.9, only POWER8 and above are supported.ppc64le (little endian)
POWER8 and above.So go 1.13 doesn't support POWER7.
It means that i should build go 1.8?
Yes, if you want to build for POWER7 big endian then 1.8 should work.
(You'll need it for building the bootstrap as well as building natively.)
Yes, if you want to build for POWER7 big endian then 1.8 should work.
(You'll need it for building the bootstrap as well as building natively.)
thank you, now it's working, but i ran into new error:
when run '+ go build -buildmode=pie -ldflags=-linkmode=external -o /usr/local/bin/docker-proxy github.com/docker/libnetwork/cmd/proxy' this error appear : '-buildmode=pie not supported on linux/ppc64'
That error is pretty self-explanatory. That mode isn't supported on that platform.
That's still the case at tip.
That error is pretty self-explanatory. That mode isn't supported on that platform.
That's still the case at tip.
you mean it's not supported in any version of go?
what should i do now?
is it helpful to create new issue?
i really need to install docker on ppc64
you mean it's not supported in any version of go?
Correct.
what should i do now?
Does docker need PIE? Try building it without PIE.
You could also try using gccgo.
is it helpful to create new issue?
If you're requesting that we add PIE support to tip, yes. See #27144 for an example.
We won't be adding anything to 1.8, so PIE POWER7 support isn't possible.
i really need to install docker on ppc64
Someone has successfully built docker, see https://developer.ibm.com/devpractices/devops/tutorials/d-docker-on-power-linux-platform/
you mean it's not supported in any version of go?
Correct.
yeswhat should i do now?
Does docker need PIE? Try building it without PIE.
You could also try using gccgo.is it helpful to create new issue?
If you're requesting that we add PIE support to tip, yes. See #27144 for an example.
We won't be adding anything to 1.8, so PIE POWER7 support isn't possible.i really need to install docker on ppc64
Someone has successfully built docker, see https://developer.ibm.com/devpractices/devops/tutorials/d-docker-on-power-linux-platform/
i am using docker srpm: docker-ce-19.03.9-3.el7.src.rpm
when i am trying to rebuild package for ppc64, (executing rpmbuild -bb /root/rpmbuild/SPECS/docker-ce.spec), some where in one of spec file, it execute 'go build -buildmode=pie -ldflags=-linkmode=external -o /usr/local/bin/docker-proxy github.com/docker/libnetwork/cmd/proxy', i can edit that command and remove buildmode, but i think it maybe disrupt process of rebuilding.
i have seen that ibm link, but it uses non-official package and installation is not on centos.
do you think someone can help me about this?
is it completely impossible to add PIE POWER7 support to go 1.8? or maybe is it possible to add power7 and pie support to go 1.15?
do you think someone can help me about this?
The issue tracker isn't the right place for getting help. You might look into these forums:
Stack Overflow with questions tagged "go"
The Go Forum, a web-based forum
Gophers Slack, use the invite app for access. The #general channel is a good starting point.
Go Community on Hashnode with questions and posts tagged with "go"
IRC channel #go-nuts on Freenode
is it completely impossible to add PIE POWER7 support to go 1.8?
It may be possible to do yourself, but the Go project will not be doing that. 1.8 is unsupported and will not be receiving updates of any kind.
or maybe is it possible to add power7 and pie support to go 1.15?
Same answer for power7, we already decided to not support that architecture any more.
We may add pie support to ppc64 at tip at some point, but I don't think that would help you. (And that would be 1.17 at the earliest.)
do you think someone can help me about this?
The issue tracker isn't the right place for getting help. You might look into these forums:
- Stack Overflow with questions tagged "go"
- The Go Forum, a web-based forum
- Gophers Slack, use the invite app for access. The
#generalchannel is a good starting point.- Go Community on Hashnode with questions and posts tagged with "go"
- The golang-nuts mailing list
- IRC channel #go-nuts on Freenode
is it completely impossible to add PIE POWER7 support to go 1.8?
It may be possible to do yourself, but the Go project will not be doing that. 1.8 is unsupported and will not be receiving updates of any kind.
or maybe is it possible to add power7 and pie support to go 1.15?
Same answer for power7, we already decided to not support that architecture any more.
We may add pie support to ppc64 at tip at some point, but I don't think that would help you. (And that would be 1.17 at the earliest.)
i am very thankful to you
is there any manual or instruction about how to add buildmode to go 1.8?
@randall77 do you know how can i convert go command with it's flags to gccgo command?