error: field 'ctx' has incomplete type EVP_CIPHER_CTX - linux

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.

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);

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.

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

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.

Related

An error occurred while executing the "make" command while compiling and installing the "ModSecurity- Nginx" module

I am getting the error below while compiling and installing the "ModSecurity- Nginx" module.
Installing the "ModSecurity- Nginx" module
#yum install -y gcc-c++ flex bison yajl yajl-devel curl-devel curl GeoIP-devel doxygen zlib-devel pcre-devel lmdb-devel libxml2-devel ssdeep-devel lua-devel libtool autoconf automake
#cd /root
#git clone https://github.com/SpiderLabs/ModSecurity-nginx.git
#yum install libmodsecurity-devel
#cd /root/nginx-1.10.3/
#./configure --prefix=/opt/nginx --add-module=/root/ModSecurity-nginx
Compiling
#make **(Now start reporting errors)**
ERROR
/opt/ModSecurity-nginx/src/ngx_http_modsecurity_module.c: In function ‘ngx_http_modsecurity_create_ctx’:
/opt/ModSecurity-nginx/src/ngx_http_modsecurity_module.c:259:9: error: implicit declaration of function ‘msc_new_transrror=implicit-function-declaration] ctx->modsec_transaction = msc_new_transaction_with_id(mmcf->modsec, mcf->rules_set, (char *) s.data, r->conne
/opt/ModSecurity-nginx/src/ngx_http_modsecurity_module.c:259:33: error: assignment makes pointer from integer without ctx->modsec_transaction = msc_new_transaction_with_id(mmcf->modsec, mcf->rules_set, (char *) s.data, r->conne
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/src/ngx_http_modsecurity_module.o] Error 1
make[1]: Leaving directory `/root/nginx-1.16.1'
make: *** [build] Error 2
The ModSecurity nginx connector compilation is failing because it can't find the ModSecurity headers. Every time a ModSecurity function is called, it's the first time the compiler is hearing about the existence of said function, thus making this an "implicit" function declaration.
To make a long story short, you need to specify where the compiler can find the ModSecurity headers and libraries. To do this, you're supposed to set two environment variables before configuring or compiling the connector module.
export MODSECURITY_INC="/opt/ModSecurity/headers/"
export MODSECURITY_LIB="/opt/ModSecurity/src/.libs/"
These paths were taken straight from the documentation, so you'll need to adjust them depending on where yum installed the libmodsecurity-devel package.
You can find the recipes for building the ModSecurity module and the ModSecurity nginx connector here and here, respectively.

How to build OpenSSH with no dependence on OpenSSL?

I am trying to build OpenSSH 7.3 without OpenSSL.
I ran $ ./configure --without-openssl.
And then running either $ make OPENSSL=no or $ make give the following error:
In file included from ../entropy.h:30:0,
from ../includes.h:174,
from arc4random.c:27:
../buffer.h:50:29: fatal error: openssl/objects.h: No such file or directory
compilation terminated.
make[1]: *** [arc4random.o] Error 1
make[1]: Leaving directory /local/store/openssh/openssh-7.3p1/openbsd-compat'
make: *** [openbsd-compat/libopenbsd-compat.a] Error 2
These includes are not properly wrapped with #ifdef WITH_OPENSSL, so are still reachable. What am I doing wrong?
How do I configure and build OpenSSH 7.3 without OpenSSL dependencies?
It seems that as of version 6.8 OpenSSH can be built without OpenSSL. From 6.8 release notes:
Support --without-openssl at configure time
Disables and removes dependency on OpenSSL. Many features,
including SSH protocol 1 are not supported and the set of crypto
options is greatly restricted. This will only work on systems
with native arc4random or /dev/urandom.
Also I found this message on OpenBSD CVS:
CVSROOT: /cvs
Module name: src
Changes by: markus#cvs.openbsd.org 2014/04/29 12:01:49
Modified files:
usr.bin/ssh : Makefile.inc auth.c authfd.c authfile.c
bufaux.c cipher.c cipher.h hostfile.c kex.c
key.c mac.c monitor.c monitor_wrap.c
myproposal.h packet.c roaming_client.c
ssh-agent.c ssh-keygen.c ssh-keyscan.c
ssh-keysign.c ssh-pkcs11.h ssh.c sshconnect.c
sshconnect2.c sshd.c
usr.bin/ssh/lib: Makefile
usr.bin/ssh/ssh: Makefile
usr.bin/ssh/sshd: Makefile
Log message:
make compiling against OpenSSL optional (make OPENSSL=no);
reduces algorithms to curve25519, aes-ctr, chacha, ed25519;
allows us to explore further options; with and ok djm
I built OpenSSH 7.7p1 without openssl using:
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-privsep-path=/var/empty --libexecdir=/usr/lib/openssh --without-openssl
I also used the patch from Linux From Scratch.

Can't compile QT 5.5.1 on Amazon Centos: Project ERROR: Unknown module(s) in QT: quick

I am trying to compile QT 5.5.1 on Amazon AMI 2015.09, which looks la lot like Centos 6.5.
I keep getting this error:
Project ERROR: Unknown module(s) in QT: quick
However, there is no quick module that I can find, and no obvious way to enable to disable it from looking at the ./configure script.
My procedure:
I downloaded qt-everywhere-opensource-src-5.5.1.tar.gz
I unpacked it.
I ran ./configure
Confirmed that I want the opensource license and agreed to the LGPL.
Ran gmake -j4 (but I get the same behavior with gmake.
Interestingly, make distclean gives me this error:
Project ERROR: Unknown module(s) in QT: quick-private
Here are all of the errors sent to STDERR:
Checking for openal... Checking for bluez... no
Checking for bluez_le... no
Checking for btapi10_2_1... no
/home/ec2-user/qt-everywhere-opensource-src-5.5.1/qtmultimedia/qtmultimedia.pro:28: Variable GST_VERSION is not defined.
Checking for resourcepolicy... no
Checking for gpu_vivante... no
Checking for libbb2... no
no
Project MESSAGE: Unsupported Bluetooth platform, will not build a working QtBluetooth library.
Project MESSAGE: Either no Qt D-Bus found or no BlueZ headers.
qbluetoothdevicediscoveryagent_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothservicediscoveryagent_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothserver_p.h:0: Note: No relevant classes found. No output generated.
qbluetoothlocaldevice_p.h:0: Note: No relevant classes found. No output generated.
Checking for assimp... no
Project ERROR: Unknown module(s) in QT: quick
gmake[4]: *** [sub-textureandlight-make_first] Error 3
gmake[3]: *** [sub-canvas3d-make_first] Error 2
gmake[2]: *** [sub-canvas3d-make_first] Error 2
gmake[1]: *** [sub-examples-make_first] Error 2
gmake: *** [module-qtcanvas3d-make_first] Error 2
gmake: *** Waiting for unfinished jobs....
At another poster's suggestion I tried ./configure -skip qtquick but that didn't work:
$ ./configure -skip qtquick
+ cd qtbase
+ /home/ec2-user/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -skip qtquick
Attempting to skip non-existent module qtquick.
$
this is what I think will solve your problems:
You have use `make confclean' instead of making distclean for deleting the previous configuration.
Configure in verbose mode — more information will be provided, sorry, I don't remember exact flag, if I'm not mistaken, it's -v.
If you don't need quick, add -skip qtquick to the configure.

build octave package from source

I want to install octaviz package in octave software.
From the documentation there is stated:
-You'll need octave 2.1.53 or later and VTK CVS to build octaviz. To compile octaviz, run ccmake . in the root directory of the source tree, then make and finally make install.
I first ran ccmake ., and it completed successfully after I installed some libs that I was missing.
But, the I ran "make" and it exits with the following errors:
>> make
[ 1%] Built target vtkWrapOctave
[ 1%] Building CXX object Common/CMakeFiles/octaviz.dir/octaviz.o
/home/user12345/octave/octaviz/Common/octaviz.cc:31:24: fatal error: octave/oct.h: No such file or directory
#include <octave/oct.h>
^
compilation terminated.
make[2]: *** [Common/CMakeFiles/octaviz.dir/octaviz.o] Error 1
make[1]: *** [Common/CMakeFiles/octaviz.dir/all] Error 2
make: *** [all] Error 2
Any idea what I am missing here?
You are missing the octave/oct.h header. This usually means that you don't have Octave installed. If you do have it installed, maybe you are missing the header files and shared libraries (if you are using Linux, did you install octave's -dev or -devel packaqes?) If you have them installed, you must have ran the configure script incorrectly. Either specify the correct options or set the CXX_FLAGS. If you don't know about compiler flags you probably should not change them and instead figure out how to install the octave libraries correctly.

