Hello everyone.
I Hope you are all doing fine. I am trying to compile the asterisk for past few days. My setup is Centos 7 minimal with kernel 5.14. I tried to update everything. Installed new packages nothing seems to be working.
I am facing this issue. I tried to add lresolv lpthread and other libraries in:
Configuration command ./config LDFLAG… and ASTLDFLAG=…
Have you run ./contrib/scripts/install_prereq? Once that’s completed, a simple ./configure followed my make should compile Asterisk with no issues. When you have a successful compile, you can add options to configure like --prefix=/usr to control installation location.
If it still fails, you need to provide the exact commands you’re issuing and the full output.
for doing it for last few days I memorized everything
I did yum update at beginning.
First I un-tar the package then install all preqs using script located in contrib/scripts (mainly pjsip and jansson lib)
then I did ./configure --with libjansson. Although I added few arguments like --lib=/usr/lib64 LDFLAGS=-pg CFLAGS=-pg ASTLDFLAGS=“-lresolv -lpthread” etc.
then make menuselect gives me UI for selecting the modules for installation. For last time I unselected pjsip_resolver and in TEST I unselect all tests which are related to DNS.
then Finally I did “make”. after sometime it shows the screen which is attached in question.
What I observed that I faced the same issue in asterisk 16, 20 and 22-current. the same error when I make.
thank you for your time. Any help or suggestion is welcome.
I don’t understand. Why are you adding CFLAGS, LDFLAGS and ASTLDFLAGS? Why and how are you unselecting pjsip_resolver? You should not have to any of that. What is your objective here?
Just run…
$ ./configure --prefix=/usr --libdir=/usr/lib64
$ make
Hi @gjoseph
thank you for your timely response. I unselect the pjsip stuff from make menuselect GUI. I deselected everything related to DNS.
I tried to compile the asterisk 16 and 22-current with it removed everything else except --withjansons but I am still getting the same error dn_expand res_search.
My setup is centos 7 minimal with kernal 5.5.
The command just before the error has -lresolv -lpthread by default. but unable to get pass the error.
thank you in advance.
I just tried this in a CentOS 7 container and it worked fine.
You may see warnings during the build but they’re OK. If anything goes wrong, you MUST copy the exact commands and output from the terminal and paste it here. I can’t help if you don’t show me exactly what you’ve done and the exact errors.
As usual it just unable to go beyond this step. The error: undefined reference to dn_expand and res_search which occurred in function "ebl_callback parse_naptr dns_naptr_alloc dns_srv_alloc parae_srv ".
What should I do to fix these?
Thank you for your help.
PS: Unable to attach more than 1 media items in post
You should be posting these as plain text, which you should mark up as preformatted text, which will have the added benefit that things that look like URIs won’t be counted as attempts to create links.
ldd is provided by glibc-common which looks like it’s at 2.17. If ldd --version shows 2.34 then your system is not in a consistent state. Did you try to compile and install glibc from source at some time? If so, you need to back that out and do a yum reinstall on all of the glibc packages.
I have no idea what state your system is in so it’s hard to advise. If this is a virtual machine or a Docker container, I suggest you delete it and start over. Otherwise… Did you in fact compile and install your own glibc? If so, what prefix did you install it to? /usr, /usr/local, somewhere else? If you installed it to /usr over the 2.17 installation, don’t remove it or your system may become unusable, just do the yum reinstall for the glibc 2.17 packages. If you installed it to /usr/local, you need to remove all traces of it from there. If you still have the glibc source directory where you built it from, you can do a make uninstall there and it should remove all traces of it from whatever directory you specified for --prefix and/or --libdir when you ran ./configure. If you look at the end of config.log you can confirm what libdir and prefix were set to.
@gjoseph thank you for detailed explanation.
For now I’m able to install it using t
Tucny
I have added tucny repo in yum. And one by one I enabled them. And finally I did
Yum install asterisk
So far asterisk 19 was successfully installed.
I really appreciate your effort.
Also I am working on physical computer. I will update you after trying the solution.