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 linker error while cross-compiling #231

Closed
vaibhavexleapsemi opened this issue Apr 9, 2021 · 2 comments
Closed

cgo linker error while cross-compiling #231

vaibhavexleapsemi opened this issue Apr 9, 2021 · 2 comments

Comments

@vaibhavexleapsemi
Copy link

Hi,
I am facing error while cross-compiling app-service-configurable using riscv sdk build using yocto.
Following is the error I was getting:

github.com/pebbe/zmq4

../go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:10:4: undefined: State
../go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:11:9: undefined: State
../go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:21:16: undefined: Socket
../go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:23:12: undefined: Poller
../go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:55:34: undefined: Socket
../go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:55:49: undefined: State
../go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:62:37: undefined: Socket
../go/pkg/mod/github.com/pebbe/[email protected]/utils.go:17:12: undefined: Socket
../go/pkg/mod/github.com/pebbe/[email protected]/utils.go:24:12: undefined: Socket
../go/pkg/mod/github.com/pebbe/[email protected]/utils.go:28:12: undefined: Socket
../go/pkg/mod/github.com/pebbe/[email protected]/utils.go:28:12: too many errors

Than I exported CGO_ENABLED="1"
Than I am facing with this error:
/home/root/workspace/sysroots/x86_64-oesdk-linux/usr/libexec/riscv64-oe-linux/gcc/riscv64-oe-linux/10.2.0/real-ld: $WORK/b068/_x008.o: in function x_cgo_thread_start': ../workspace/sysroots/riscv64-oe-linux/usr/lib/go/src/runtime/cgo/gcc_util.c:21: undefined reference to _cgo_sys_thread_start'
collect2: error: ld returned 1 exit status

@rsdmike
Copy link
Member

rsdmike commented Apr 9, 2021

Hey @vaibhavexleapsemi, I would suggest to create a github issue in the github.com/pebbe/zmq4 repository as you will likely find better support for ZMQ specifically.

@rsdmike
Copy link
Member

rsdmike commented Apr 29, 2021

Closing as it is captured in pebbe/zmq4/issues/174. Thanks!

@rsdmike rsdmike closed this as completed Apr 29, 2021
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