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

How to compile with custom OpenSSL version statically? #1367

Closed
rugk opened this issue Nov 5, 2016 · 10 comments
Closed

How to compile with custom OpenSSL version statically? #1367

rugk opened this issue Nov 5, 2016 · 10 comments

Comments

@rugk
Copy link

rugk commented Nov 5, 2016

How can I e.g. compile ejabberd with OpenSSL 1.1.0 statically (i.e. not using the OpenSSL version installed on the system)?

@rugk
Copy link
Author

rugk commented Nov 7, 2016

@zinid Any tips? Is there a parameter for the configure file I can use?

@zinid
Copy link
Contributor

zinid commented Nov 7, 2016

@rugk no idea, probably playing with environment variables, some of them should be passed to configure script of fast_tls
Something like

export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CFLAGS="-I/usr/local/opt/openssl/include/"
export CPPFLAGS="-I/usr/local/opt/openssl/include/"

@rugk
Copy link
Author

rugk commented Nov 7, 2016

Thanks for your tip. I'll try it out.

@rugk
Copy link
Author

rugk commented Nov 7, 2016

Thanks for your help, I got it compiled, but I don't know whether it really used the static OpenSSL version. Is there an command for ejabberdctl showing the used modules or so?

@zinid
Copy link
Contributor

zinid commented Nov 8, 2016

There should be fast_tls_drv.so file created, you can try ldd on it or something like that.

@rugk
Copy link
Author

rugk commented Nov 8, 2016

Where should it be created (in the compile dir) or somewhere else?

@zinid
Copy link
Contributor

zinid commented Nov 8, 2016

$ cd ejabberd-source
$ ./configure && make
$ ls deps/fast_tls/priv/lib
fast_tls_drv.so  p1_sha.so

@rugk
Copy link
Author

rugk commented Nov 8, 2016

Thanks. So it tells me this:

$ ldd fast_tls_drv.so
[…]

1.0.0 is the version of fast tls AFAIK, so I do not see the OpenSSL version directly. However is it right that the /lib dir shows me that Fast TLS is using it's own libraries?

@weiss
Copy link
Member

weiss commented Nov 10, 2016

However is it right that the /lib dir shows me that Fast TLS is using it's own libraries?

No. You could either set LIBS and/or LDFLAGS appropriately, or just move OpenSSL's .so files out of the way during fast_tls compilation. Of course, both solutions require libssl.a and libcrypto.a to be available, which depends on your distribution.

Either way, this is a compiler/linker usage question rather than an ejabberd bug, so I'll close this issue. If you need additional help, you could ask on the ejabberd mailing list, for example.

@lock
Copy link

lock bot commented Jun 11, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants