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

go1.21-opensslv2-staging branch fails to dynamically link on ARM32 Arch #176

Open
manistal opened this issue Mar 26, 2024 · 3 comments
Open

Comments

@manistal
Copy link

Build system used was Yocto with recipes from Poky:

Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "ipq8074a"
DISTRO               = "poky"
DISTRO_VERSION       = "2.4.4"
TUNE_FEATURES        = "arm armv7a vfp thumb neon vfpv4 callconvention-hard"
TARGET_FPU           = "hard"

Host machine x86_64, with target architecture ARM32/v7 - go 1.21.8 builds successfully, however after applying the patches in go1.21-opensslv2-staging:

| HASH[linkShared]: "top vendor/golang.org/x/text/secure/bidirule=FpkbO78hQyBlBiTOORBH\n"
| HASH[linkShared]: "top vendor/golang.org/x/text/transform=hveFt4djHRTLqltF39uj\n"
| HASH[linkShared]: "top vendor/golang.org/x/text/unicode/bidi=ammQB407V4VM_Rz1NWJO\n"
| HASH[linkShared]: "top vendor/golang.org/x/text/unicode/norm=KXnoy-L8RjV-wgCEe6z6\n"
| HASH[linkShared]: b0813a3a6bf7d8b387fb2e2c0519f52353b3d0abecce4eebd43c6ec41ea70d2e
| # /home/jenkins/poky/build/tmp/work/armv7ahf-neon-vfpv4-poky-linux-gnueabi/go-runtime/1.21.8-r0/go-tmp/go-build460557780/b278/libstd.so
| panic: runtime error: invalid memory address or nil pointer dereference
| [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5125e6]
| 
| goroutine 1 [running]:
| cmd/link/internal/loader.(*Loader).SymSize(0x669ae0?, 0x68c120?)
| 	cmd/link/internal/loader/loader.go:815 +0x46
| cmd/link/internal/ld.(*pclntab).generatePctab.func1(0x0)
| 	cmd/link/internal/ld/pcln.go:453 +0x56
| cmd/link/internal/ld.(*pclntab).generatePctab(0xc000d4e080, 0xc000186000, {0xc001986000, 0x666b, 0x200?})
| 	cmd/link/internal/ld/pcln.go:476 +0x39f
| cmd/link/internal/ld.(*Link).pclntab(0xc000186000, {0xc001366000?, 0xc000146420?, 0xf?})
| 	cmd/link/internal/ld/pcln.go:779 +0x1ad
| cmd/link/internal/ld.Main(_, {0x4, 0x8, 0x1, 0xd, 0xe, 0x1c00000, {0x0, 0x0, 0x0}, ...})
| 	cmd/link/internal/ld/main.go:349 +0x1590
| main.main()
| 	cmd/link/main.go:72 +0xdfb
| WARNING: exit code 1 from a shell command.

Disabling dynamic linking in the build resolves this issue, but results in a larger go runtime.

Is this an issue that would eventually get fixed for Go 1.21 or would this be addressed in later releases? Thanks!

@pmalhaire
Copy link

I am facing the same issue with go 1.22.4 using poky too

@pmalhaire
Copy link

Same stack is in this issue
golang/go#67635

@pmalhaire
Copy link

The issue is inside golang a temporary solution is to use go1.23rc1 as go-native

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants