Skip to content

build go from source failed on macos #36397

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

Closed
chenminhua opened this issue Jan 6, 2020 · 1 comment
Closed

build go from source failed on macos #36397

chenminhua opened this issue Jan 6, 2020 · 1 comment

Comments

@chenminhua
Copy link

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

$ go version
go version go1.13.5 darwin/amd64

Does this issue reproduce with the latest release?

YES

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/chenminhua/Library/Caches/go-build"
GOENV="/Users/chenminhua/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/chenminhua/.gvm/pkgsets/go1.13.5/global"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/chenminhua/.gvm/gos/go1.13.5"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/chenminhua/.gvm/gos/go1.13.5/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/chenminhua/workspace/readcode/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/fv/z5blv8c103xdlnws5x2m5k8m0000gn/T/go-build866754382=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

git clone [email protected]:golang/go.git 
cd go/src
./all.bash

What did you expect to see?

build successfully

What did you see instead?

......
ok      cmd/internal/objabi     0.015s
ok      cmd/internal/src        0.012s
ok      cmd/internal/test2json  0.164s
--- FAIL: TestIssue33979 (1.17s)
    link_test.go:250: got:
        main(__TEXT/__text): relocation target undefined not defined
        want:
        main(.text): relocation target undefined not defined
FAIL
FAIL    cmd/link        8.958s
ok      cmd/link/internal/ld    13.708s
ok      cmd/link/internal/sym   0.012s
ok      cmd/nm  4.885s
ok      cmd/objdump     4.096s
ok      cmd/pack        1.737s
ok      cmd/trace       0.153s
ok      cmd/vet 10.706s
FAIL
go tool dist: Failed: exit status 1

I'm using go1.13.5, and I'm trying to build go from source code.

@agnivade
Copy link
Contributor

agnivade commented Jan 6, 2020

Duplicate of #36389.

@agnivade agnivade closed this as completed Jan 6, 2020
@golang golang locked and limited conversation to collaborators Jan 5, 2021
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

3 participants