Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65195 - Compiling Asterisk-1.0.0 fails on chan_phone
Summary: Compiling Asterisk-1.0.0 fails on chan_phone
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Knoblich (RETIRED)
URL:
Whiteboard:
Keywords:
: 77180 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-24 06:16 UTC by Stefan de Konink
Modified: 2005-01-17 04:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan de Konink 2004-09-24 06:16:30 UTC
Chan_phone fails to compile with Asterisk-1.0.0 / Linux 2.6.8-gentoo-r4

Reproducible: Always
Steps to Reproduce:
1. emerge asterisk

Actual Results:  
gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i686    
-DASTERISK_VERSION=\"1.0.0\" -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/etc/asterisk\"
-DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\"
-DASTVARRUNDIR=\"/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\"
-DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc/asterisk/asterisk.conf\"
-DASTMODDIR=\"/usr/lib/asterisk/modules\"
-DASTAGIDIR=\"/var/lib/asterisk/agi-bin\"     -DBUSYDETECT_MARTIN     
-Wno-missing-prototypes -Wno-missing-declarations   -DZAPATA_PRI      -DCRYPTO
-fPIC    -c -o chan_phone.o chan_phone.c
In file included from chan_phone.c:36:
/usr/include/linux/ixjuser.h:353: error: parse error before '*' token
make[1]: *** [chan_phone.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/channels'
make: *** [subdirs] Error 1


Expected Results:  
A new build Asterisk

Running kernel 2.6.8-gentoo-r4
Comment 1 Stefan Knoblich (RETIRED) gentoo-dev 2004-09-24 12:51:39 UTC
this is not an asterisk bug,

which version of linux-headers is installed?
Comment 2 Stefan de Konink 2004-09-24 13:44:28 UTC
sys-kernel/linux26-headers-2.6.8.1 and compiling with sys-devel/gcc-3.4.2-r2

typedef struct {
        int elements_used;
        IXJ_CADENCE_TERM termination;
        IXJ_CADENCE_ELEMENT __user *ce;
} IXJ_CADENCE;

I presume the __user is the issue here, could that be a missing include?
Comment 3 Disaster 2004-09-29 08:26:47 UTC
same kernel headers (sys-kernel/linux26-headers-2.6.8.1), same gcc (sys-devel/gcc-3.4.2-r2  -bootstrap* -build -debug -f77 -gcj +gtk -hardened -n32 -n64 +nls -nomultilib -objc -static (-uclibc)), same kernel (sys-kernel/gentoo-dev-sources-2.6.8-r4  -build -doc -ultra1) and same error!

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i686   -DZAPTEL_OPTIMIZATIONS  -DASTERISK_VERSION=\"1.0.0\" -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi-bin\"     -DBUSYDETECT_MARTIN      -Wno-missing-prototypes -Wno-missing-declarations   -DZAPATA_PRI   -DIAX_TRUNKING   -DCRYPTO -fPIC    -c -o chan_phone.o chan_phone.c
In file included from chan_phone.c:36:
/usr/include/linux/ixjuser.h:353: error: parse error before '*' token
make[1]: *** [chan_phone.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/channels'
make: *** [subdirs] Error 1
Comment 4 Disaster 2004-10-02 02:08:20 UTC
the solution is:
edit your line 353 in /usr/include/linux/ixjuser.h
from " IXJ_CADENCE_ELEMENT __user *ce;" to " IXJ_CADENCE_ELEMENT __user, *ce;" and  asterisk will compile

please see
http://lists.digium.com/pipermail/asterisk-users/2004-August/059263.html
Comment 5 Stefan de Konink 2004-10-02 03:49:53 UTC
Works, so now it should be fixed in the kernel I guess.
Comment 6 Jonathan Fors 2005-01-17 04:26:43 UTC
*** Bug 77180 has been marked as a duplicate of this bug. ***