[Asterisk-Users] can't compile chan_capi 3.5 after patch applied :-(

Jean-Louis curty jlcurty at gmail.com
Tue Dec 7 15:29:56 MST 2004


Hi I use RH 9 + asterisk v1.0 stable + 2 PCI fritz cards + chan_capi
3.5 and it works fine,

Since my users want fax fonctionnality and customers know 1 of the msm
as fax number I wanted to try the chan_capi-0.3.5 patch

if I  patch chan_capi and run make, I get an error message , as you
can read below, orginal chan_capi compile works, when  patched I  get
an error, no CID …
Any idea ?

anybody else is using this patch ?



[root at server src]# ls
asterisk            capi4k-utils-2004-10-06.tar        
chan_capi-0.3.5-patch.diff     debug                       libpri     
        redhat
asterisk-update.sh  chan_capi-0.3.5                    
chan_capi-0.3.5-patch.INSTALL  fcpci-suse8.2-03.11.02.tar  linux-2.4  
        zaptel
capi4k-utils        chan_capi-0.3.5-cvs-HEAD-patch.tar 
chan_capi.0.3.5.tar            fritz                      
linux-2.4.20-35.cc



[root at server src]# cd chan_capi0.3.5
-bash: cd: chan_capi0.3.5: No such file or directory [root at server
src]# cd chan_capi-0.3.5 [root at server chan_capi-0.3.5]# ls
app_capiCD.c   app_capiHOLD.c  app_capiNoES.c      capi.conf          
        chan_capi_app.h  chan_capi_pvt.h  LICENSE   README
app_capiECT.c  app_capiMCID.c  app_capiRETRIEVE.c 
chan_capi-0.3.5-patch.diff  chan_capi.c      INSTALL          Makefile
 xlaw.h
[root at server chan_capi-0.3.5]# nano INSTALL

original chan_capi compil:

[root at server chan_capi-0.3.5]# make

gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686  -DCAPI_ES
-DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o chan_capi.o chan_capi.c
gcc -shared -Xlinker -x -o chan_capi.so chan_capi.o -lcapi20
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686  -DCAPI_ES
-DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o app_capiCD.o app_capiCD.c
gcc -shared -Xlinker -x -o app_capiCD.so app_capiCD.o
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686  -DCAPI_ES
-DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o app_capiHOLD.o
app_capiHOLD.c
gcc -shared -Xlinker -x -o app_capiHOLD.so app_capiHOLD.o
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686  -DCAPI_ES
-DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o app_capiRETRIEVE.o
app_capiRETRIEVE.c
gcc -shared -Xlinker -x -o app_capiRETRIEVE.so app_capiRETRIEVE.o
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686  -DCAPI_ES
-DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o app_capiECT.o app_capiECT.c
gcc -shared -Xlinker -x -o app_capiECT.so app_capiECT.o
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686  -DCAPI_ES
-DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o app_capiMCID.o
app_capiMCID.c
gcc -shared -Xlinker -x -o app_capiMCID.so app_capiMCID.o
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686  -DCAPI_ES
-DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS –W no-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o app_capiNoES.o
app_capiNoES.c
gcc -shared -Xlinker -x -o app_capiNoES.so app_capiNoES.o rm
app_capiCD.o app_capiECT.o app_capiMCID.o app_capiHOLD.o
app_capiRETRIEVE.o app_capiNoES.o


patched:


[root at server chan_capi-0.3.5]# patch -p1 < chan_capi-0.3.5-patch.diff
patching file app_capiFax.c patching file chan_capi.c patching file
chan_capi_pvt.h patching file Makefile




[root at server chan_capi-0.3.5]# make
gcc-2.95 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6   -DCAPI_ES -DCAPI_GAIN
-DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o chan_capi.o chan_capi.c
make: gcc-2.95: Command not found
make: *** [chan_capi.o] Error 127

oops gcc-2.95 not found, nn to change Makefile to use gcc

[root at server chan_capi-0.3.5]# ls
app_capiCD.c   app_capiECT.so  app_capiHOLD.so  app_capiNoES.c     
app_capiRETRIEVE.so         chan_capi_app.h  chan_capi_pvt.h  LICENSE 
 xlaw.h
app_capiCD.so  app_capiFax.c   app_capiMCID.c   app_capiNoES.so    
capi.conf                   chan_capi.c      chan_capi.so     Makefile
app_capiECT.c  app_capiHOLD.c  app_capiMCID.so  app_capiRETRIEVE.c 
chan_capi-0.3.5-patch.diff  chan_capi.o      INSTALL          README
[root at server chan_capi-0.3.5]# nano Makefile


and try again

[root at server chan_capi-0.3.5]# make
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
-I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i686  -DCAPI_ES
-DCAPI_GAIN -DCAPI_SYNC -DUNSTABLE_CVS -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO   -c -o chan_capi.o chan_capi.c
chan_capi.c: In function `capi_new':
chan_capi.c:1076: structure has no member named `cid'
chan_capi.c:1077: structure has no member named `cid'
chan_capi.c: In function `capi_handle_dtmf_fax':
chan_capi.c:1189: structure has no member named `cid'
chan_capi.c: In function `pipe_msg':
chan_capi.c:1764: structure has no member named `cid'
chan_capi.c:1764: structure has no member named `cid'
chan_capi.c:1764: structure has no member named `cid'
chan_capi.c:1764: structure has no member named `cid'
chan_capi.c:1764: structure has no member named `cid'
chan_capi.c:1764: structure has no member named `cid'
chan_capi.c:1764: structure has no member named `cid'
chan_capi.c:1764: structure has no member named `cid'
chan_capi.c: In function `load_module':
chan_capi.c:2843: warning: passing arg 4 of `ast_channel_register'
from incompatible pointer type
make: *** [chan_capi.o] Error 1


heeelp!



More information about the asterisk-users mailing list