Coturn: 'openssl/md5.h' file not found

Created on 5 May 2018  路  6Comments  路  Source: coturn/coturn

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.

Most helpful comment

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

All 6 comments

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

madmath03 picture madmath03  路  11Comments

activedecay picture activedecay  路  4Comments

ymichaelson picture ymichaelson  路  4Comments

simon-india picture simon-india  路  4Comments

bradennapier picture bradennapier  路  5Comments