unispeech / asterisk-unimrcp

UniMRCP modules for Asterisk
http://www.unimrcp.org/asterisk
GNU General Public License v2.0
48 stars 36 forks source link

make on ubuntu 14.04 fatal error: asterisk/format.h: No such file or directory #6

Closed fariss closed 7 years ago

fariss commented 7 years ago

the output of ./configure --with-asterisk-version=11.7.0 is good:

****************************** REPORT ******************************

Asterisk version.............. : 11.7.0
UniMRCP version............... : 1.4.0
UniMRCP modules version....... : 1.4.0

Compiler...................... : gcc
Compiler flags................ : -g -O2
Preprocessor definitions...... :
Linker flags.................. :

Modules install path...........: /usr/lib/asterisk/modules
Configuration install path.....: /etc/asterisk
XML doc install path...........: /var/lib/asterisk/documentation/thirdparty

Speech resource module.........: yes
Application module.............: yes

********************************************************************

but make give the folowing error:


Making all in res-speech-unimrcp
make[1]: Entering directory `/root/asterisk-unimrcp/res-speech-unimrcp'
  CC       res_speech_unimrcp.lo
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h:85:29: fatal error: asterisk/format.h: No such file or directory
 #include "asterisk/format.h"
                             ^
compilation terminated.
make[1]: *** [res_speech_unimrcp.lo] Error 1
make[1]: Leaving directory `/root/asterisk-unimrcp/res-speech-unimrcp'
make: *** [all-recursive] Error 1
achaloyan commented 7 years ago

I guess the version number which you explicitly specified 11.7.0 does not match the actual version of Asterisk installed on your system. In particular, asterisk/format.h was not available in Asterisk 1.8.x.

If you have multiple versions of Asterisk installed, then you may need to specify the path to Asterisk as well (--with-asterisk).

achaloyan commented 7 years ago

It looks like the development package of Asterisk was not installed in this case. That's why the header files were missing.

In commit c81b2877d48275713ed72f2c5464c07ae5c76a07, the asterisk.m4 macro has been enhanced to check for the Asterisk include directory and warn to install development package, if not found.

sudo apt-get install asterisk-dev