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

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 28, 2020

@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

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Jan 30, 2020

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

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Jan 30, 2020

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

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Feb 7, 2020

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

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Feb 7, 2020

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

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Feb 26, 2020

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

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Feb 26, 2020

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

@gopherbot gopherbot closed this Feb 26, 2020
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 <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit ace25f8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/218598
@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Feb 26, 2020

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 <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(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 <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
(cherry picked from commit 71bbffb)
Reviewed-on: https://go-review.googlesource.com/c/go/+/218597
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
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 <jayconrod@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 1f9f88b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/217059
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
@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
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 <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.