Giter VIP home page Giter VIP logo

Comments (10)

petems avatar petems commented on May 4, 2024

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

from gvm.

petems avatar petems commented on May 4, 2024

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

from gvm.

dghubble avatar dghubble commented on May 4, 2024

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

from gvm.

justinclayton avatar justinclayton commented on May 4, 2024

+1

from gvm.

mdayaram avatar mdayaram commented on May 4, 2024

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?

from gvm.

rkrol avatar rkrol commented on May 4, 2024

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

from gvm.

brunowego avatar brunowego commented on May 4, 2024

+1 (Yosemite)

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

from gvm.

offero avatar offero commented on May 4, 2024

I am having this problem also, please commit.

from gvm.

BenKnigge avatar BenKnigge commented on May 4, 2024

Several years have passed since the last comment on this issue. Is this still a problem?

from gvm.

kevinjamescasey avatar kevinjamescasey commented on May 4, 2024

I seem to be having this same problem with v1.0.22 on Moajave 10.14.6. The error message now informs you where to find the logs but the logs look identical at a quick scan. The described fix to the scripts no longer seems to make sense because the scripts have probably changed.

from gvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.