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

go1.4 compile error in Mac OS 10.11 #217

Open
mcandre opened this Issue Aug 21, 2016 · 6 comments

Comments

5 participants
@mcandre

mcandre commented Aug 21, 2016

When I try to install Go 1.4 via gvm, I get a compile error.

Trace

$ gvm install go1.4
Installing go1.4...
 * Compiling...
ERROR: Failed to compile. Check the logs at /Users/andrew/.gvm/logs/go-go1.4-compile.log
ERROR: Failed to use installed version

$ cat /Users/andrew/.gvm/logs/go-go1.4-compile.log
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
cmd/6a
cmd/6c
/Users/andrew/.gvm/gos/go1.4/src/cmd/6c/txt.c:995:28: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
/Users/andrew/.gvm/gos/go1.4/src/cmd/6c/txt.c:1045:28: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
go tool dist: FAILED: clang -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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -mmacosx-version-min=10.6 -c -m64 -I /Users/andrew/.gvm/gos/go1.4/include -I /Users/andrew/.gvm/gos/go1.4/src/cmd/6c -o /Users/andrew/.gvm/gos/go1.4/pkg/obj/cmd/6c/txt.o /Users/andrew/.gvm/gos/go1.4/src/cmd/6c/txt.c

System

$ gvm version
Go Version Manager v1.0.22 installed at /Users/andrew/.gvm

$ clang --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ system_profiler SPSoftwareDataType | grep 'System Version'
      System Version: OS X 10.11.6 (15G31)

Workaround

$ gvm install go1.4 --binary

@mcandre mcandre changed the title from Can't install go1.4 to go1.4 compile error in Mac OS 10.11 Aug 21, 2016

@OmgImAlexis

This comment has been minimized.

Show comment
Hide comment
@OmgImAlexis

OmgImAlexis Aug 23, 2016

Same issue for me. The workaround works for now.

# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
cmd/6a
cmd/6c
/Users/xo/.gvm/gos/go1.4/src/cmd/6c/txt.c:995:28: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
/Users/xo/.gvm/gos/go1.4/src/cmd/6c/txt.c:1045:28: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
go tool dist: FAILED: clang -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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -mmacosx-version-min=10.6 -c -m64 -I /Users/xo/.gvm/gos/go1.4/include -I /Users/xo/.gvm/gos/go1.4/src/cmd/6c -o /Users/xo/.gvm/gos/go1.4/pkg/obj/cmd/6c/txt.o /Users/xo/.gvm/gos/go1.4/src/cmd/6c/txt.c

OmgImAlexis commented Aug 23, 2016

Same issue for me. The workaround works for now.

# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
cmd/6a
cmd/6c
/Users/xo/.gvm/gos/go1.4/src/cmd/6c/txt.c:995:28: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
/Users/xo/.gvm/gos/go1.4/src/cmd/6c/txt.c:1045:28: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
go tool dist: FAILED: clang -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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -mmacosx-version-min=10.6 -c -m64 -I /Users/xo/.gvm/gos/go1.4/include -I /Users/xo/.gvm/gos/go1.4/src/cmd/6c -o /Users/xo/.gvm/gos/go1.4/pkg/obj/cmd/6c/txt.o /Users/xo/.gvm/gos/go1.4/src/cmd/6c/txt.c
@cin210

This comment has been minimized.

Show comment
Hide comment
@cin210

cin210 Aug 25, 2016

Contributor

Have you tried compiling without CGO_ENABLED?

CGO_ENABLED=0 gvm install go1.4

Contributor

cin210 commented Aug 25, 2016

Have you tried compiling without CGO_ENABLED?

CGO_ENABLED=0 gvm install go1.4

@mindworker

This comment has been minimized.

Show comment
Hide comment
@mindworker

mindworker Sep 17, 2016

@mcandre try this:

gvm install go1.4 -B

mindworker commented Sep 17, 2016

@mcandre try this:

gvm install go1.4 -B
@mcandre

This comment has been minimized.

Show comment
Hide comment
@mcandre

mcandre Sep 17, 2016

@mindworker Yep, the binary option works around the issue on my machine.

mcandre commented Sep 17, 2016

@mindworker Yep, the binary option works around the issue on my machine.

@fubarhouse

This comment has been minimized.

Show comment
Hide comment
@fubarhouse

fubarhouse Dec 20, 2016

I've only got success when using --binary

fubarhouse commented Dec 20, 2016

I've only got success when using --binary

@fubarhouse

This comment has been minimized.

Show comment
Hide comment
@fubarhouse

fubarhouse Dec 21, 2016

Well the --binary was working yesterday, but now I have no working option...

fubarhouse commented Dec 21, 2016

Well the --binary was working yesterday, but now I have no working option...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment