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

error on build on OSX #1

Open
joeblew99 opened this issue May 17, 2015 · 2 comments
Open

error on build on OSX #1

joeblew99 opened this issue May 17, 2015 · 2 comments

Comments

@joeblew99
Copy link

Could you help me out.
The build script is being run and i get this error.
Here is the terminal:

devsisters apple$ CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/darwin_amd64" go build $GOPATH/src/github.com/devsisters/gospdyquic/example/server.go

github.com/devsisters/goquic

goquic/init.go:10:30: error: unknown type name 'CRYPTO_THREADID'
extern void goquic_thread_id(CRYPTO_THREADID *id);
^
1 error generated.


BTW the path on the readme is wrong. Is missing the "src" before /github.com/....

@serialx
Copy link
Member

serialx commented May 18, 2015

Hello! Thank you for reporting this problem. Due to recent thread safety related patch to goquic, a working OpenSSL header is needed. We are still figuring out how we can deal with this new dependency.

Normally this would not be a problem because many developers have OpenSSL installed. But it seems you are using an older version of OpenSSL which does not have CRYPTO_THREADID type in the header. (You need at least OpenSSL 1.0.0) So you have two options.

  1. You can install latest OpenSSL to mitigate this problem: brew install openssl
  2. Fortunately, libquic repository has a latest version of BoringSSL, which includes all the headers you need. (And we link to BoringSSL anyways) So setting CGO_CFLAGS environment variable to the BoringSSL repository will solve this problem. Example: CGO_CFLAGS="/path/to/boringssl/include/" CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/darwin_amd64" go build $GOPATH/src/github.com/devsisters/gospdyquic/example/server.go

@serialx
Copy link
Member

serialx commented Jun 10, 2015

I've updated the README to add CGO_CFLAGS environment variable. Can you try it out and see if it works?

Thanks!

JasonGross added a commit to JasonGross/urweb that referenced this issue Dec 30, 2015
[A Google
search](devsisters/gospdyquic#1 (comment))
suggests that the problem is that Mac OSX OpenSSL headers are broken.
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