Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262817 - net-misc/asterisk-1.2.31.1: fails to build with USE=bri (libpri/bristuff related)
Summary: net-misc/asterisk-1.2.31.1: fails to build with USE=bri (libpri/bristuff rela...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
: 263102 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-17 17:45 UTC by Jan Seiffert
Modified: 2009-04-03 15:50 UTC (History)
3 users (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 Jan Seiffert 2009-03-17 17:45:32 UTC
if i try to update my asterisk, it fails with:

i686-pc-linux-gnu-gcc -c -march=athlon64-sse3 -Os -fomit-frame-pointer --param max-gcse-passes=2 -pipe  -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -march=athlon64-sse3 -Os -fomit-frame-pointer --param max-gcse-passes=2 -pipe -DZAPTEL_OPTIMIZATIONS         -fomit-frame-pointer  -Wno-missing-prototypes -Wno-missing-declarations -DZAPATA_PRI -DZAPATA_DEVICE_STATES -DIAX_TRUNKING -DCRYPTO -fPIC  -o chan_zap.o chan_zap.c                                                                                                           
distcc[11239] ERROR: compile /var/tmp/ccache/chan_zap.tmp.marvin.11235.i on localhost failed                                                             
chan_zap.c: In function 'pri_dchannel':                                                                                                                  
chan_zap.c:10243: error: 'pri_event_answer' has no member named 'network_time'                                                                           
chan_zap.c:10245: error: 'pri_event_answer' has no member named 'network_time'                                                                           
chan_zap.c:10245: error: 'pri_event_answer' has no member named 'network_time'                                                                           
chan_zap.c:10245: error: 'pri_event_answer' has no member named 'network_time'                                                                           
chan_zap.c:10245: error: 'pri_event_answer' has no member named 'network_time'                                                                           
chan_zap.c:10245: error: 'pri_event_answer' has no member named 'network_time'                                                                           
make[1]: *** [chan_zap.o] Error 1                                                                                                                        
make[1]: Leaving directory `/var/tmp/portage/net-misc/asterisk-1.2.31.1/work/asterisk-1.2.31.1/channels'                                                 
make: *** [subdirs] Error 1
[ blabla portage output that things gone wrong ]

Reproducible: Always

Steps to Reproduce:
1. remove "pri" from your USE-flags
2. echo "net-libs/libpri bri" >> /etc/portage/package.use
2. echo "net-misc/asterisk bri" >> /etc/portage/package.use
3. emerge --newuse -D asterisk

Actual Results:  
compile failure (as above)

Expected Results:  
successful compile

The problem is the stable version of net-libs/libpri is patched with an older version of bristuff than the new stable asterisk (net-libs/libpri-1.2.5: bristuff-0.3.0-PRE-1y-h net-misc/asterisk-1.2.31.1: bristuff-0.3.0-PRE-1y-w).

The newer bristuff in asterisk tries to access fields in the struct pri_event from libpri which are not present (added by) in the older bristuff patch.

Solution:
sed -e 's/BRI_VERSION="0.3.0-PRE-1y-h"/BRI_VERSION="0.3.0-PRE-1y-w"/' net-libs/libpri-1.2.5.ebuild > net-libs/libpri-1.2.5-r1.ebuild
Comment 1 Jan Seiffert 2009-03-19 17:53:25 UTC
Ups, my initial solution from the first comment does not work.
The libpri patch from bristuff-0.3.0-PRE-1y-w does not apply cleanly to libpri-1.2.5.

After manual checking i found out:
- All but one failing hunk fail on copyright notices
- unfortunatly some of those hunks also contain code changes
- one "real" change can not be applied because the code looks totaly different (and maybe also addresses the problem which this change tried to address)

So a fixed up patch is needed. I have one by simply dropping the copyright changes, but i don't know if this would be OK.

Greetings
Jan
Comment 2 Gianni Bracali 2009-03-19 22:38:42 UTC
Same problem here.
Unmerging libpri makes asterisk compile succefully..



Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.5-r4, 2.6.20-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.20-gentoo-r8-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-glibc2.2.5
Timestamp of tree: Thu, 19 Mar 2009 21:30:16 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -fomit-frame-pointer -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -fomit-frame-pointer -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.cambrium.nl/pub/os/linux/gentoo/ http://mirror.cambrium.nl/pub/os/linux/gentoo/ http://91.121.125.139/gentoo-distfiles/ http://91.121.124.139/gentoo-distfiles/ ftp://gentoo.imj.fr/pub/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="it en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 arts berkdb bzip2 cdr cli cracklib crypt cups dri dv dvd encode fortran gdbm gpm hal iconv ieee1394 ipv6 isdnlog kde midi mmx mp3 mudflap multilib ncurses nls nptl nptlonly nvidia opengl openmp pam pcre perl pppd python qt3 qt4 readline reflection samba session spl sse sse2 ssl sysfs tcpd unicode xine xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Tony Vroon (RETIRED) gentoo-dev 2009-03-20 16:12:31 UTC
Please note that I have no hardware to test BRI. I can try to port the patch if I can have testers on IRC next week. Are you willing to make that commitment?
Comment 4 Gianni Bracali 2009-03-20 16:40:50 UTC
(In reply to comment #3)
> Please note that I have no hardware to test BRI. I can try to port the patch if
> I can have testers on IRC next week. Are you willing to make that commitment?
> 

Sorry, no BRI hardware on my systems.
Tried to install bristuff to get app_devstate ...

Maybe Jan can help?

Thanks,
Gianni
Comment 5 Jan Seiffert 2009-03-20 17:13:14 UTC
Yes i have bri/zaptel hardware which worked with asterisk 1.2.27, but no fancy config besides the asterisk sample config (which should be enough to test basic bri and zaptel is working), wanted to config that for month, but asterisk is ... complicated.

Porting the patch from bristuff-0.3.0-PRE-1y-w should be easy, as said, all but one problem are clashing Copyright notices. And the one real patch problem can be fixes by dropping the hunk IMHO.

After that i ran into another compile problem, because "epatch" does not cleanly apply the bristuff patches to asterisk (patches which only create a new file do not create the file), but i leave this to the ebuild maintainer, i fixed it here by exchanging "epatch" with a plain "patch", but maybe a local problem.

greetings
Jan
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-21 00:05:21 UTC
*** Bug 263102 has been marked as a duplicate of this bug. ***
Comment 7 Tony Vroon (RETIRED) gentoo-dev 2009-04-03 15:50:33 UTC
Security bug #237476 means that 1.2.31.1 will be disappearing soon as it is vulnerable. As BRIstuff broke horribly on 1.2.32 the bri USE-flag has been dropped. It does not help that this patchset is not upstream and that I have no hardware to test.
If you can make it work with 1.2.32, please file me a new bug with patches attached. I'm sorry, but I don't have the motivation to fix a broken patchset that drives hardware that I can not test on.