-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: system linker warnings on macOS 10.14 when using cgo #36025
Comments
@ianlancetaylor the release is built on 10.15, yes. It may be that we need to explicitly set a target of macOS when building. See #35459. |
@tjamet can you provide the output of |
indeed, it looks very much like a duplicate of those tickets. Sorry about that! here is the output of
|
I don't have a mac machine handy (and am just learning the x/build/cmd/release code), but is setting Edit: I'll work on answering this question |
Also experiencing this on MacOS 10.14 with Go 1.13.5 with cgo on a different project. Downgrading to Go 1.13.4 makes the warnings go away. |
I also am experiencing this on MaxOS 10.14.6 with go1.13.5
|
I have the same problem
|
also met this problem
|
@cagedmantis has been working on this all week, and it's a bit more involved than we first expected. We're still working on it, and will keep this thread updated. |
This issue got resolved with go version |
@sourav1547 Would you mind sharing what version of macOS you are using? |
|
Still experiencing this issue with go1.13.6. |
I am also experiencing this problem with go1.13.6 |
Still experiencing the same problem with 1.13.6
Mac OS X version: 10.14.6 |
Also experiencing this with go1.13.6: ld: warning: object file (/var/folders/rv/_jh1r0892_v7cq6l377lwbh80000gn/T/go-link-482883828/000006.o) was built for newer OSX version (10.15) than being linked (10.14) |
Change https://golang.org/cl/216304 mentions this issue: |
I've been able to reproduce this issue using the go1.12.15 release. |
@gopherbot please open a backport for 1.12 and 1.13 since the linker warnings are appearing in both versions. |
@sc0Vu could you file a new issue to report that, and describe how you upgraded Go and any other applicable config of your machine? |
It seems go version was hardcoded in https://go-review.googlesource.com/c/build/+/216304/5/cmd/release/release.go#367, which is prefixed with 1.14. And I can remove these warning with the |
Change https://golang.org/cl/278435 mentions this issue: |
I am on MacOSX 10.11.6 and I still see these errors with
Maybe this issue should be re-opened? |
@einthusan It'll be better to file a new issue, fill in the relevant information, and also mention this issue number. Thanks. |
@einthusan how did you install Go on your Mac? This has been an issue when installing via homebrew. |
I downloaded it from @dmitshur I think we can forgo a fix for this... I am a few of the last on 10.11.6 ... El Captain. |
Hey,
CP runs on Go version 1.8.4 if you look at the Next Gen Go Services specs. Migrating to the latest version or versions 1.11 or greater will require revamping the CP service dependency management.
Thanks
Anjali
From: Einthusan Vigneswaran <[email protected]>
Reply-To: golang/go <[email protected]>
Date: Tuesday, January 5, 2021 at 11:21 PM
To: golang/go <[email protected]>
Cc: "Saha, Anjali" <[email protected]>, Mention <[email protected]>
Subject: [EXTERNAL] Re: [golang/go] cmd/link: system linker warnings on macOS 10.14 when using cgo (#36025)
I downloaded it from golang.dl site itself. I was building a simple Ebiten (2D game engine in Go) game. I managed to prevent these warnings from showing when I used a flag to bypass "Metal" on OSX and use OpenGL. e.g. go build -tags=ebitengl main.go
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/golang/go/issues/36025*issuecomment-755068503__;Iw!!Fto3Xw!7s5R7daJHnNPORP9qDofYLp5aV3Va8VeIOgzs2HPmP62yo6-C773Iwf1C6Uu_mkU$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AOVITZOXANY3L2MHDBQWIUTSYPQN3ANCNFSM4JXAW4BQ__;!!Fto3Xw!7s5R7daJHnNPORP9qDofYLp5aV3Va8VeIOgzs2HPmP62yo6-C773Iwf1C1B1l0eP$>.
|
@einthusan Go 1.14 is supposed to require macOS 10.11 as the oldest version, not 10.12. (See here.) You're right that this is not very high priority by now, as it'll stop being supported when Go 1.16 is out. However, if this is reproducible for you and if you don't mind, it can still be helpful to file an issue in case it helps us understand this better and ensure it doesn't happen in the future for newer versions. |
I just started seeing this issue after upgrading to Go 1.15.7. I'm running MacOS Big Sur (11.1). Get this warning during running
|
@ronakg Please open a new issue and reference this one. We'd like to be able to reproduce it, but may need more information. This issue is closed and not the right place to start a new investigation. Thanks. |
it works |
I suspect it somehow is similar to Julia issue (JuliaLang/julia#14182), where there's a mix-up during make caused by DARWINVER. My issue starts happening when I upgrade my Xcode from 11.5 to 12.4. I tried all the above suggestions but it never worked (brew install / uninstall go, clean go cache, use latest Go, use Go v1.14, etc). My solution, is to install Command Line Tools version 11.5 and execute "xcode-select -s /Library/Developer/CommandLineTools" so that it points to CLT v11.5 instead of CLT v12.4 residing inside my Xcode. After that no more warning message showing. |
|
Change https://golang.org/cl/381854 mentions this issue: |
…aleness The configuration set by x/build/cmd/releasebot causes runtime/cgo to be stale in the darwin/amd64 release (see #36025, #35459). That staleness is mostly benign because we can reasonably assume that users on macOS will either disable CGO entirely or have a C compiler installed to rebuild (and cache) the stale packages if needed. Fixes #50892 Fixes #50893 Updates #46347 Change-Id: Ib9ce6b5014de436264238f680f7ca4ae02c9a220 Reviewed-on: https://go-review.googlesource.com/c/go/+/381854 Trust: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Russ Cox <[email protected]>
After upgrade go version from 1.17.6 to 1.19 this issue shows up in Golang IDE when I run gotest command on Mac with 12.5 OS. The yyccQQu solution works for me. |
After upgrading Go version 17 to any of these: 1.18.6, 1.19.1 the issue shows up again. Nothing helps, including reinstalling xcode command line tools, restarting the machine. |
@alecxcode Please open a new issue and provide those details there. You can add a reference to this issue. However, this issue is closed so there's no active work happening here. Thanks. |
Hey could you solve this? |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes, in fact, is has been introduced by the latest release
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Install go 1.13.5 from official release using the installer. This replaced my previously installed version
Then, I ran a program, I had previously run using go 1.13.1 using
go run main.go
, importing thesqlite
package, using CGOHere is the snippet that reproduces the problem:
What did you expect to see?
No output on stdout/stderr.
This output was not shown with my system (
10.14.6 (18G95)
) using go1.13.1
I am unsure the issue is linked to
go
or togo-sqlite3
What did you see instead?
When running the run command, or the
go build
command, I have the following output:The text was updated successfully, but these errors were encountered: