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

build: macOS builders broken #25827

Closed
josharian opened this issue Jun 11, 2018 · 7 comments
Closed

build: macOS builders broken #25827

josharian opened this issue Jun 11, 2018 · 7 comments

Comments

@josharian
Copy link
Contributor

josharian commented Jun 11, 2018

Broken by https://go-review.googlesource.com/c/go/+/117515.

@josharian
Copy link
Contributor Author

@josharian josharian added this to the Go1.11 milestone Jun 11, 2018
@laboger
Copy link
Contributor

laboger commented Jun 11, 2018

Is this new test not legal on darwin?
The source files are almost the same as misc/cgo/life except that they were made into a plugin.
Ian asked me to remove the //skip line but I don't know what that does if anything.

@randall77
Copy link
Contributor

This is the error we're getting:

Undefined symbols for architecture x86_64:
  "__cgoexp_1e283c4f53fb_GoStart", referenced from:
      _GoStart in 000000.o
  "__cgoexp_1e283c4f53fb_GoWait", referenced from:
      _GoWait in 000000.o

I'm not sure what is going on here.

$ grep _cgoexp_1e283c4f53fb_GoWait _obj/*.{c,h,go}
_obj/_cgo_export.c:extern void _cgoexp_1e283c4f53fb_GoWait(void *, int, __SIZE_TYPE__);
_obj/_cgo_main.c:int _cgoexp_1e283c4f53fb_GoWait;
_obj/_cgo_gotypes.go:func _cgoexp_1e283c4f53fb_GoWait(a unsafe.Pointer, n int32, ctxt uintptr) {

That missing identifier is sometimes declared as a function, and sometimes a global variable.
The recent CL didn't change this behavior, but it is strange.
I have no idea if this is related to the issue or not. Getting "go build" of a plugin to show me all the intermediate artifacts is somewhat challenging...

@dr2chase
Copy link
Contributor

Just on a whim, in inl.go, try increasing the cost of panic to 80.
The bug I'm working on might do something evil to the compiler or something similar -- inlined switch statements get slightly wedged, sometimes.

@ianlancetaylor
Copy link
Member

The object file generated by cmd/link is defining the symbol _cgoexp_1e283c4f53fb_GoStart. The C object file is referring to the symbol __cgoexp_1e283c4f53fb_GoStart. So I think we have an underscore discrepancy, somehow.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/118076 mentions this issue: cmd/link: treat cgo exported symbols as C symbols

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/126455 mentions this issue: [release-branch.go1.10] cmd/link: treat cgo exported symbols as C symbols

gopherbot pushed a commit that referenced this issue Aug 21, 2018
…bols

Fixes #25827

Change-Id: I6736c3ac061ca32aac2eb68b01ba53a179d68cf4
Reviewed-on: https://go-review.googlesource.com/118076
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
(cherry picked from commit f861f66)
Reviewed-on: https://go-review.googlesource.com/126455
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Jul 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants