15

Problem: I need to install Cepstral (tts engine) into Freeswitch running Debian 8. Freeswitch is already up and running, but I needed to build it from source in order for it create the mod_cepstral module.

When I run make this is the error I get:

In file included from ./crypto/include/prng.h:17:0,
                 from ./crypto/include/crypto_kernel.h:50,
                 from ./include/srtp.h:53,
                 from srtp/srtp.c:46:
./crypto/include/aes_icm_ossl.h:66:20: error: field ‘ctx’ has incomplete type
     EVP_CIPHER_CTX ctx;
                    ^~~
In file included from srtp/srtp.c:50:0:
./crypto/include/aes_gcm_ossl.h:58:18: error: field ‘ctx’ has incomplete type
   EVP_CIPHER_CTX ctx;
                  ^~~
Makefile:646: recipe for target 'srtp.lo' failed
make[1]: *** [srtp.lo] Error 1
make[1]: Leaving directory '/usr/src/freeswitch/libs/srtp'
Makefile:3931: recipe for target 'libs/srtp/libsrtp.la' failed
make: *** [libs/srtp/libsrtp.la] Error 2

I have been scouring the internet for solutions, but I am not a developer and this is way over my head. Any help would be appreciated.

Joe
  • 2,641
  • 5
  • 22
  • 43

4 Answers4

29

cause newer OpenSSL don't expose struct EVP_CIPHER_CTX ,

try this

EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
EVP_CIPHER_CTX_init(ctx);
//do sth here
//...
EVP_CIPHER_CTX_free(ctx);
Kevin
  • 16,549
  • 8
  • 60
  • 74
Xt Z
  • 439
  • 4
  • 7
  • 1
    Which file contain this code or where to change it ? – Dumitru Boaghi Sep 08 '20 at 12:44
  • @DumitruBoaghi, did you resolve this error ? – Prateek Goyal Apr 08 '21 at 13:43
  • I am annoyed to have to make this change to everywhere in my old code (in fact i don't have time and it's blocking me from doing other things because of that)... and it's not just as simple as putting a .._free if you have return statements scattered through that now need this added code. – Michael Jul 26 '21 at 19:22
9
wget https://github.com/cisco/libsrtp/archive/v2.1.0.tar.gz
tar xfv v2.1.0.tar.gz
cd libsrtp-2.1.0
./configure --prefix=/usr --enable-openssl
make shared_library && sudo make install

Get the latest version of libsrtp.

Eric Hauenstein
  • 2,557
  • 6
  • 31
  • 41
mikeb
  • 101
  • 2
4

It appears that there is a dependency on OpenSSL, but the version of OpenSSL you are using is incompatible. You are using OpenSSL 1.1.0 but you need to use OpenSSL 1.0.2

Matt Caswell
  • 8,167
  • 25
  • 28
  • Just installed 1.1.0 and tested it, but still getting the same error – Joe Nov 28 '17 at 14:13
  • As I said in my answer you need to use 1.0.2 *not* 1.1.0. The errors above result from a mismatch between an application expecting 1.0.2, but using 1.1.0 headers. – Matt Caswell Nov 28 '17 at 14:45
  • yeah I thought I had installed 1.0.2 (above comment was a typo) and still failed but after checking I realized the the install did not quite take. Reinstalling now to test again. – Joe Nov 28 '17 at 14:47
  • Ok so 1.0.2 is installed but still getting the ctx error – Joe Nov 28 '17 at 15:05
  • @Joe did you resolve this error? I am still getting after installing 1.0.2 openssl. – Prateek Goyal Apr 08 '21 at 15:07
  • @Prateek The answer below was from me. At the time Cepstral was not supported on Debian 8. I had to downgrade and it worked. However, it has been 3+ years so that may not be the issue you are having. – Joe Apr 09 '21 at 12:32
  • @Joe, I am trying on Ubuntu 20.04 and freeswitch 1.6.14. Facing this same error there. Could it be because of incompatibility in ubuntu and freeswitch versions? – Prateek Goyal Apr 09 '21 at 12:35
  • @Prateek possibly. Maybe downgrade one version back. Honestly, I haven't touched freeswitch in a few years now so I can't be of much help – Joe Apr 09 '21 at 15:14
1

After talking with support at Cepstral, we determined that Jessie (Debian 8) is not yet fully compatible. I rebuilt the server with Debian 7 and it is working fine now.

Joe
  • 2,641
  • 5
  • 22
  • 43