Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66557 - asterisk-1.0.0 doesn't compile useing uclibc
Summary: asterisk-1.0.0 doesn't compile useing uclibc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Knoblich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-06 12:07 UTC by REdOG
Modified: 2004-10-31 06:20 UTC (History)
1 user (show)

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


Attachments
Patch for asterisk-1.0.0 to build with uclibc (asterisk_uclibc_patch.diff,1.55 KB, patch)
2004-10-06 12:21 UTC, REdOG
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description REdOG 2004-10-06 12:07:16 UTC
The asterisk devs seem to think that this is caused by uclibc setting res_ninit somewhere. If thats true I haven't found where. 

Reproducible: Always
Steps to Reproduce:
1. use the uclibc profile 
2. unmask asterisk-1.0.0
3. emerge asterisk

Actual Results:  
gcc -g  -o asterisk -Wl,-E  io.o sched.o logger.o frame.o loader.o config.o
channel.o translate.o file.o say.o pbx.o cli.o md5.o term.o ulaw.o alaw.o
callerid.o fskmodem.o image.o app.o cdr.o tdd.o acl.o rtp.o manager.o asterisk.o
ast_expr.o dsp.o chanvars.o indications.o autoservice.o db.o privacy.o astmm.o
enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o utils.o  editline/libedit.a
db1-ast/libdb1.a stdtime/libtime.a -ldl -lpthread -lncurses -lm -lresolv   -lssl
dns.o(.text+0x2a): In function `ast_search_dns':
/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:174: undefined
reference to `res_ninit'
dns.o(.text+0x51):/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:175:
undefined reference to `res_nsearch'
dns.o(.text+0x91):/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:194:
undefined reference to `res_nclose'
collect2: ld returned 1 exit status
make: *** [asterisk] Error 1

!!! ERROR: net-misc/asterisk-1.0.0 failed.
!!! Function src_compile, Line 63, Exitcode 2
!!! Make failed


Expected Results:  
tiny shiny asterisk
Comment 1 REdOG 2004-10-06 12:21:30 UTC
Created attachment 41244 [details, diff]
Patch for asterisk-1.0.0 to build with uclibc

Works for me, the asterisk devs told me that this should only affect name
lookups and shouldn't cause problems as long as you configure asterisk with ip
address' and not dns or hostnames.
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-16 09:32:26 UTC
it has also some other compileerrors: 

