[Home]

Summary:ASTERISK-15232: [patch] configure fails to detect spandsp/expose.h when not in system include path
Reporter:Ben Klang (bklang)Labels:
Date Opened:2009-11-28 17:04:58.000-0600Date Closed:2011-07-26 14:33:09
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20091129__issue16342.diff.txt
Description:configure has a flag to specify the path to spandsp, if it is not installed into the system default path.  This works well for most of the spandsp checks (such as spandsp.h), however it fails to properly detect the spandsp/expose.h header.  This is partly due to the fact that the autoconf check is different (AC_CHECK_HEADER vs. AST_EXT_LIB_CHECK) and so does not inherit the proper CFLAGS.
Comments:By: Ben Klang (bklang) 2009-12-04 15:56:58.000-0600

This patch does not appear to work.  Here is what ./configure said:

./configure --prefix=/opt/asterisk --with-spandsp=/opt/spandsp --with-ldap
<snip output>
checking for mandatory modules:  LDAP SPANDSP SPANDSP_EXPOSE_H... fail

configure: ***
configure: *** The SPANDSP_EXPOSE_H installation appears to be missing or broken.
configure: *** Either correct the installation, or run configure
configure: *** including --without-spandsp.

By: Ben Klang (bklang) 2009-12-08 09:20:21.000-0600

Some more information on this:
configure does not find the spandsp/expose.h header because it is still not using the include path provided by --with-spandsp.  Snip from config.log:
configure:29802: checking spandsp/expose.h usability
configure:29819: gcc -c -g -O2    conftest.c >&5
conftest.c:238:28: spandsp/expose.h: No such file or directory
configure:29825: $? = 1
configure: failed program was:
<snip many lines of defines>
| #include <spandsp/expose.h>
configure:29839: result: no
configure:29843: checking spandsp/expose.h presence
configure:29858: gcc -E    conftest.c
conftest.c:205:28: spandsp/expose.h: No such file or directory

Also: I believe that for spandsp/expose.h to be included, you will first need to include spandsp.h, which does not currently happen in conftest.c

By: Sean Bright (seanbright) 2010-01-14 16:55:53.000-0600

bklang:

After applying the patch, did you regenerate configure by running ./bootstrap in the Asterisk source directory?

By: Ben Klang (bklang) 2010-01-14 17:27:43.000-0600

seanbright: Yes, I did regenerate configure.  The behavior and error messages also changed after the patch was applied and the new configure ran.

By: Ben Klang (bklang) 2010-06-24 10:15:09

I saw this ticket was listed in the recent post on the Asterisk-Users mailing list as one that is Ready For Testing.  I just tried the patch again, against the latest 1.6.2 SVN checkout, and it still does not work:

./configure --prefix=/opt/asterisk --with-spandsp=/opt/spandsp
<snip output>
checking for minimum version of SpanDSP... yes
checking for span_set_message_handler in -lspandsp... yes
checking spandsp.h usability... yes
checking spandsp.h presence... yes
checking for spandsp.h... yes
checking for t38_terminal_init in -lspandsp... yes
checking for spandsp.h... (cached) yes
checking spandsp/expose.h usability... no
checking spandsp/expose.h presence... no
checking for spandsp/expose.h... no
<snip more>
checking for mandatory modules:  SPANDSP SPANDSP_EXPOSE_H... fail

configure: ***
configure: *** The SPANDSP_EXPOSE_H installation appears to be missing or broken.
configure: *** Either correct the installation, or run configure
configure: *** including --without-spandsp.

By: Ben Klang (bklang) 2010-06-24 10:17:15

And from config.log:



configure:32071: checking spandsp.h presence
configure:32086: gcc -E  -I/opt/spandsp/include  conftest.c
configure:32092: $? = 0
configure:32106: result: yes
configure:32139: checking for spandsp.h
configure:32146: result: yes
configure:32199: checking for t38_terminal_init in -lspandsp
configure:32234: gcc -o conftest -g -O2    conftest.c -lspandsp -L/opt/spandsp/lib -ltiff -lnsl -lm  >&5
configure:32240: $? = 0
configure:32259: result: yes
configure:32284: checking for spandsp.h
configure:32289: result: yes
configure:32554: checking spandsp/expose.h usability
configure:32571: gcc -c -g -O2    conftest.c >&5
conftest.c:246:28: spandsp/expose.h: No such file or directory

By: Paul Belanger (pabelanger) 2010-06-24 13:39:31

demoted as patch was reported not to work.

By: Ben Klang (bklang) 2011-02-06 11:18:29.000-0600

This is no longer an issue as of Asterisk 1.8.  Request close.