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

cmd/link: minimum macOS version changed going from 1.12.5 to 1.12.9 #33968

Open
bep opened this issue Aug 30, 2019 · 7 comments

Comments

@bep
Copy link
Contributor

commented Aug 30, 2019

I guess this relates to 4cd6c3b

  • Reading the error message below (was built for newer OSX version (10.10) than being linked (10.9)) vs 4cd6c3b#diff-f44dab9aab3c3c3aaff916e6bb1fb763R418 does not line up.
  • Upping the min OSX version in my build script to 10.10 removes the warning (but the build still fails, I need to investigate more on that).

Note that I did not open up this issue to fix my particular problem (I will eventually figure that out), but more of a "heads up" issue. Reading the issues surrounding 4cd6c3b I see a lot of the same guesswork that I'm doing in this area and my own guessing tells me that this change was unintentionally a little too big for a patch release.

  • building                  binary=dist/hugo_extended_darwin_darwin_amd64/hugo
   ⨯ release failed after 329.09s error=failed to build for darwin_amd64: # crypto/x509
ld: warning: object file (/tmp/go-build936638053/b091/_cgo_main.o) was built for newer OSX version (10.10) than being linked (10.9)
ld: warning: object file (/tmp/go-build936638053/b091/_x001.o) was built for newer OSX version (10.10) than being linked (10.9)
ld: warning: object file (/tmp/go-build936638053/b091/_x002.o) was built for newer OSX version (10.10) than being linked (10.9)
# github.com/wellington/go-libsass/libs
In file included from unity.cpp:4:
In file included from /go/pkg/mod/github.com/wellington/go-libsass@v0.9.3-0.20181113175235-c63644206701/libs/../libsass-build/ast.cpp:2:
In file included from /go/pkg/mod/github.com/wellington/go-libsass@v0.9.3-0.20181113175235-c63644206701/libsass-build/ast.hpp:14:
In file included from /go/pkg/mod/github.com/wellington/go-libsass@v0.9.3-0.20181113175235-c63644206701/libsass-build/ast_fwd_decl.hpp:11:
In file included from /usr/local/osx-ndk-x86/bin/../SDK/MacOSX10.11.sdk/usr/include/c++/v1/unordered_map:369:

@ianlancetaylor ianlancetaylor changed the title Hugo release build fails when going from Go 1.12.5 go 1.12.9 cmd/link: minimum macOS version changed going from 1.12.5 to 1.12.9 Aug 30, 2019

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 30, 2019

In the discussion on #30448 people requested the the minimum version be increased on the 1.12 branch. Here you are suggesting that that should not have happened. I don't know what is best.

CC @eliasnaur @pieterclaerhout @networkimprov @macetw : discuss.

@bep

This comment has been minimized.

Copy link
Contributor Author

commented Aug 30, 2019

people requested the minimum version be increased on the 1.12 branch. Here you are suggesting that that should not have happened.

To be accurate, I suggest two things:

  1. You got the numbering wrong and increased it one version too far up somewhere. I know a little too little about this to state any absolute.
  2. Given that this has prevented real projects (I'm still working on it) to update to Go 1.12.9 (a security patch), in retrospect I think that commit should not have been backported. But this relates to 1).
@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Aug 30, 2019

@iant, I believe you mean issue #30488.

The fix for #30488 bumped the minimum version to 10.9, not 10.10. What is setting the 10.10 minimum?

@networkimprov

This comment has been minimized.

Copy link

commented Aug 30, 2019

That change was necessary for binaries to be acceptable in the Mac App Store, which is why it landed in a bugfix release. There is a reminder issue for future reference at #31918.

@bep can you give steps to reproduce (and fix) your problem?

@cherrymui

This comment has been minimized.

Copy link
Contributor

commented Aug 31, 2019

I'm not sure CL https://go-review.googlesource.com/c/go/+/175918 (commit 4cd6c3b) is related. It seems that CL only affects internal linking mode, i.e. using the Go linker, instead of the system linker. But the warning in this issue is from ld, the system linker, which suggests it is using external linking mode.

@pieterclaerhout

This comment has been minimized.

Copy link

commented Sep 2, 2019

Isn't this actually an issue on the CGO side? My wild guess is that CGO is linking against 10.10 while the normal Go builds are linking against 10.9 hence the error message…

@pieterclaerhout

This comment has been minimized.

Copy link

commented Sep 2, 2019

The system linker on macOS has the following option to define this from whjat I can find:

-compatibility_version number
            Specifies the compatibility version number of the library.  When a library is loaded by dyld, the compatibility version is checked and if
            the program's version is greater that the library's version, it is an error.  The format of number is X[.Y[.Z]] where X must be a posi-
            tive non-zero number less than or equal to 65535, and .Y and .Z are optional and if present must be non-negative numbers less than or
            equal to 255.  If the compatibility version number is not specified, it has a value of 0 and no checking is done when the library is
            used.  This option is also called -dylib_compatibility_version for compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.