Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 118120

Summary: net-misc/asterisk-app_rtxfax-0.0.2_pre20 fails to compile
Product: Gentoo Linux Reporter: Rob Terhaar <rterhaar>
Component: Current packagesAssignee: voip herd (OBSOLETE) <voip+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: chris, jesse, stkn
Priority: High    
Version: 2005.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for ebuild
file to add in files directory
updated ebuild
patch that goes along with updated ebuild

Description Rob Terhaar 2006-01-06 17:12:10 UTC
I'm not sure if it's ppc related, i don't have access to an x86 asterisk server here at the office. I'll test it out on my asterisk machine at home later on...

installing version: 
net-misc/asterisk-app_rtxfax-0.0.2_pre20


here's my emerge log:

>>> Source unpacked.
make -C asterisk-1.1.x all
make[1]: Entering directory `/var/tmp/portage/asterisk-app_rtxfax-0.0.2_pre20/work/app_rtxfax-0.0.2_p            re20/asterisk-1.1.x'
cc -O2 -mtune=powerpc -pipe -fomit-frame-pointer -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes             -Wmissing-declarations -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE -O2 -mtune=powerpc -pipe -f            omit-frame-pointer -DZAPTEL_OPTIMIZATIONS -fomit-frame-pointer -shared -Xlinker -x -fPIC -o app_rxfax            .so app_rxfax.c -lspandsp -ltiff
In file included from app_rxfax.c:15:
/usr/include/asterisk/file.h:27:2: #error You must include stdio.h before file.h!
In file included from app_rxfax.c:15:
/usr/include/asterisk/file.h:56: error: parse error before '*' token
/usr/include/asterisk/file.h:57: error: parse error before '*' token
app_rxfax.c:61: warning: 't30_flush' defined but not used
make[1]: *** [app_rxfax.so] Error 1
make[1]: Leaving directory `/var/tmp/portage/asterisk-app_rtxfax-0.0.2_pre20/work/app_rtxfax-0.0.2_pr            e20/asterisk-1.1.x'
make: *** [asterisk-1.1.x] Error 2
Comment 1 Rob Terhaar 2006-01-07 22:18:29 UTC
not ppc-related. same error message on x86. I beleive this error is related to an incompatibility with asterisk 1.2.1?

>>> Source unpacked.
make -C asterisk-1.1.x all
make[1]: Entering directory `/var/tmp/portage/asterisk-app_rtxfax-0.0.2_pre20/work/app_rtxfax-0.0.2_pre20/asterisk-1.1.x'
cc -O2 -march=pentium3 -pipe -fomit-frame-pointer -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE -O2 -march=pentium3 -pipe -fomit-frame-pointer -DZAPTEL_OPTIMIZATIONS -fomit-frame-pointer -shared -Xlinker -x -fPIC -o app_rxfax.so app_rxfax.c -lspandsp -ltiff
In file included from app_rxfax.c:15:
/usr/include/asterisk/file.h:27:2: #error You must include stdio.h before file.h!
In file included from app_rxfax.c:15:
/usr/include/asterisk/file.h:56: error: parse error before '*' token
/usr/include/asterisk/file.h:57: error: parse error before '*' token
app_rxfax.c:61: warning: 't30_flush' defined but not used
make[1]: *** [app_rxfax.so] Error 1
make[1]: Leaving directory `/var/tmp/portage/asterisk-app_rtxfax-0.0.2_pre20/work/app_rtxfax-0.0.2_pre20/asterisk-1.1.x'
make: *** [asterisk-1.1.x] Error 2
Comment 2 Christophe PEREZ 2006-01-17 07:43:21 UTC
Same error here, with asterisk 1.2.1.
Comment 3 Christophe PEREZ 2006-02-09 18:14:18 UTC
Nobody to fix it ?
Comment 4 Barry Fawthrop 2006-02-10 13:06:01 UTC
I have it with asterisk 1.2.4 same error on a x86 box
Comment 5 Barry Fawthrop 2006-02-10 13:34:06 UTC
real KLUDGE method

