-
Notifications
You must be signed in to change notification settings - Fork 444
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
Unexpected Relocation Error for Dynamic Symbol __CFConstantStringClassReference When Running Unit Tests #3000
Comments
Hi @juri-t, thanks for reaching to us. It's possible that you are forcing internal linking mode, which it isn't well supported when compiling with CGO enabled. We were able to reproduce it. Assuming a simple program like this one: package main
import (
"fmt"
"net/http"
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer"
)
func main() {
tracer.Start(tracer.WithServiceName("hello-world"))
defer tracer.Stop()
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
span, _ := tracer.StartSpanFromContext(r.Context(), "greeting")
defer span.Finish()
fmt.Fprintf(w, "Hello world!")
})
http.ListenAndServe(":3000", nil)
} Compiled as is, it doesn't complain. If we set
If we set
Make sure you don't use internal linking mode unless strictly required. In that case, if you can work with |
Thank you for the quick response. I am using
The issue has been resolved. Thank you. |
After updating dd-trace-go, I encountered an issue where running unit tests outputs the following error log:
github.com/shoenig/go-m1cpu(__DATA/__cfstring): unexpected reloc for dynamic symbol __CFConstantStringClassReference
This appears to have been introduced in this PR, where the library github.com/shoenig/go-m1cpu was added as a dependency.
While the tests continue to work as expected, this log is very noisy and clutters the output, making debugging other issues difficult.
Could you provide guidance on how to suppress or resolve this error log?
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: