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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues on OSX #38

Open
petems opened this Issue Oct 17, 2013 · 8 comments

Comments

7 participants
@petems
Contributor

petems commented Oct 17, 2013

Hi! Cool project 馃憤

I notice you don't mention use on OSX, is it supported? If so, I'm having this issue:

$ gvm install go1
Installing go1...
 * Compiling...
ERROR: Failed to compile
ERROR: Failed to use installed version

Is there a way to turn verbosity up so I can see the full stack trace and figure out what's going on?

@petems

This comment has been minimized.

Contributor

petems commented Oct 17, 2013

Ah, just found that there's a log:

# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
/Users/peters/.gvm/gos/go1/src/lib9/ctime.c:19:26: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
                "SunMonTueWedThuFriSat"+(tm->tm_wday*3),
                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/Users/peters/.gvm/gos/go1/src/lib9/ctime.c:19:26: note: use array indexing to silence this warning
                "SunMonTueWedThuFriSat"+(tm->tm_wday*3),
                                       ^
                &                      [               ]
/Users/peters/.gvm/gos/go1/src/lib9/ctime.c:20:41: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
                "JanFebMarAprMayJunJulAugSepOctNovDec"+(tm->tm_mon*3),
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/Users/peters/.gvm/gos/go1/src/lib9/ctime.c:20:41: note: use array indexing to silence this warning
                "JanFebMarAprMayJunJulAugSepOctNovDec"+(tm->tm_mon*3),
                                                      ^
                &                                     [              ]
2 errors generated.
go tool dist: FAILED: gcc -Wall -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Werror -fno-common -ggdb -O2 -c -m64 -DPLAN9PORT -I /Users/peters/.gvm/gos/go1/include -I /Users/peters/.gvm/gos/go1/src/lib9 -o /Users/peters/.gvm/gos/go1/pkg/obj/lib9/ctime.o /Users/peters/.gvm/gos/go1/src/lib9/ctime.c
@petems

This comment has been minimized.

Contributor

petems commented Oct 17, 2013

Looks like Darwin stuff with clang according to the mailing list, looks like --use-llvm fixes a lot of it...

@dghubble

This comment has been minimized.

dghubble commented Nov 4, 2013

Any further details on how to fix this issue? I'm having this issue as well.

@justinclayton

This comment has been minimized.

justinclayton commented Nov 18, 2013

+1

@mdayaram

This comment has been minimized.

Contributor

mdayaram commented Nov 19, 2013

Are you running OSX Mavericks? There are known issues with compiling Go in that.

Have you tried @petems suggestion of compiling Go using the --use-llvm flag?

@rkrol

This comment has been minimized.

rkrol commented Apr 8, 2014

Using the --use-llvm flag works for me, thanks for the tip.

For those interested in the details of this temporary fix (should be better to get the fix committed hg..) :

  • execute gvm install go1
  • edit .gvm/archive/go/src/make.bash to add --use-llvm
    • ${CC:-gcc} $mflag --use-llvm -O2 -Wall -Werror -o cmd/dist/dist -Icmd/dist "$DEFGOROOT" cmd/dist/*.c
  • edit .gvm/scripts/install to use modified version of make.bash (prevent using hg version)
    • remove -u $version from command hg clone -u $version $GO_CACHE_PATH $GO_INSTALL_ROOT >> $GVM_ROOT/logs/go-$GO_NAME-install.log 2>&1
@brunowego

This comment has been minimized.

brunowego commented Jan 12, 2015

+1 (Yosemite)

Using the flag --use-llvm works pretty cool. Thanks @petems!

@offero

This comment has been minimized.

offero commented Jun 7, 2015

I am having this problem also, please commit.

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