[..]
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 `/vol1/gentoo/build/portage/asterisk-1.0.0/work/asterisk-1.0.0/channels'
make: *** [subdirs] Error 1

!!! ERROR: net-misc/asterisk-1.0.0 failed.
!!! Function src_compile, Line 63, Exitcode 2
!!! Make failed
!!! If you need support, post the topmost build error, NOT this status message.


here my emerge info:
  Resolve bug, mark it as duplicate of bug #  
  Reassign bug to  
  Reassign bug to owner of selected component 
   

View Bug Activity   |   Format For Printing 


Description: 
Opened: 2004-10-06 12:07 PST 

 
The asterisk devs seem to think that this is caused by uclibc setting res_ninit somewhere. If thats true I haven't found where. 

Reproducible: Always
Steps to Reproduce:
1. use the uclibc profile 
2. unmask asterisk-1.0.0
3. emerge asterisk

Actual Results:  
gcc -g  -o asterisk -Wl,-E  io.o sched.o logger.o frame.o loader.o config.o
channel.o translate.o file.o say.o pbx.o cli.o md5.o term.o ulaw.o alaw.o
callerid.o fskmodem.o image.o app.o cdr.o tdd.o acl.o rtp.o manager.o asterisk.o
ast_expr.o dsp.o chanvars.o indications.o autoservice.o db.o privacy.o astmm.o
enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o utils.o  editline/libedit.a
db1-ast/libdb1.a stdtime/libtime.a -ldl -lpthread -lncurses -lm -lresolv   -lssl
dns.o(.text+0x2a): In function `ast_search_dns':
/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:174: undefined
reference to `res_ninit'
dns.o(.text+0x51):/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:175:
undefined reference to `res_nsearch'
dns.o(.text+0x91):/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:194:
undefined reference to `res_nclose'
collect2: ld returned 1 exit status
make: *** [asterisk] Error 1

!!! ERROR: net-misc/asterisk-1.0.0 failed.
!!! Function src_compile, Line 63, Exitcode 2
!!! Make failed
!!! If you need support, post the topmost build error, NOT this status message.


my "emerge info":

Gentoo Base System version 1.5.3
Portage 2.0.51_rc9 (!/usr/portage/profiles/default-x86-2004.0, gcc-3.4.2, glibc-2.3.4.20041006-r0, 2.6.8-gentoo-r9 i686)
=================================================================
System uname: 2.6.8-gentoo-r9 i686 Intel(R) Celeron(TM) CPU                1300MHz
distcc 2.18 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -mmmx -msse -mfpmath=sse -O3 -pipe -fomit-frame-pointer -ffast-math"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/mail/dspam /etc/mail/dspam/config /etc/rc.d /etc/terminfo /etc/wget /etc/env.d"
CXXFLAGS="-march=pentium3 -mmmx -msse -mfpmath=sse -O3 -pipe -fomit-frame-pointer -ffast-math"
DISTDIR="/mnt/gentoo/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox"
GENTOO_MIRRORS="http://ftp.linux.ee/pub/gentoo/distfiles/"
MAKEOPTS="-j3"
PKGDIR="/mnt/gentoo/usr/portage/packages"
PORTAGE_TMPDIR="/vol1/gentoo/build"
PORTDIR="/mnt/gentoo/usr/portage"
PORTDIR_OVERLAY="/mnt/gentoo/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X X509 aac aalib accounting acl acpi adns alsa amd apache2 apm arts artswrappersuid asterisk async audiofile avi bcmath berkdb bidi bitmap-fonts bzlib cairo calendar caps cdb cddb cdf cdparanoia cdr cdrom chasen chroot cjk clamav codecs cpdflib crypt ctype cups curl curlwrappers cyrus dba dbase dbx dga dio directfb distcache djbfft dmx dnd droproot dts dv dvd dvdr dvdread edl encode erandom esd exif expat ext-png ext-zlib extensions f77 faac faad fam fastcgi fax fbcon fdftk ffmpeg fftw filepro flac flash flatfile foomaticdb foreign-package foreign-sysvinit freetype frlargefiles ftp ftruncate gcj gd gd-external geoip gettext ggi gif gimp gimpprint glade glut gmp gnuplot gphoto2 gpm graphviz gs gsm gstreamer gtk gtk2 gtkhtml gui guile i8x0 iconv icq idea ieee1394 image imagemagick imap imlib imlib2 inifile innodb intl ipv6 ipv6arpa irda irmc ithreads jack jack-tmpfs java javascript jbig jce jikes jit joystick jp2 jpeg jpeg2k kde ladcca lcms ldap libcaca libg++ libsamplerate libwww lirc live lmtp lzo lzw lzw-tiff mad maildir makecheck matroska mbcvs mbox mcal md5sum mecab memlimit mhash mikmod mime ming mmap mmx mmx2 mng monkey motif mozcalendar mozdomi mozilla moznoxft mozp3p mozsvg mozxmlterm mp3 mpeg mpeg4 mplayer msdav msn mysql native ncurses net netcdf network nis nls no_wxgtk1 nojython nozaptel nptl nptlonly ntlm objc odbc offensive oggvorbis ooo-kde openal opengl oscar oss pam parse-clocks pcap pcntl pcre pdf pdflib pear-db perl php physfs pic pie plotutils png posix ppds print procmail pthreads python qdbm qt quicktime readline rtc ruby samba sasl scanner sdl serial session shaper shared simplexml slang slp sms sndfile soap sockets socks5 softquota soundtouch sox spamassassin speedo speex spell spl sqlite sse ssl subject-rewrite svg svga sysvipc szip t1lib tcltk tetex tga theora threads tidy tiff timidity tokenizer transcode truetype type1 unicode usagi usb userlocales uudeview v4l v4l2 vcdimager vda virus-scan vnc wddx wifi wmf wxwindows x86 xbase xerces xface xine xinerama xml xml2 xmlrpc xmms xosd xpm xprint xrandr xsl xv xvid xvmc yahoo yv12 zlib zvbi video_cards_i810 linguas_de"



emerge -pv asterisk

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] net-misc/asterisk-1.0.0  +alsa +apache2 +doc +gtk +mmx +mysql -nopri +nozaptel 0 kB

Total size of downloads: 0 kB
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-16 09:34:38 UTC
ups. shitty clipboard. ;-)

cut out the part from "here my emerge info:" and "NOT this status message"
Comment 4 Stefan Knoblich (RETIRED) gentoo-dev 2004-10-24 09:25:56 UTC
will be included in 1.0.1
Comment 5 Stefan Knoblich (RETIRED) gentoo-dev 2004-10-29 16:51:04 UTC
1.0.1 is out
Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-30 11:14:26 UTC
but still not in portage!
Comment 7 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-30 11:15:06 UTC
disclaimer: ;-)
Comment 8 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-30 11:16:34 UTC
oh, btw:

don't forget to fix this: 

DEPEND="virtual/libc
        media-sound/mpg123

should be "virtual/mpg123"
Comment 9 Ray Russell Reese III (RETIRED) gentoo-dev 2004-10-30 13:45:11 UTC
Actually, as far as I know, according to asterisk it only works with mpg123, not mpg321 or any other varients. 
Comment 10 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-30 16:26:25 UTC
> Actually, as far as I know, according to asterisk it only 
> works with mpg123, not mpg321 or any other varients. 

strange. Since mpg321 copies 1:1 the commadline interface. I'm not sure, for what Asterisk needs mpg123, but I think, it's for decoding MP3s. Beside the fact, that libmad would be better for this job, if Asterisk calls mpg321 via the mpg123 symlink, it should just work. The main intension of mpg321 was a drop-in replacement for mpg123. 

But I think, I will check the source to get more informations. Perhaps it is easily patched to work properly with mpg321.
Comment 11 Stefan Knoblich (RETIRED) gentoo-dev 2004-10-31 05:24:33 UTC
> strange. Since mpg321 copies 1:1 the commadline interface.

yeah but it's missing some important options: -m (mixing both channels for mono-output) and -r (force samplerate)

> I'm not sure, for what Asterisk needs mpg123, but I think, it's for decoding > MP3s.

music-on-hold

> Beside the fact, that libmad would be better for this job, if Asterisk calls > mpg321 via the mpg123 symlink, it should just work.

won't work

> The main intension of
> mpg321 was a drop-in replacement for mpg123. 

for playing your mp3 collection on a soundcard: yes
if you want to use mpg321 as a replacement for asterisk, you'll need to
convert mpg321's output to 8KHz mono format
Comment 12 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-31 06:20:47 UTC
> yeah but it's missing some important options: 

aha. So we should tell Mr. mpg321 to include these options as well. ;-)

> if you want to use mpg321 as a replacement for asterisk, 
> you'll need to convert mpg321's output to 8KHz mono format

easy task. But then the pathname of "mpg123" should be configurable. A little shellscript do the job. Nonetheless, the use of libmad/libsamplerate would be the best solution, since no external binary has to executed. But this has to be done upstream.