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

x/build: system linker warnings on macOS 10.15 when using cgo #41548

Closed
sc0Vu opened this issue Sep 22, 2020 · 6 comments
Closed

x/build: system linker warnings on macOS 10.15 when using cgo #41548

sc0Vu opened this issue Sep 22, 2020 · 6 comments
Labels
Builders FrozenDueToAge NeedsInvestigation OS-Darwin WaitingForInfo
Milestone

Comments

@sc0Vu
Copy link

@sc0Vu sc0Vu commented Sep 22, 2020

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

$ go version

go version go1.15.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes.
It seems this issue is related to #36025.

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

go env Output
$ go env

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/peterlai/Library/Caches/go-build"
GOENV="/Users/peterlai/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/peterlai/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/peterlai/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/peterlai/diode_go_client/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/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-build398699140=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Recently I upgraded golang from 1.14.4 to 1.15.2 with brew upgrade go.

After I upgraded, there are couple of warnings when I build our client, which we use cgo because of using openssl library, the source code: https://github.com/diodechain/diode_go_client/.

What did you expect to see?

No output on stdout/stderr.
This output was not shown with my system using go 1.14.4

What did you see instead?

When running the run command, or the go build command, I have the following output:

ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000000.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000001.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000002.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000003.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000004.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000005.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000006.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000007.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000008.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000009.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/go.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000010.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000011.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000012.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000013.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000048.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000049.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000050.o) was built for newer OSX version (10.15) than being linked (10.14)
ld: warning: object file (/var/folders/sw/qywtwldj7vj9wh26cry0cngm0000gn/T/go-link-116021407/000051.o) was built for newer OSX version (10.15) than being linked (10.14)

I can remove these warning with the CGO_CFLAGS=-mmacosx-version-min=10.12 (found in this commit: https://go-review.googlesource.com/c/build/+/216304/5/cmd/release/release.go#367)

@cagedmantis cagedmantis changed the title cmd/link: system linker warnings on macOS 10.15 when using cgo x/build: system linker warnings on macOS 10.15 when using cgo Sep 22, 2020
@gopherbot gopherbot added the Builders label Sep 22, 2020
@gopherbot gopherbot added this to the Unreleased milestone Sep 22, 2020
@cagedmantis cagedmantis added the NeedsInvestigation label Sep 22, 2020
@cagedmantis cagedmantis removed this from the Unreleased milestone Sep 22, 2020
@cagedmantis cagedmantis added this to the Backlog milestone Sep 22, 2020
@cagedmantis cagedmantis self-assigned this Sep 22, 2020
@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Sep 22, 2020

Changed this to an x/build issue since I believe this is an issue with the packaging.

@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Sep 22, 2020

/cc @andybons @dmitshur @toothrot

@networkimprov
Copy link

@networkimprov networkimprov commented Sep 22, 2020

@gopherbot add OS-Darwin

@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Sep 22, 2020

@sc0Vu Do you encounter the same error if you download and use the pkg from the golang site?

@cagedmantis cagedmantis added the WaitingForInfo label Sep 23, 2020
@scottomyers
Copy link

@scottomyers scottomyers commented Sep 27, 2020

Just chiming in, I encountered this same error after upgrading to go 1.15 with brew. Removing the version of go installed by brew and then installing the pkg from the golang site resolved my issue.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 23, 2020

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders FrozenDueToAge NeedsInvestigation OS-Darwin WaitingForInfo
Projects
None yet
Development

No branches or pull requests

5 participants