Closed gripedthumbtacks closed 8 years ago
Looking at the symbols in the error log, I think it's trying to link with your system OpenSSL. You should check if CGO_LDFLAGS
is set correctly and link with BoringSSL.
I am using go v1.5 so I thought this was not necessary?
"Due to Go 1.4's cgo restrictions, use an environment variable like below to build your projects. This restriction will be removed from Go 1.5."
I can understand the OpenSSL potentially being an issue, but the first error is a problem with protobuf, which wouldn't have anything to do with SSL right?
"undefined reference to `google::protobuf::internal::GetEmptyString[abi:cxx11]()'"
You're right. I think protobuf should also use the libquic's internal version. And about that Go 1.5 notice, I think we haven't done the patch to get rid of CGO_LDFLAGS
just yet. So for now, please use CGO_LDFLAGS
to direct your compiler to use the correct version of protobuf and BoringSSL.
Thank you much. That seems to have worked well :) You rock!
CGO_LDFLAGS="-L/tmp/gopath/src/github.com/devsisters/goquic/lib/linux_amd64/" go run /tmp/gopath/src/goquic/client.go
Good to see it working! We'll get rid of CGO_LDFLAGS
soon. Thanks!
Just a quick note -- I am planning to compile my app for Android using gomobile [1]. I don't think I can override CGO_LDFLAGS on Android using this easily, since these are different architectures. Is there any other workaround or how will it work in the future once changes are finalized? Has cross-compiling goquic for arm64, targeting Android v6 been tested at all? Or am I diving headfirst into something that will surely not work for known internal reasons within libquic? ;) If you think it is possible, I am happy to be the first one to try. Also, let me know if your project takes donations online. Awesome sauce...
[1] https://github.com/golang/go/wiki/Mobile#building-and-deploying-to-android
I'll just close this as non-issue for now.
Got a bunch of build problems below, mostly related to imports at runtime. However, I am using the libprotobuf v2.6 which is included with Ubuntu 15.10. I may have done something dumb, but I'm new to golang in general and not entirely sure.
This may be relevant, but the fix doesn't appear to be working. I did recompile libprotobuf from source via gcc v5.2.1 and that didn't seem to work :( Thoughts?
https://stackoverflow.com/questions/30124264/undefined-reference-to-googleprotobufinternalempty-string-abicxx11