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: handle repeated "unresolved inter-package jump" errors #25753

Closed
quasilyte opened this issue Jun 6, 2018 · 7 comments
Closed

cmd/link: handle repeated "unresolved inter-package jump" errors #25753

quasilyte opened this issue Jun 6, 2018 · 7 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.

Comments

@quasilyte
Copy link
Contributor

quasilyte commented Jun 6, 2018

CL113955 fixes duplicated "unresolved symbol" messages, but for architectures with trampoline support we also have "unresolved inter-package jump" errors (they are also repeated).

This caused some builders to break due to failing TestUndefinedRelocErrors test.

Given program used in test:

package main

func undefined()

func defined1() int {
	// To check multiple errors for a single symbol,
	// reference undefined more than once.
	undefined()
	undefined()
	return 0
}

func defined2() {
	undefined()
	undefined()
}

func init() {
	_ = defined1()
	defined2()
}

// The "main" function remains undeclared.

With pre-updated linker we get and GOARCH=ppc64:

main.defined1: unresolved inter-package jump to main.undefined()
main.defined1: unresolved inter-package jump to main.undefined()
main.defined2: unresolved inter-package jump to main.undefined()
main.defined2: unresolved inter-package jump to main.undefined()
main.defined1: relocation target main.undefined not defined
main.defined1: relocation target main.undefined not defined
main.defined2: relocation target main.undefined not defined
main.defined2: relocation target main.undefined not defined
runtime.main_main·f: relocation target main.main not defined
main.defined1: undefined: "main.undefined"
main.defined1: undefined: "main.undefined"
main.defined2: undefined: "main.undefined"
main.defined2: undefined: "main.undefined"
runtime.main_main·f: undefined: "main.main"

With CL mentioned above we get less errors, but some unexpected and duplicated errors remain:

main.defined1: unresolved inter-package jump to main.undefined()
main.defined1: unresolved inter-package jump to main.undefined()
main.defined2: unresolved inter-package jump to main.undefined()
main.defined2: unresolved inter-package jump to main.undefined()

Leading to failure:

--- FAIL: TestUndefinedRelocErrors (0.21s)
    ld_test.go:68: unexpected error: main.defined2: unresolved inter-package jump to main.undefined() (x2)
    ld_test.go:68: unexpected error: main.defined1: unresolved inter-package jump to main.undefined() (x2)
@quasilyte
Copy link
Contributor Author

I'll send a fix today.

@ALTree ALTree added NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Jun 6, 2018
@gopherbot
Copy link

Change https://golang.org/cl/116676 mentions this issue: cmd/link: fix duplicated "unresolved inter-package jump" errors

@jcajka
Copy link
Contributor

jcajka commented Jun 7, 2018

For the record observed on pp64le/armv7hl Fedora and Epel/RHEL/Centos 7 where it breaks build of the GC as all test passing is expected.

--- FAIL: TestUndefinedRelocErrors (0.22s)
    ld_test.go:68: unexpected error: main.defined2: unresolved inter-package jump to main.undefined() (x2)
    ld_test.go:68: unexpected error: main.defined1: unresolved inter-package jump to main.undefined() (x2)
FAIL
FAIL	cmd/link/internal/ld	26.581s

CL116676 seems to resolve this issue for me.

@laboger
Copy link
Contributor

laboger commented Jun 8, 2018

This resolves the issue, can we get this fix in?

@quasilyte
Copy link
Contributor Author

@laboger, sorry for the inconvenience.

If anyone familiar with Go linker can help Ian doing a review, maybe we can get this faster.
Thanks.

@ianlancetaylor
Copy link
Contributor

@quasilyte I'm waiting for an updated change on https://golang.org/cl/116676. You replied to my comments but you didn't upload any fixes. Or did I miss something?

@quasilyte
Copy link
Contributor Author

My mistake. Updated patch set was not sent. :(
Mailed it just now.

@golang golang locked and limited conversation to collaborators Jun 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

6 participants