wazo-hackathon-asterisk-stream-module
wazo-hackathon-asterisk-stream-module copied to clipboard
Unable to do make install "asterisk.h: No such file or directory"
Hey, I was able to get this working from the Docker but I'm trying it on an asterisk instance and see this error when running make
. Can you tell me how can I make these header files available to this directory?
OS: Ubuntu 20.04
➜ cd /usr/src
➜ sudo git clone https://github.com/sboily/wazo-hackathon-asterisk-stream-module.git
Cloning into 'wazo-hackathon-asterisk-stream-module'...
remote: Enumerating objects: 55, done.
remote: Total 55 (delta 0), reused 0 (delta 0), pack-reused 55
Unpacking objects: 100% (55/55), 26.27 KiB | 147.00 KiB/s, done.
➜ cd wazo-hackathon-asterisk-stream-module
➜ make
cc -c -Wall -Werror -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wmissing-format-attribute -Wformat=2 -g -fPIC -D_GNU_SOURCE -D'AST_MODULE="res_ari_stream"' -D'AST_MODULE_SELF_SYM=__internal_res_ari_stream_self' -o res_ari_stream.o res_ari_stream.c
res_ari_stream.c:54:10: fatal error: asterisk.h: No such file or directory
54 | #include "asterisk.h"
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:27: res_ari_stream.o] Error 1
Even though I have asterisk installed, I installed it from source.
➜ sudo asterisk -V
Asterisk 19.2.1
You don't have asterisk headers files installed on your server. Check asterisk-dev packets.
I can do apt-get install asterisk-dev
but that seems to be also installing asterisk itself. Can you point me to how I can install asterisk-dev for the version 19.2.1
from source?
I see the package here but it is for an older version. I'm thinking I should be able to get the files from the primary asterisk repo as well but not sure how
Hello, please check https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk. You only need to have all dev files from asterisk to build the modules. I never tested with asterisk 19 for information but i don't think the ABI has changed for this part.
Hello, how about when you install asterisk from source , how do you install the above module then ? thanks in advance. Regards CJ
Hello, you need to install the dev file from asterisk. There is no restriction to use Asterisk from the source to use it with this module.