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

getting error when i compile go 1.4 #25413

Closed
prashantvidja opened this issue May 16, 2018 · 3 comments
Closed

getting error when i compile go 1.4 #25413

prashantvidja opened this issue May 16, 2018 · 3 comments

Comments

@prashantvidja
Copy link

prashantvidja commented May 16, 2018

Hello,

What version of Go are you using (go version)?

go 1.4

Does this issue reproduce with the latest release?

first time install

What operating system and processor architecture are you using (go env)?

debian(9)

What did you do?

i want to compile first go1.4 for compile go1.10.1 because it is dependency of go1.10.1.
after download go1.4.tar.gz direct I going to /src dir and run all.bash script.

root@debian:/opt/go-go1.4/src# ./all.bash
Building C bootstrap tool.
cmd/dist

Building compilers and Go bootstrap tool for host, linux/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
cmd/6a
cmd/6c
/opt/go-go1.4/src/cmd/6c/txt.c: In function 'gmove':
/opt/go-go1.4/src/cmd/6c/txt.c:995:28: error: left shift of negative value [-Werror=shift-negative-value]
f->vconst |= (vlong)0 << 32;
^

/opt/go-go1.4/src/cmd/6c/txt.c:1045:28: error: left shift of negative value [-Werror=shift-negative-value]
f->vconst |= (vlong)0 << 32;
^

cc1: all warnings being treated as errors
go tool dist: FAILED: gcc -Wall -Wstrict-prototypes -Wextra -Wunused -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Wno-missing-field-initializers -Werror -fno-common -ggdb -pipe -Wuninitialized -O2 -fmessage-length=0 -c -m64 -I /opt/go-go1.4/include -I /opt/go-go1.4/src/cmd/6c -o $WORK/txt.o /opt/go-go1.4/src/cmd/6c/txt.c

What did you expect to see?

all test succeed.

What did you see instead?

getting upper error.

thanks

@mvdan
Copy link
Member

mvdan commented May 16, 2018

See https://golang.org/doc/install/source#go14 - have you been building the bootstrap version of Go 1.4?

@ALTree
Copy link
Member

ALTree commented May 16, 2018

i want to compile first go1.4 for compile go1.10.1 because it is dependency of go1.10.1

You don't need to compile go1.4 to build go1.10 on linux/amd64.

Just download the pre-compiled go1.10.1 linux binaries from here: https://golang.org/dl

If for some reason you prefer to compile go1.10.1 by yourself, you still don't need to build go1.4. Download the go1.9 pre-compiled binary, and use that to compile go1.10.1

@prashantvidja
Copy link
Author

@mvdan bootstrap version of Go 1.4 working for me.
@ALTree i just testing in amd64 but my requirement is for different-different architecture. so binary is not work for me.
thanks to both of you

@golang golang locked and limited conversation to collaborators May 16, 2019
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

4 participants