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. |
When the macOS releases were moved over to the macOS 10.15 (Catalina) builders, the macOS SDK version was set in the resulting binaries Mach-O commands. When a cgo application was built using a macOS version earlier than the macOS version (and macOS SDK version) that Go was built on, the external linker would log warnings about the version mismatch. Setting the version to the earliest version of macOS supported by the release eliminates the external linker warnings. Fixes golang/go#36900 Updates golang/go#36025 Updates golang/go#35459 Change-Id: Ie2ef7216af1ddd2afaffea53eca064bfe5c52d63 Reviewed-on: https://go-review.googlesource.com/c/build/+/216304 Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alexander Rakoczy <alex@golang.org>
I meet the same issue with:
|
This issue has been resolved in go1.14. It will be resolved in the next go1.13 release as well. |
Experienced this issue as well:
Looking forward to the next release. @cagedmantis - do we have a rough ETA? |
@itsmontoya Correction, it will be the 13.9 release (estimated release month is March). |
That's a bummer, but I appreciate the updated @cagedmantis! I'll probably revert my version down in the meantime. |
@cagedmantis should we close this issue and #35459, and use the backports (#36846 and #36845) for tracking the 1.13 and 1.12 releases? |
Closing this issue, since it has been resolved in 1.14, makes sense to me. |
Makes sense to me. I was keeping it open until the backports were in. |
Although I'm not sure about #35459. The Mach-o headers have not been changed by the changes we made. I'm not sure that issue should be closed. |
hey so ive been reading through this now closed issue. I was seeing the same issue initially with macos 10.15.4 and golang 1.12.17. So I updated to the latest 1.14.2 and am now seeing: dyld: Library not loaded: iclis09b.dylib Any idea what is causing this and how to resolve this? |
@Anjali-Saha As you say, this issue is closed, and the problem you mention doesn't seem to have anything to do with this issue. Please open a new issue or use a forum (see https://golang.org/wiki/Questions). Thanks. |
I just upgraded to
Is there something I have to do more than upgrade go to get the fix for this? |
I also see the same warning after upgraded to
Any idea about how to fix this? |
@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 <notifications@github.com>
Reply-To: golang/go <reply@reply.github.com>
Date: Tuesday, January 5, 2021 at 11:21 PM
To: golang/go <go@noreply.github.com>
Cc: "Saha, Anjali" <anjali.saha@nscorp.com>, Mention <mention@noreply.github.com>
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. |
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: