Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: with MacOS Mojave 10.14 beta, warning: URGENT: building for OSX, but linking against dylib during make.bash #27095
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
@agnivade Confirmed, it is not a GOROOT_BOOTSTRAP issue.
changed the title from
cmd/link: warning: URGENT: building for OSX, but linking against dylib when bootstrapping with 1.9
cmd/link: warning: URGENT: building for OSX, but linking against dylib during make.bash
Aug 20, 2018
MacOS and XCode are always supposed to upgrade together. In fact, you can use newer XCode on previous MacOS versions, but not viceversa.
Ian, Keith, given the changes that went in Go 1.11 to start using libsystem, I think we should at least document to always use the latest XCode
Got me. Anyone have the source to OSX's ld?
Another possibility is versioning. If I do
So somehow Go binaries don't have compatibility/current versions. I don't know how to pick the right versions and/or record that in the binary, but if someone who is experiencing this bug could figure out at least the latter, we could test to see if that is it.
So I looked into this a bit more. My understanding is as follows. The linker records a path, compatibility version, and current version for each shared library a binary is linked against. Additionally, each shared library also has a compatibility and current version.
At load time, the dynamic loader checks the version information for compatibility.
The current version (both the version recorded in the load command in the executable, and the version on the shared library itself) are ignored.
The compatibility version listed in the load command in the executable must be less than or equal to the compatibility version on the shared library itself.
I hacked our linker to require version 2.0.0 of libSystem.dylib, and those binaries will not run:
We currently specify 0.0.0 for both compatibility version and current version. That seems maximally compatible.
The question remains: what happened during @Cospotato 's build? The
TL;DR I don't think there's anything we need to do here, absent something I'm missing.
I'm seeing this when trying to build on a clean 10.14 install. Go version 1.11, Xcode version 10.0 build version 10A255.
EDIT: I had installed Go using Homebrew. After removing the Homebrew version and installing the binary version from golang.org, this problem went away.
I am get an error when I compile one c++ file:
with my c++ file depends /usr/lib/libSystem.dylib and /usr/lib/libc++.dylib, it is the same problem?
my mac: macos mojave 10.14