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

cgo unusable on ubuntu 14.04 after installing from binary tarball because shipped .a files were produced by a newer ld #31454

Closed
jazzkutya opened this issue Apr 13, 2019 · 2 comments

Comments

@jazzkutya
Copy link

Please answer these questions before submitting your issue. Thanks!

What did you do?

go get github.com/pothosware/go-soapy-sdr/cmd

What did you expect to see?

building github.com/pothosware/go-soapy-sdr/cmd without problems

What did you see instead?

vrm@zivatar:~$ go get github.com/pothosware/go-soapy-sdr/cmd

github.com/pothosware/go-soapy-sdr/pkg/modules

cgo-gcc-prolog: In function ‘_cgo_4c4fb08f621d_Cfunc_SoapySDR_loadModules’:
cgo-gcc-prolog:197:49: warning: unused variable ‘_cgo_a’ [-Wunused-variable]

github.com/pothosware/go-soapy-sdr/cmd

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /tmp/go-link-700694930/000005.o: unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Does this issue reproduce with the latest release (go1.12.4)?

probably

System details

go version go1.12.3 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vrm/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/vrm/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
GOROOT/bin/go version: go version go1.12.3 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.12.3
uname -sr: Linux 4.4.0-142-generic
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.5 LTS
Release:	14.04
Codename:	trusty
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6.14) stable release version 2.19, by Roland McGrath et al.
gdb --version: GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
@ALTree
Copy link
Member

ALTree commented Apr 13, 2019

Thanks for reporting this.

Does this issue reproduce with the latest release (go1.12.4)?
probably

Considering the you're using 1.12.3, and the fact that 1.12.4 was specifically issued to fix this problem, I would say it's actually "probably not".

Please test 1.12.4 to see if it does indeed fix the issue.

In the meantime, I'm closing this as a dup of #31293. Feel free to comment here if you can still reproduce the issue on 1.12.4, and we'll reopen the issue.

@ALTree ALTree closed this as completed Apr 13, 2019
@jazzkutya
Copy link
Author

jazzkutya commented Apr 13, 2019

thanks, can confirm the binary 1.12.4 fixes this. was building 1.12.4 earlier from source thinking it's the fix, and it did fix. good to know building from source was not neccessary

@golang golang locked and limited conversation to collaborators Apr 12, 2020
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

3 participants