-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
runtime/cgo(.text): unknown symbol __stack_chk_fail_local in pcrel (regression in 1.19 when building for i686) #54313
Comments
Please fill out the issue template. Or at least tell us your GOOS and GOARCH values. Thanks. |
It's caused by C flags
|
Apologies. Does the above clarify matters? |
@kanavin Thanks. Does https://go.dev/cl/421935 fix the problem for you? |
Change https://go.dev/cl/421935 mentions this issue: |
Thanks, it does. |
Some compilers default to having -fstack-protector on, which breaks when using internal linking because the linker doesn't know how to find the support functions. Fixes golang#52919 Fixes golang#54313 Change-Id: I6f51d5e906503f61fc768ad8e30c163bad135087 Reviewed-on: https://go-review.googlesource.com/c/go/+/421935 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
Some compilers default to having -fstack-protector on, which breaks when using internal linking because the linker doesn't know how to find the support functions. Fixes golang#52919 Fixes golang#54313 Change-Id: I6f51d5e906503f61fc768ad8e30c163bad135087 Reviewed-on: https://go-review.googlesource.com/c/go/+/421935 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> (cherry picked from commit 365ca69)
Can this be backported to 1.19? @gopherbot please backport this issue to go1.19 |
Backport issue(s) opened: #54764 (for 1.19). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
This only affects 386? Does it need a backport to 1.18? |
Yes only i386 builds are affected. go1.18 is not affected. |
Use go 1.18.7 to work around build problem in go with -fstack-protector-strong golang/go#54313
Change https://go.dev/cl/456855 mentions this issue: |
Some compilers default to having -fstack-protector on, which breaks when using internal linking because the linker doesn't know how to find the support functions. Updates #52919. Updates #54313. Fixes #57261. Change-Id: Iaae731851407af4521fff2dfefc5b7e3e92cf284 Reviewed-on: https://go-review.googlesource.com/c/go/+/456855 Run-TryBot: Than McIntosh <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
Change https://go.dev/cl/466936 mentions this issue: |
Change https://go.dev/cl/466935 mentions this issue: |
Add -fno-stack-protector back to the default set of CFLAGS for cgo, so as to avoid problems with internal linking locating the library containing the "__stack_chk_fail_local" support function that some compilers emit (the specific archive can vary based on GOOS). Updates #52919. Updates #54313. Updates #57261. Updates #58385. Change-Id: I4591bfb15501f04b7afe1fcd50c4fb93c86db63d Reviewed-on: https://go-review.googlesource.com/c/go/+/466935 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Than McIntosh <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
…ocal" Update the code that tries to satisfy unresolved references to "__stack_chk_fail_local" to look for "libssp_nonshared.a" in addition to "libc_nonshared.a" (the former archive is the correct place on Alpine). Updates #52919. Updates #54313. Updates #57261. Fixes #58385. Change-Id: Id6cd3ebb4d5388df50a838e6efa5e5b683545b01 Reviewed-on: https://go-review.googlesource.com/c/go/+/466936 Run-TryBot: Than McIntosh <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Add -fno-stack-protector back to the default set of CFLAGS for cgo, so as to avoid problems with internal linking locating the library containing the "__stack_chk_fail_local" support function that some compilers emit (the specific archive can vary based on GOOS). Updates golang#52919. Updates golang#54313. Updates golang#57261. Updates golang#58385. Change-Id: I4591bfb15501f04b7afe1fcd50c4fb93c86db63d Reviewed-on: https://go-review.googlesource.com/c/go/+/466935 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Than McIntosh <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
…ocal" Update the code that tries to satisfy unresolved references to "__stack_chk_fail_local" to look for "libssp_nonshared.a" in addition to "libc_nonshared.a" (the former archive is the correct place on Alpine). Updates golang#52919. Updates golang#54313. Updates golang#57261. Fixes golang#58385. Change-Id: Id6cd3ebb4d5388df50a838e6efa5e5b683545b01 Reviewed-on: https://go-review.googlesource.com/c/go/+/466936 Run-TryBot: Than McIntosh <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1.19 no longer builds for i686 targets (where 1.18 was working fine):
CGO_CFLAGS=-fno-stack-protector
is a workaround.See here for others having the same issue:
#52919
The text was updated successfully, but these errors were encountered: