[Home]

Summary:ASTERISK-12244: [patch] proper dependencies on dahdi/tonezone
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2008-06-22 07:06:30Date Closed:2008-07-07 11:44:41
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast_custom_dahdi.diff
( 1) custom_dahdi_configure.diff
( 2) custum_dahdi_configure_2.diff
( 3) dahdi-build_trunk.patch
( 4) dahdi-build.patch
Description:The move to dahdi has separated libtonezone from zaptel/dahdi . A number
of modules will fail to build if both dahdi and libtonezone will both
reside in custom pathes.

The second patch fixes the configure script to use the custom CPPFLGAS as detected in the test for dahdi when checking for tonezone.
Comments:By: Tilghman Lesher (tilghman) 2008-06-25 14:39:34

Um, this doesn't actually link anything against libtonezone.  As an experiment, I removed /usr/lib/libtonezone* and, after rerunning configure, these modules still showed up in menuselect, compiled, and linked.

By: Digium Subversion (svnbot) 2008-06-25 17:14:24

Repository: asterisk
Revision: 125132

U   branches/1.4/apps/app_rpt.c
U   branches/1.4/channels/chan_dahdi.c
U   branches/1.4/configure
U   branches/1.4/configure.ac
U   branches/1.4/include/asterisk/dahdi_compat.h
A   branches/1.4/include/asterisk/tonezone_compat.h

------------------------------------------------------------------------
r125132 | kpfleming | 2008-06-25 17:14:23 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue ASTERISK-12244)
Reported by: tzafrir


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=125132

By: Digium Subversion (svnbot) 2008-06-25 17:58:21

Repository: asterisk
Revision: 125138

_U  trunk/
U   trunk/apps/app_dahdibarge.c
U   trunk/apps/app_dahdiras.c
U   trunk/apps/app_dahdiscan.c
U   trunk/apps/app_flash.c
U   trunk/apps/app_meetme.c
U   trunk/apps/app_rpt.c
U   trunk/channels/chan_dahdi.c
U   trunk/codecs/codec_dahdi.c
U   trunk/configure
U   trunk/configure.ac
D   trunk/include/asterisk/dahdi.h
U   trunk/main/Makefile
U   trunk/main/asterisk.c
U   trunk/main/channel.c
U   trunk/res/res_musiconhold.c
U   trunk/res/res_timing_dahdi.c

------------------------------------------------------------------------
r125138 | kpfleming | 2008-06-25 17:58:20 -0500 (Wed, 25 Jun 2008) | 18 lines

Merged revisions 125132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125132 | kpfleming | 2008-06-25 17:21:30 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue ASTERISK-12244)
Reported by: tzafrir


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=125138

By: Digium Subversion (svnbot) 2008-06-25 18:13:23

Repository: asterisk
Revision: 125146

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_dahdiras.c
U   branches/1.6.0/apps/app_dahdiscan.c
U   branches/1.6.0/apps/app_flash.c
U   branches/1.6.0/apps/app_meetme.c
U   branches/1.6.0/apps/app_rpt.c
U   branches/1.6.0/channels/chan_dahdi.c
U   branches/1.6.0/channels/chan_iax2.c
U   branches/1.6.0/codecs/codec_dahdi.c
U   branches/1.6.0/configure
U   branches/1.6.0/configure.ac
D   branches/1.6.0/include/asterisk/dahdi.h
U   branches/1.6.0/main/Makefile
U   branches/1.6.0/main/asterisk.c
U   branches/1.6.0/main/channel.c
U   branches/1.6.0/res/res_musiconhold.c

------------------------------------------------------------------------
r125146 | kpfleming | 2008-06-25 18:13:22 -0500 (Wed, 25 Jun 2008) | 26 lines

Merged revisions 125138 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r125138 | kpfleming | 2008-06-25 18:05:28 -0500 (Wed, 25 Jun 2008) | 18 lines

Merged revisions 125132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125132 | kpfleming | 2008-06-25 17:21:30 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue ASTERISK-12244)
Reported by: tzafrir


........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=125146

By: Tzafrir Cohen (tzafrir) 2008-06-29 13:05:00

Half of the problems with fixed, but CFLAGS of DAHDI still don't get to all the required places.

The attached patch uses DAHDI_INCLUDE in addition to ZAPTEL_INCLUDE in main/'s Makefile.

It also sets the configure script to use CFLAGS from DAHDI when testing the build of tonezone.

Again, this is for a case where you use --with-tonezone=path and --with-dahdi=path

By: Tzafrir Cohen (tzafrir) 2008-07-02 13:56:06

Added a version of the patch vs. trunk (127434)

By: Digium Subversion (svnbot) 2008-07-03 11:05:33

