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: system linker warnings on macOS 10.14 when using cgo [1.13 backport] #36846

Closed
gopherbot opened this issue Jan 28, 2020 · 7 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link
Contributor

@cagedmantis requested issue #36025 to be considered for backport to the next 1.13 minor release.

@gopherbot please open a backport for 1.12 and 1.13 since the linker warnings are appearing in both versions.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jan 28, 2020
@gopherbot gopherbot added this to the Go1.13.8 milestone Jan 28, 2020
@gopherbot
Copy link
Contributor Author

Change https://golang.org/cl/217057 mentions this issue: [release-branch.go1.13] cmd/link: ensure cgo cflags do not leak into dwarf tests

@gopherbot
Copy link
Contributor Author

Change https://golang.org/cl/217059 mentions this issue: [release-branch.go1.13] cmd/go: fix cgo test when min macOS version is set

@gopherbot
Copy link
Contributor Author

Change https://golang.org/cl/218597 mentions this issue: [release-branch.go1.13] cmd/go: add -d flag to mod_get_test

@gopherbot
Copy link
Contributor Author

Change https://golang.org/cl/218598 mentions this issue: [release-branch.go1.13] cmd/link: ensure cgo cflags do not leak into tvOS test

@gopherbot
Copy link
Contributor Author

Change https://golang.org/cl/221100 mentions this issue: cmd/release: set the minimum macOS version supported by go 1.13

@gopherbot
Copy link
Contributor Author

Closed by merging 4169b1e to release-branch.go1.13.

gopherbot pushed a commit that referenced this issue Feb 26, 2020
…tvOS test

Running the 'TestBuildForTvOS' test with CGO_CFLAGS set
with certain values would cause the test to fail. all.bash
would fail when CGO_CFLAGS was set to '-mmacosx-version-min=10.10'
because the --macosx-version-min flag is incompatible with tvOS.
The change guards against using an unintended flag in the unit test.

Updates #36846
Updated #35459

Change-Id: Ifc43f3ebfb23d37aabeaac2ea9efae5b877991bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/215957
Run-TryBot: Carlos Amedee <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
(cherry picked from commit ace25f8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/218598
@gopherbot
Copy link
Contributor Author

Closed by merging 0e115a3 to release-branch.go1.13.

gopherbot pushed a commit that referenced this issue Feb 26, 2020
…dwarf tests

Running the dwarf tests with CGO_CFLAGS set
with certain values would cause the test to fail. all.bash
would fail when CGO_CFLAGS was set to '-mmacosx-version-min=10.10'
because the --macosx-version-min flag is incompatible with some dwarf
tests. The change guards against using an unintended flag in the unit test.

Updates #36846
Updates #35459

Change-Id: Idc9b354aba44fdab424cb0081a4b3ea7a6d0f8e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/216177
Run-TryBot: Carlos Amedee <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Jay Conrod <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
(cherry picked from commit e948d2b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/217057
gopherbot pushed a commit that referenced this issue Feb 26, 2020
'go get all' was run in this test without -d. This caused some std
packages to be reinstalled if the test is run in a slightly different
configuration than make.bash was run. run.bash would fail in some
situations because of this. Nothing in the cmd/go tests should modify
installed std or cmd packages.

Updates #36846
Updates #35459

Change-Id: Idd259a27d55502923b7fc54f361a77f0ac11eea2
Reviewed-on: https://go-review.googlesource.com/c/go/+/215721
Run-TryBot: Jay Conrod <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Michael Matloob <[email protected]>
(cherry picked from commit 71bbffb)
Reviewed-on: https://go-review.googlesource.com/c/go/+/218597
Run-TryBot: Carlos Amedee <[email protected]>
Reviewed-by: Jay Conrod <[email protected]>
gopherbot pushed a commit that referenced this issue Feb 26, 2020
…s set

Regression tests for #24161 use a macro to conditionally compile some
stub definitions. The macro tests that the minimum macOS version is
less than 10.12.

We get duplicate definitions when building this test with
CGO_CFLAGS=-mmacosx-version-min=10.x where 10.x < 10.12. With this
change, we use a different macro, __MAC_OS_X_VERSION_MAX_ALLOWED__,
which tests the SDK version instead of the minimum macOS version. This
checks whether these definitions are present in headers.

After this change, 'go tool dist test cgo_test' should pass with
CGO_FLAGS=-mmacosx-version-min=10.10.

Updates #36846
Updates #35459

Change-Id: I88d63601c94b0369c73c38d216a2d41ba7d4e579
Reviewed-on: https://go-review.googlesource.com/c/go/+/216243
Run-TryBot: Jay Conrod <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
(cherry picked from commit 1f9f88b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/217059
Run-TryBot: Carlos Amedee <[email protected]>
Reviewed-by: Jay Conrod <[email protected]>
@dmitshur dmitshur changed the title cmd/link: system linker warnings on OSX 1.14 when using cgo [1.13 backport] cmd/link: system linker warnings on macOS 10.14 when using cgo [1.13 backport] Feb 26, 2020
@cagedmantis cagedmantis added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Feb 26, 2020
gopherbot pushed a commit to golang/build that referenced this issue Feb 26, 2020
Set the minmacos version depending on the version of go being packaged
for macOS releases. Removed support for Go 1.12 since it is no longer
supported.

Fixes golang/go#36846
Updates golang/go#35459

Change-Id: Ifb9a0296fde5ed87da72d7719a714744484cc7db
Reviewed-on: https://go-review.googlesource.com/c/build/+/221100
Run-TryBot: Carlos Amedee <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Alexander Rakoczy <[email protected]>
@golang golang locked and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants