OS: Mac 10.13.3
Description: Hi.I had openssl installed by brew command, and after i run make in the coturn directory, there is an error emerged below:
src/apps/common/ns_turn_openssl.h:34:10: fatal error: 'openssl/md5.h' file not found
#include <openssl/md5.h>
^~~~~~~~~~~~~~~
1 error generated.
brew install openssl?
@misi I have tried brew and source compile both to install openssl
I faced the same problem then as per the instructions given in https://github.com/coturn/coturn/blob/master/INSTALL file, I download the openssl pakage from openssl.org and follow the other steps.
1) Download the OpenSSL version from openssl.org.
2) Let's assume that we want to install the "custom" OpenSSL into /opt.
Configure and build OpenSSL as:
$ ./config --prefix=/opt
$ make
$ make install
Those commands will install OpenSSL into /opt, with static libraries (no
dynamic libraries).
3) Build the TURN server:
$ ./configure --prefix=/opt
$ make
Those commands will build the TURN server binaries, statically linked
against the newer OpenSSL.
It worked well.
When you install openssl via Homebrew you get this warning.
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
So you need to explicitly point the compiler to the library. The following worked for me.
$ export LDFLAGS=-L/usr/local/opt/openssl/lib
$ export CPPFLAGS=-I/usr/local/opt/openssl/include
$ ./configure
$ make
The same as above works for me..
See travis file:
https://github.com/coturn/coturn/blob/485e33600cd015709d2840f9eaa1b504c57c55ef/.travis.yml#L5-L7
It think this issue has now resolved, so I am going to close it. Please comment or open new if you still has issue with it.
Most helpful comment
When you install
opensslvia Homebrew you get this warning.So you need to explicitly point the compiler to the library. The following worked for me.