Audacity installation error

Getting following error on installing audacity in linux:
export/ExportPCM.cpp: In member function ‘bool ExportPCM::AddStrings(AudacityProject*, SNDFILE*, Tags*, int)’:
export/ExportPCM.cpp:740: error: ‘SF_STR_GENRE’ was not declared in this scope
export/ExportPCM.cpp:764: error: ‘SF_STR_TRACKNUMBER’ was not declared in this scope
make[1]: *** [export/ExportPCM.o] Error 1
make[1]: Leaving directory `/root/audacity/audacity-src-2.0.5/src'
make: *** [audacity] Error 2
Can any one help me in fixing the issue?
I also got the same error. The following is my solution:
From the first error line:
export/ExportPCM.cpp: In member function ‘bool ExportPCM::AddStrings(AudacityProject*, SNDFILE*, Tags*, int)’:
we see that it is caused by libsndfile. Therefore, you just need to compile the latest libsndfile. Download tarball here http://www.mega-nerd.com/libsndfile/#Download
After that, you compile audacity again and compilation will be successful.
This is an error when compiling that package, not during installation. It most likely is the result of some version incompatibility between the code you try to compile and some development version installed on your system which is referred to by the code. You will have to find out what packages usually declare those constants and adjust your versions accordingly.
Apart from that: sure you want to make such a "wild" installation? Typically packages are installed using your systems software management system these days. That is much easier, more robust and allows easy upgrades to newer versions. Audacity should be available for most GNU/Linux distributions.

Resources