Repository: asterisk
Revision: 127754

U   branches/1.4/acinclude.m4
U   branches/1.4/configure
U   branches/1.4/configure.ac
U   branches/1.4/main/Makefile

------------------------------------------------------------------------
r127754 | kpfleming | 2008-07-03 11:05:32 -0500 (Thu, 03 Jul 2008) | 8 lines

ensure that DAHDI_INCLUDE and ZAPTEL_INCLUDE are added in all the places needed

improve AST_EXT_LIB_CHECK to accept (and remember) additional CFLAGS data like it does in trunk already

(closes issue ASTERISK-12244)
Reported by: tzafrir


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=127754

By: Digium Subversion (svnbot) 2008-07-03 11:14:43

Repository: asterisk
Revision: 127767

_U  trunk/
U   trunk/acinclude.m4
U   trunk/configure
U   trunk/configure.ac

------------------------------------------------------------------------
r127767 | kpfleming | 2008-07-03 11:14:43 -0500 (Thu, 03 Jul 2008) | 2 lines

some minor fixes found while working on issue ASTERISK-12244 (and block the rev from 1.4 since the equivalent is already here)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=127767

By: Tzafrir Cohen (tzafrir) 2008-07-06 08:58:31

Reopening this one. It still gives me an error.

As this is the second time I had to reopen this issue, I thought I'd better provide a reproducable build environment:

# Run the followin g as root:

# Create a chroot with Debian Etch packages:
debootstrap --include build-essenntial,subversion etch etch-root
# chroot into it:
chroot etch-root

# The following are run in the chroot:
# check out dahdi and asterisk under /usr/src:
cd /usr/src/
svn co http://svn.digium.com/svn/dahdi/linux/trunk dahdi-linux
svn co http://svn.digium.com/svn/dahdi/tools/trunk dahdi-tools
svn co http://svn.digium.com/svn/asterisk/branches/1.4 asterisk-1.4

# prepare dahdi:
cd /usr/src/dahdi-tools
./configure --with-dahdi=../dahdi-linux
make
# fake include/dahdi under the dahdi-tools directory:
ln -s include .
ln -s dahdi .

# Try Asterisk:
cd /usr/src/asterisk-1.4
./configure --with-dahdi=../dahdi-linux --with-tonezone=../dahdi-tools

# configure yells at us:
checking for tone_zone_find in -ltonezone... yes
checking dahdi/tonezone.h usability... no
checking dahdi/tonezone.h presence... no
checking for dahdi/tonezone.h... no
configure: ***
configure: *** It appears that you do not have the tonezone development package installed.
configure: *** Please install it to include tonezone support, or re-run configure
configure: *** without explicitly specifying --with-tonezone

$ grep 'gcc .*-I' config.log | tail -n 4
configure:18623: gcc -o conftest -g -O2  -I/usr/src/asterisk-1.4/../imap-2004g/c-client  conftest.c  /usr/src/asterisk-1.4/../imap-2004g/c-client/c-client.a  >&5
configure:29002: gcc -o conftest -g -O2   conftest.c -ltonezone -L../dahdi-tools  -I../dahdi-linux/include  >&5
configure:29075: gcc -c -g -O2  -I../dahdi-tools/include  conftest.c >&5
configure:29114: gcc -E  -I../dahdi-tools/include  conftest.c

As you can see, the dahdilinux path is not included in the tests for tonezone. And naturally you get there the error that dahdi/user.h is missing.

Looking at the current configure.ac, I see that extra CFLAGS are passed in the $5 parameter of AST_EXT_LIB_CHECK . That parameter, IIRC, should only be used for libs. It should have been passed as $6, right?

By: Tzafrir Cohen (tzafrir) 2008-07-06 14:04:28

A small fix: the "fake" symlinks should be created by:

# fake include/dahdi under the dahdi-tools directory:

ln -s . include
ln -s . dahdi

and not the other way around. With that and the attached patch I manage to get configure to only fail at the missing termcap support. After installing libncurses5-dev as well, configure works fine.

By: Digium Subversion (svnbot) 2008-07-07 11:44:32

Repository: asterisk
Revision: 128637

U   branches/1.4/configure
U   branches/1.4/configure.ac

------------------------------------------------------------------------
r128637 | kpfleming | 2008-07-07 11:44:24 -0500 (Mon, 07 Jul 2008) | 9 lines

use tzafrir's patch to fix this problem properly... i made the previous set of changes without thoroughly testing them, doh!

(closes issue ASTERISK-12244)
Reported by: tzafrir
Patches:
     custum_dahdi_configure_2.diff uploaded by tzafrir (license 46)
Tested by: tzafrir


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=128637