[Asterisk-Users] Compiling app_cepstral.c into Asterisk - failing

Lists lists at futuresync.com
Sat Jan 21 21:21:59 MST 2006


I have searched and found a couple examples on how to put the app_cepstral.c
into Asterisk but it isn't working.  I obviously am not understanding the
examples that I have found.

"Copy the app_cepstral.c file to your asterisk source tree (apps folder) .
You'll also need to add a lines like these to the Makefile in that
directory:

APPS+=app_cepstral.so"

I added it into app_cepstal.c as:

#
# Obsolete things...
#
#APPS+=app_sql_postgres.so
#APPS+=app_sql_odbc.so

#
# Experimental things
#
#APPS+=app_ivrdemo.so
#APPS+=app_skel.so
#APPS+=app_rpt.so
APPS+=app_cepstral.so

I assume that I put in here without the "#" or maybe "#" isn't a comment?

Then....



and then after the section that compiles voicemail add 

app_cepstral.so: app_cepstral.c
        $(CC) -D_GNU_SOURCE -shared -Xlinker -x -o $@ $< -lz -lm -lceplex_uk
-lceplex_fr -lswift -lceplex_us -lceplang_en -lceplang_fr -lz -ldl
-L/opt/swift/lib -I/opt/swift/include


Make sure the $(CC) line starts with a tab, not spaces. Note the example
lines above only link against the uk, us and French libraries, if you use
others then you'll need to link against those too/instead. This version also
has a couple of asterisk cli commands:


Assuming this is the section that it is referring to:

#
# If you have UnixODBC you can use ODBC voicemail
# storage
#
# Uncomment to use ODBC storage
#CFLAGS+=-DUSE_ODBC_STORAGE
# Uncomment for extended ODBC voicemail storage
#CFLAGS+=-DEXTENDED_ODBC_STORAGE
# See doc/README.odbcstorage for more information


I put the following here:

app_cepstral.so: app_cepstral.c
        $(CC) -D_GNU_SOURCE -shared -Xlinker -x -o $@ $< -lz -lm -lswift
-lceplex_us -lceplang_en -lz -ldl -L/opt/swift/lib -I/opt/swift/include

all: $(APPS)


Each time I try and do the make clean ; make install from /usr/src/asterisk,
I get:


In file included from app_cepstral.c:15:
/usr/include/asterisk/file.h:27:2: #error You must include stdio.h before
file.h!
In file included from app_cepstral.c:15:
/usr/include/asterisk/file.h:56: error: syntax error before '*' token
/usr/include/asterisk/file.h:57: error: syntax error before '*' token
In file included from app_cepstral.c:26:
/usr/include/asterisk/cli.h:32: error: syntax error before string constant
make[1]: *** [app_cepstral.so] Error 1
make[1]: Leaving directory `/usr/src/asterisk/apps'
make: *** [bininstall] Error 1
[root at asterisk1 asterisk]#


Obviously I am not a programmer and I am trying to follow the instructions,
but I am not sure what I am doing wrong.  If anyone has installed
app_cepstral.c successfully in asterisk and could tell me what I don't
understand, I would appreciate it.












More information about the asterisk-users mailing list