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

Godebug issue with cgo //export marked go functions. #64

Open
dmccarney opened this issue Sep 15, 2015 · 0 comments
Open

Godebug issue with cgo //export marked go functions. #64

dmccarney opened this issue Sep 15, 2015 · 0 comments

Comments

@dmccarney
Copy link

It appears that godebug causes some issues with Go functions that are marked //export for use with native code via cgo.

E.g. running godebug to instrument a package that uses cgo to define a vsl_dispatch_catcher native function that in turn invokes a go function vsl_noise_handler that is marked //export vsl_noise_handler in the source produces:

$ godebug run -instrument=github.com/fastly/fst-noise/vsl noise/noise.go
# github.com/fastly/fst-noise/vsl
/tmp/go-build703672289/github.com/fastly/fst-noise/vsl/_obj/log.cgo2.o: In function `vsl_dispatch_catcher':
/tmp/godebug453289544/src/github.com/fastly/fst-noise/vsl/log.go:36: undefined reference to `vsl_noise_handler'
collect2: error: ld returned 1 exit status

Is there a workaround known?

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

1 participant