Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to install golang 1.11 in CentOS5
# details in: https://golang.org/doc/install/source
# a patch for centos 5 build: https://github.com/golang/go/issues/24980#issuecomment-384193598
export GOROOT="/usr/local/go"
export PATH="$GOROOT/bin:$PATH"
mkdir /usr/local/go ~/go
curl -L https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz | tar xf - -C /usr/local/go
cd /usr/local/go/src
./make.bash
curl -L https://dl.google.com/go/go1.11.src.tar.gz | tar xf - -C ~/go
cd ~/go/src
patch -p2 <<EOF
diff --git a/src/runtime/sys_linux_amd64.s b/src/runtime/sys_linux_amd64.s
index a5db5cba23..8e945add07 100644
--- a/src/runtime/sys_linux_amd64.s
+++ b/src/runtime/sys_linux_amd64.s
@@ -41,6 +41,7 @@
#define SYS_sched_getaffinity 204
#define SYS_epoll_create 213
#define SYS_exit_group 231
+#define SYS_epoll_wait 232
#define SYS_epoll_ctl 233
#define SYS_openat 257
#define SYS_faccessat 269
@@ -664,8 +665,7 @@ TEXT runtime·epollwait(SB),NOSPLIT,$0
MOVQ ev+8(FP), SI
MOVL nev+16(FP), DX
MOVL timeout+20(FP), R10
- MOVQ $0, R8
- MOVL $SYS_epoll_pwait, AX
+ MOVL $SYS_epoll_wait, AX
SYSCALL
MOVL AX, ret+24(FP)
RET
EOF
./make.bash
../bin/go version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.