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

cmd/link: ld warnings when upgrading to 1.9 on macOS #22281

Open
buchanae opened this Issue Oct 15, 2017 · 6 comments

Comments

Projects
None yet
8 participants
@buchanae

buchanae commented Oct 15, 2017

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

1.8.4 upgrading to 1.9.1

Does this issue reproduce with the latest release?

Yes

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/buchanae"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/kw/m6dz8snx7h33ppbkbllnqt48bkhsqx/T/go-build472819290=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

OSX 10.11.6

What did you do?

  1. uninstalled the existing version of Go (1.8.4) which I had installed via homebrew
  2. downloaded 1.9.1 release tarball, installed as instructed
  3. built a project (github.com/ohsu-comp-bio/funnel)
  4. Got the following warnings during build. Build did appear to succeed:
ld: warning: object file (/var/folders/kw/m6dz8snx7h33ppbkbllnqt48bkhsqx/T/go-link-991847961/000000.o) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (/var/folders/kw/m6dz8snx7h33ppbkbllnqt48bkhsqx/T/go-link-991847961/000001.o) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (/var/folders/kw/m6dz8snx7h33ppbkbllnqt48bkhsqx/T/go-link-991847961/000003.o) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (/var/folders/kw/m6dz8snx7h33ppbkbllnqt48bkhsqx/T/go-link-991847961/000004.o) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (/var/folders/kw/m6dz8snx7h33ppbkbllnqt48bkhsqx/T/go-link-991847961/000005.o) was built for newer OSX version (10.11) than being linked (10.10)
ld: warning: object file (/var/folders/kw/m6dz8snx7h33ppbkbllnqt48bkhsqx/T/go-link-991847961/000006.o) was built for newer OSX version (10.11) than being linked (10.10)
  1. Tried deleting directories in the warnings, thinking it was a cached object from an old build. No effect.
  2. Tried using the 1.9.1 installer (instead of the tarball). No effect.
  3. Downgraded to 1.8.4 (installed via installer) and the warnings went away.
@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Oct 15, 2017

The system linker was most likely always producing those warnings. The change from Go 1.8 to 1.9 is that in 1.8 the Go linker would hide any warnings from the system linker, whereas in Go 1.9 the warnings are shown. See #17935.

I don't know why you are getting those warnings, though.

@odeke-em odeke-em changed the title from ld warnings when upgrading to 1.9 on macOS to cmd/link: ld warnings when upgrading to 1.9 on macOS Oct 15, 2017

@notnot

This comment has been minimized.

notnot commented Nov 3, 2017

I am experiencing the same issue on a OS X 10.10.5 system, after upgrading to Go1.9.2
The binaries that are built appear to work fine, so far.

@wdevore

This comment has been minimized.

wdevore commented Mar 21, 2018

I am now getting these warnings OS X 10.10.5 after upgrading to Go 1.10.0

@andybons andybons added this to the Unplanned milestone Mar 21, 2018

@iambudi

This comment has been minimized.

iambudi commented Aug 30, 2018

I got this warning too on OSX Mojave 10.14 Beta after upgrading to golang 1.11.

@l2dy

This comment has been minimized.

l2dy commented Sep 1, 2018

@iambudi You probably got hit by setting MACOSX_DEPLOYMENT_TARGET to <=10.9 in your project if you see … was built for newer OSX version (10.10) than being linked (10.9) because Go 1.11 now requires macOS 10.10 Yosemite or later.

@lsegal

This comment has been minimized.

lsegal commented Oct 25, 2018

Also seeing this after upgrading from 10.12 to 10.13.

ld: warning: object file (/var/folders/vh/1kdv9jt922ddgm0r9tprx3y80000gn/T/go-link-684600122/000000.o) was built for newer OSX version (10.13) than being linked (10.12)

Is this maybe related to some kind of cache that we can dump?

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