Summary:ASTERISK-21760: Asterisk autoconf script does not check for pkg-config as a dependency
Reporter:Olivier Krief (okrief)Labels:
Date Opened:2013-05-07 04:37:09Date Closed:2013-06-05 17:56:36
Versions:11.3.0 Frequency of
Environment:Debian SqueezeAttachments:( 0) configure
( 1) configure.log
Description:On a fresh Debian Squeeze system, run:
{{apt-get update}}
{{apt-get upgrade}}
{{apt-get install gcc g++ make libncurses5-dev bison libssl-dev libnewt-dev zlib1g-dev libxml2-dev libsqlite3-dev libmemcached-dev autoconf}}
{{cd /usr/src}}
{{wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11.3.0.tar.gz}}
{{tar zxf asterisk-11.3.0.tar.gz}}
{{sh -x ./bootstrap.sh}}
The last command fails with:
checking for gsm_create in -lgsm... no
./configure: line 17928: syntax error near unexpected token `ILBC,'
./configure: line 17928: `      PKG_CHECK_MODULES(ILBC, libilbc,'
Comments:By: Rusty Newton (rnewton) 2013-05-20 14:36:36.256-0500

Please attach (More Actions > Attach Files) the resulting *configure* script and we'll take a look.

By: Olivier Krief (okrief) 2013-05-21 10:29:30.168-0500

Here is the output of sh -x ./configure | tee configure.log and the configure file itself (as generated by bootstrap.sh from Asterisk 11.4.0 (same symptoms as 11.3.0)).

By: Rusty Newton (rnewton) 2013-05-30 15:25:58.740-0500

Can you verify whether the pkg-config package is installed on your system? From my Googling, it looks like pkg-config provides PKG_CHECK_MODULES and either your configure script or Autotools can't find it.

By: Olivier Krief (okrief) 2013-05-31 09:21:49.932-0500

I typed :
{{apt-get install pkg-config}}
{{cd /usr/src/asterisk-11.4.0}}
.. and last command ran successfully !
Thanks for finding this !

Is it possible for bootstap.sh to check the presence of the very one missing tool(s) it needed from pkg-config ?

By: Rusty Newton (rnewton) 2013-06-05 17:56:36.243-0500

bq. Is it possible for bootstap.sh to check the presence of the very one missing tool(s) it needed from pkg-config ?

Likely, but I'm not sure. That'll be an improvement request and not a bug fix. You might bring it up on the asterisk-dev mailing list and if someone produces a patch we can re-open this issue.

If anyone gets a patch then just comment on the issue or ping a bug marshal in #asterisk-bugs.

Until then I'll close this out. Glad you got it working!

By: Alexander Traud (traud) 2018-05-04 09:05:49.156-0500

[~okrief], thanks for reporting this. It is a bug for sure because the error message is not descriptive. I stumbled about the same issue and commented about this in ASTERISK-27555: {{pkg-config}} is now part of of the installation script for the prerequisites {{contrib/scripts/install_prereq}}. This is not a resolution to this bug here but makes this issue more unlikely. By the way: You have to go for {{./bootstrap.sh}} (and install {{autoconf}}) only when you edit/patch the file {{configure.ac}}.