emerge asterisk-app_rtxfax
    it fails
cd /var/tmp/portage/asterisk-app_rtxfax-0.0.2_pre20/work/app_rtxfax-0.0.2_pre20/asterisk-1.1.x

edit the two .c files  add as the first #include <stdio.h>
then run 


 ebuild /usr/portage/net-misc/asterisk-app_rtxfax/asterisk-app_rtxfax-0.0.2_pre20.ebuild  compile
 ebuild /usr/portage/net-misc/asterisk-app_rtxfax/asterisk-app_rtxfax-0.0.2_pre20.ebuild  install
 ebuild /usr/portage/net-misc/asterisk-app_rtxfax/asterisk-app_rtxfax-0.0.2_pre20.ebuild  postinst

KULDGE method but it works until someone fixes it

Comment 6 Rob Terhaar 2006-02-10 14:05:01 UTC
I've upped the severity to blocker-

I tried a simple version rename of the old pre20 ebuild to pre25 ebuild today and had no luck. I added the correct SRC_URL and removed the pre20 patch that gets applied in the current ebuild. Just can't get v.pre25 to work. I think it's because the gentoo spandsp tars aren't formatted the same way as the upsteam tars.. but what the hell do i know? :)
Comment 7 Christophe PEREZ 2006-02-10 14:49:35 UTC
Created attachment 79464 [details, diff]
patch for ebuild

So, we just have to use 2 patches. One to patch ebuild, and one to put in files directory, and it should work, no ?
Comment 8 Christophe PEREZ 2006-02-10 14:50:55 UTC
Created attachment 79465 [details, diff]
file to add in files directory

then :
ebuild asterisk-app_rtxfax-0.0.2_pre20.ebuild digest
emerge asterisk-app_rtxfax
should work
Comment 9 Roman Schließmeyer 2006-02-12 08:08:30 UTC
(In reply to comment #8)
> Created an attachment (id=79465) [edit]
> file to add in files directory
> 
> then :
> ebuild asterisk-app_rtxfax-0.0.2_pre20.ebuild digest
> emerge asterisk-app_rtxfax
> should work

Works fine for asterisk-1.2.4, Thanks
Comment 10 Jesse D. Guardiani 2006-02-19 21:12:11 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Created an attachment (id=79465) [edit]
> > file to add in files directory
> > 
> > then :
> > ebuild asterisk-app_rtxfax-0.0.2_pre20.ebuild digest
> > emerge asterisk-app_rtxfax
> > should work
> 
> Works fine for asterisk-1.2.4, Thanks


Is this bug solved? If not, I have an ebuild and a patch for pre20 that works with asterisk 1.0.x && 1.2.x.

I also have a working ebuild for spandsp && rtxfax pre25 and asterisk 1.2.4. It needs a bit of cleanup, but if anyone is interested then I'll get it ready.

Comment 11 Jesse D. Guardiani 2006-02-19 21:15:40 UTC
Created attachment 80238 [details]
updated ebuild

Adds asterisk version check to ebuild and compiles appropriate app. Probably overkill, but it works.
Comment 12 Jesse D. Guardiani 2006-02-19 21:19:05 UTC
Created attachment 80239 [details, diff]
patch that goes along with updated ebuild

Place this file in the files subdir of the ebuild dir. Note the "-I$(AST_INCLUDE_DIR) -I- -I$(SPANDSP_INCLUDE_DIR)" in the CC lines. This is the trick I use to fix pre25 compile issues with asterisk 1.2.4. But this patch is for use with pre20.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-01-21 14:40:28 UTC
Someone try w/ 0.0.2_pre25 maybe?
Comment 14 Rob Terhaar 2007-01-22 17:03:43 UTC
asterisk-app_rtxfax 0.0.2_pre25 works great for me!

i've had it installed on my production asterisk box for over a week now. it's been sending/receiving out 10-20 faxes a day.