Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to do make install "asterisk.h: No such file or directory" #9

Open
vcidst opened this issue Mar 15, 2022 · 5 comments
Open

Unable to do make install "asterisk.h: No such file or directory" #9

vcidst opened this issue Mar 15, 2022 · 5 comments

Comments

@vcidst
Copy link

vcidst commented Mar 15, 2022

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
@sboily
Copy link
Owner

sboily commented Mar 15, 2022

You don't have asterisk headers files installed on your server. Check asterisk-dev packets.

@vcidst
Copy link
Author

vcidst commented Mar 15, 2022

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

@sboily
Copy link
Owner

sboily commented Mar 15, 2022

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.

@voicecomms
Copy link

voicecomms commented Jan 17, 2024

Hello,
how about when you install asterisk from source , how do you install the above module then ?
thanks in advance.
Regards CJ

@sboily
Copy link
Owner

sboily commented Jan 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants