Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 65757 - net-misc/asterisk-sccp-0.2 won't compile
Summary: net-misc/asterisk-sccp-0.2 won't compile
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: Highest major (vote)
Assignee: voip herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-28 20:00 UTC by William L. Thomson Jr. (RETIRED)
Modified: 2004-09-29 19:13 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 William L. Thomson Jr. (RETIRED) gentoo-dev 2004-09-28 20:00:06 UTC
Asterisk-sccp-0.2 won't compile. Reason is becuase asterisk sources are needed to compile asterisk-sccp. Specifically the make file in asterisk-sccp need to be modified to reflect a source of asterisk. Now either a copy needs to be kept after emerging asterisk or when you emerge asterisk-sccp a copy of the asterisks sources could be downloaded used to compile then discarded.

Basically the first line in the make file must be pointed to asterisks sources. It's possible that certain asterisk headers files or etc may need to be left in the system or the path simply added to the make file.

In asterisk-sccp make file the first line ASTERISK_SOURCE must be set or compile will fail.
Comment 1 Andrew Ross (RETIRED) gentoo-dev 2004-09-29 00:06:40 UTC
What version of asterisk do you have installed?

The headers required by asterisk-sccp are in /usr/include/asterisk and are found without problem on my system (which has asterisk-0.9.0).


Portage 2.0.51_rc6 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.9-rc2 i686)
=================================================================
System uname: 2.6.9-rc2 i686 Intel(R) Pentium(R) M processor 1.70GHz
Gentoo Base System version 1.5.3
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.14.90.0.8-r1
Headers:  sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distcc distlocks sandbox"
GENTOO_MIRRORS="ftp://mirror.pacific.net.au/gentoo http://mirror.pacific.net.au/linux/Gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X acpi alsa apache2 avi bcmath berkdb bitmap-fonts bzlib caps cdr crypt cups divx4linux doc dvd encode fam gd gdbm gif gnome gpm gtk gtk2 guile imap imlib java jikes jpeg ldap libwww mad memlimit mmx motif mozilla mpeg ncurses offensive oggvorbis opengl pam pdflib perl png python quicktime readline samba sdl slang spell sse ssl svg svga tcltk theora tiff truetype x86 xml2 xmms xprint xv zlib"
Comment 2 Stefan Knoblich (RETIRED) gentoo-dev 2004-09-29 05:22:51 UTC
@reporter: which version of asterisk? gcc,make error messages...
Comment 3 William L. Thomson Jr. (RETIRED) gentoo-dev 2004-09-29 07:47:55 UTC
At first I tried the 0.90 version of * but now I am using * v 1.0. I could not get asterisk-sccp to compile with either. I was able to compile chan_sccp by download the source, a source of 1.0 from the portage tree. Unpacking 1.0 and pointing to it in the make file allowed chan_sccp to compile just fine. I think chan_sccp is a newer modfied version or asterisk-sccp. However there is no official release of chan_sccp other than a cvs snapshot. However it seems all sccp/skinny protocols for * lack full support for the phones. I came across one fo the developers of chan_sccp and they are actively trying to get the rest of the features working on phones like Cisco 79xx series. So later it might be a good idea to either add chan_sccp or swap asterisk-sccp for it.

Either way I am still unable to compile asterisk-sccp-0.2

emerge asterisk-sccp
Calculating dependencies ...done!
>>> emerge (1 of 1) net-misc/asterisk-sccp-0.2 to /
>>> md5 src_uri ;-) chan_sccp-0.2.tar.gz
>>> Unpacking source...
>>> Unpacking chan_sccp-0.2.tar.gz to /usr/portage/tmp/portage/asterisk-sccp-0.2 /work
 * Applying asterisk-sccp-0.2-makefile.diff...                            [ ok ]
>>> Source unpacked.
Now compiling .... chan_sccp.c           chan lines
chan_sccp.c:46: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_sccp.c:47: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_sccp.c:48: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_sccp.c:49: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_sccp.c:50: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_sccp.c:51: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_sccp.c:55: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_sccp.c: In function `reload_config':
chan_sccp.c:325: warning: assignment makes pointer from integer without a cast
make: *** [.tmp/chan_sccp.o] Error 1

!!! ERROR: net-misc/asterisk-sccp-0.2 failed.
!!! Function src_compile, Line 36, Exitcode 2
!!! (no error message)

You can see pretty quickly it fails since it does not know where any of the hearder files it needs for * are? I do have the needed headers in /usr/include/asterisk but asterisk-sccp-0.2 can't find them and looking at it's make file it's not wonder.

cd /usr/portage/tmp/portage/asterisk-sccp-0.2/work/chan
nano makefile

ASTERISK_SOURCE=/usr

So it needs to be

ASTERISK_SOURCE=/usr/include/asterisk

Then I bet it will compile in my system. Not sure if there is a library path that it needs to be added to or what? Or how others were able to compile it. If possible recompile it and see if any changes are made to the Makefile.
Comment 4 Stefan Knoblich (RETIRED) gentoo-dev 2004-09-29 11:20:08 UTC
> At first I tried the 0.90 version of * but now I am using * v 1.0. I could 
> not get asterisk-sccp to compile with either.

asterisk-0.9.0 + asterisk-sccp-0.2 (which is chan_sccp-0.2 from
http://www.crazygreek.co.uk/content/sccp) compiles fine here...

> I was able to compile chan_sccp by download the source, a source of 1.0 from > the portage tree. Unpacking 1.0 and pointing to it in the make file allowed 
> chan_sccp to compile just fine. However there is no official release of 
> chan_sccp other than a cvs snapshot. 

so you're not talking about the "original" chan_sccp...

> However it seems all sccp/skinny 
> protocols for * lack full support for the phones. I came across one fo the 
> developers of chan_sccp and they are actively trying to get the rest of the 
> features working on phones like Cisco 79xx series. So later it might be a 
> good idea to either add chan_sccp or swap asterisk-sccp for it.

If it works better, it will be used.

> Now compiling .... chan_sccp.c           chan lines
> chan_sccp.c:46: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
[snip]
> chan_sccp.c: In function `reload_config':
> chan_sccp.c:325: warning: assignment makes pointer from integer without a cast
> make: *** [.tmp/chan_sccp.o] Error 1

> You can see pretty quickly it fails since it does not know where any of the 
> hearder files it needs for * are? I do have the needed headers 
> in /usr/include/asterisk but asterisk-sccp-0.2 can't find them and looking at 
> it's make file it's not wonder.

That's a "somebody uses a function which isn't declared"-error, missing header
files look like this:

 In file included from chan_sccp.c:2:
chan_sccp.h:15:28: asterisk/frame.h: No such file or directory

Your output is from asterisk-1.0.0 and modules for older versions may
not work with newer ones.

> cd /usr/portage/tmp/portage/asterisk-sccp-0.2/work/chan
>nano makefile
>
>ASTERISK_SOURCE=/usr
>
>So it needs to be
>
>ASTERISK_SOURCE=/usr/include/asterisk
>

You could even set it to /dev/null and it would still compile with 0.9.0 ...
ASTERISK_SOURCE is only used for setting the include path (with gcc's -I option),
which in our case is actually unnecessary because -I/usr/include ist set and all .c files use e.g. #include <asterisk/pbx.h>

> Then I bet it will compile in my system. Not sure if there is a library path 
> that it needs to be added to or what? Or how others were able to compile it. > If possible recompile it and see if any changes are made to the Makefile.

Tested on two systems, portage tree from 20040929 @20:09 CEST

output of ebuild asterisk-sccp-0.2 compile (w/ asterisk-0.9.0 installed):

>>> Unpacking chan_sccp-0.2.tar.gz to /var/tmp/portage/asterisk-sccp-0.2/work
 * Applying asterisk-sccp-0.2-makefile.diff...                                                                                                                 [ ok ]
>>> Source unpacked.
Now compiling .... sccp_actions.c        sccp lines
Now compiling .... chan_sccp.c           chan lines
Now compiling .... sccp_channel.c        sccp lines
Now compiling .... sccp_device.c         sccp lines
Now compiling .... sccp_line.c          sccp_ lines
Now compiling .... sccp_helper.c        sccp_ lines
Now compiling .... sccp_pbx.c            sccp lines
Now compiling .... sccp_cli.c            sccp lines
Now compiling .... sccp_softkeys.c      sccp_ lines
Now compiling .... sccp_sched.c         sccp_ lines
Now compiling .... sccp_socket.c         sccp lines
Linking chan_sccp.so


laptop asterisk-sccp # emerge info
Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.8.1)
=================================================================
System uname: 2.6.8.1 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System version 1.5.3
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -ftracer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -ftracer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache cvs sandbox"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa apm audiofile avi berkdb bitmap-fonts cdr crypt cups dga encode flac foomaticdb gdbm gif gphoto2 gpm gtk gtk2 imap imlib jpeg ldap libg++ libwww linguas_de mad maildir mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pcmcia pdflib perl png postgres python quicktime readline sdl slang speex spell sse sse2 ssl tcltk tcpd tiff truetype wifi x86 xml2 xmms xprint xv zlib"

Comment 5 William L. Thomson Jr. (RETIRED) gentoo-dev 2004-09-29 19:13:32 UTC
Must be something in the env not set or something cause it not to compile for me?

> so you're not talking about the "original" chan_sccp...

I am not sure I am new to all of this. It seems to be based on the one from 

http://zozo.org.uk/content/sccp

I am using
http://chan-sccp.sourceforge.net/

Not sure there relation to
http://www.crazygreek.co.uk/content/sccp

> If it works better, it will be used.

Supposedly it's the one with the greatest feature support for Cisco 79xx phones. Not to mention being actively developed and maintained. I have been in contact with 

Julien Goodwin <jgoodwin@studio442.com.au>

who is a devloper on the project. I hopefully will be assiting in getting full or close to full feature support for at least the 7910's since it's what I am using.

Not sure what features the others have or do not that this one does. I am assuming this one to be based on the others?

> Tested on two systems, portage tree from 20040929 @20:09 CEST

Something must be wrong with my machine then? Guess I should close the bug as resolved or non-existent in the first place.

Do you want me to experiment further? Emerge a diff version of * and see if I can compile. etc.

It's pretty much a mood issue since I am pretty sure I will be using 
http://chan-sccp.sourceforge.net/