Fax receive on Asterisk. can not install spandsp?

Hello.

i have asterisk 1.4 on fedora core 6.

i tried to install spandsp for the fax using this tuto :
asteriskguru.com/tutorials/spandsp.html

i installed this file :
soft-switch.org/downloads/snapsh … 112.tar.gz

i untar it and i do :

./configure --prefix=/usr make clean make make install

everythings ok.

then i copied
soft-switch.org/downloads/snapsh … pp_rxfax.c
soft-switch.org/downloads/snapsh … pp_txfax.c
soft-switch.org/downloads/snapsh … risk.patch

in the apps directory of the sources of asterisk.

next i do :

and i see :

[code][root@localhost apps]# patch <asterisk.patch can’t find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:

|— build_tools/menuselect-deps.in.orig 2006-09-03 15:50:32.000000000 +0800

+++ build_tools/menuselect-deps.in 2006-09-03 15:50:44.000000000 +0800

File to patch:[/code]

i use asterisk.patch instead of apps_makefile.patch because the file apps_makefile.patch is in the asterisk 1.2 directory ( soft-switch.org/downloads/snapsh … erisk-1.4/ )

Can you help me please ? i am searching for several hours and i really don’t know what to do.

(i am sorry if my english is very bad…i try to do my best. thank you)

did you put the patch (and run it) in the /usr/src/asterisk/apps directory ?

Yes. i put the patch (and run it) in the directory apps of the asterisk source asterisk.patch that i found here : soft-switch.org/downloads/snapsh … risk.patch

and when i do patch <asterisk.patch

it answers :

[code]
[root@localhost apps]# patch <asterisk.patch can’t find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:

|— build_tools/menuselect-deps.in.orig 2006-09-03 15:50:32.000000000 +0800

+++ build_tools/menuselect-deps.in 2006-09-03 15:50:44.000000000 +0800

File to patch:[/code]

any idea ?

Thank you.

looking at the patch, it’s looking for files in build_tools, which means you need to run the patch in the root of the Asterisk source, not in the apps directory as with previous versions.

Thank you for your help.

i copied the file asterisk.patch in the root of asterisk source…

i tried patch <asterisk.patch and patch <apps/asterisk.patch

each time i have the same probleme.

here is the display… ( made a dir so you can check the directory).

thank you really for your help. if i can do it i will try to make a easely readable tuto.

[code][root@localhost asterisk-1.4.0]# dir
acinclude.m4 config.log include menuselect.makeopts
agi configs install-sh menuselect-tree
apps config.status keys missing
asterisk.patch config.sub LICENSE mkinstalldirs
bootstrap.sh configure main pbx
BUGS configure.ac Makefile README
build_tools contrib Makefile.moddir_rules redhat
cdr COPYING Makefile.rules res
ChangeLog CREDITS makeopts sample.call
CHANGES doc makeopts.embed_rules sounds
channels formats makeopts.in static-http
codecs funcs menuselect UPGRADE.txt
config.guess images menuselect.makedeps utils
[root@localhost asterisk-1.4.0]# patch <asterisk.patch
can’t find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:

|— build_tools/menuselect-deps.in.orig 2006-09-03 15:50:32.000000000 +0800

+++ build_tools/menuselect-deps.in 2006-09-03 15:50:44.000000000 +0800

File to patch:
[root@localhost asterisk-1.4.0]# patch <apps/asterisk.patch
can’t find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:

|— build_tools/menuselect-deps.in.orig 2006-09-03 15:50:32.000000000 +0800

+++ build_tools/menuselect-deps.in 2006-09-03 15:50:44.000000000 +0800

File to patch:
[root@localhost asterisk-1.4.0]#[/code]

here is also a dir build_tools :

[root@localhost asterisk-1.4.0]# dir build_tools cflags.xml make_build_h make_version_h prep_moduledeps embed_modules.xml make_buildopts_h menuselect-deps prep_tarball get_makeopts make_defaults_h menuselect-deps.in strip_nonapi get_moduleinfo make_version mkpkgconfig [root@localhost asterisk-1.4.0]#

i also tried to do a patch -p0 <asterisk.patch

and i have that :

[root@localhost src]# cd asterisk-1.4.0 [root@localhost asterisk-1.4.0]# patch -p0 <asterisk.patch patching file build_tools/menuselect-deps.in Hunk #1 succeeded at 18 (offset 1 line). patching file configure.ac Hunk #1 FAILED at 174. Hunk #2 succeeded at 833 (offset 38 lines). 1 out of 2 hunks FAILED -- saving rejects to file configure.ac.rej patching file makeopts.in Hunk #1 succeeded at 125 (offset 5 lines).

is there someone who can help me, pleeeeeeeeeeeeeaaaaassssssssseeeeeeeeeeeee ?

open the patch in your fave text-editor, open the src file it’s patching in another, and use the patch file as your guide for the lines to look for, and then copy (indicated with a ‘+’ in the patchfile) the required lines into the right place in the source.

save and recompile.

[quote=“baconbuttie”]open the patch in your fave text-editor, open the src file it’s patching in another, and use the patch file as your guide for the lines to look for, and then copy (indicated with a ‘+’ in the patchfile) the required lines into the right place in the source.

save and recompile.[/quote]

thank you for your help…

i tried to do that.

but in tha patch i see :

--- configure.ac.orig 2006-09-03 16:25:31.000000000 +0800 +++ configure.ac 2006-09-03 16:27:19.000000000 +0800 @@ -174,10 +174,11 @@ AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres]) AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri]) AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib]) AST_EXT_LIB_SETUP([QT], [Qt], [qt]) AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius]) +AST_EXT_LIB_SETUP([SPANDSP], [spandsp Library], [spandsp]) AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex]) AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite]) AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv]) AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL], [ssl]) AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])

and on line 174 of configure.ac i find :

AST_EXT_LIB_SETUP([ALSA], [Advanced Linux Sound Architecture], [asound]) AST_EXT_LIB_SETUP([CURL], [cURL], [curl]) AST_EXT_LIB_SETUP([CURSES], [curses], [curses]) AST_EXT_LIB_SETUP([GNUTLS], [GNU TLS support (used for iksemel only)], [gnutls]) AST_EXT_LIB_SETUP([GSM], [GSM], [gsm], [, or 'internal']) AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel]) AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap]) AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet]) AST_EXT_LIB_SETUP([KDE], [KDE], [kde]) AST_EXT_LIB_SETUP([MISDN], [mISDN User Library], [misdn]) AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs]) AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses]) AST_EXT_LIB_SETUP([NETSNMP], [Net-SNMP], [netsnmp]) AST_EXT_LIB_SETUP([NEWT], [newt], [newt]) AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [odbc]) AST_EXT_LIB_SETUP([OGG], [OGG], [ogg]) AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk]) AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss]) AST_EXT_LIB_SETUP([POPT], [popt], [popt]) AST_EXT_LIB_SETUP([PGSQL], [PostgreSQL], [postgres]) AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri]) AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib]) AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323]) AST_EXT_LIB_SETUP([QT], [Qt], [qt]) AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius]) AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex]) AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite]) AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv]) AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL], [ssl]) AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds]) AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap]) AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo]) AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone]) AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis]) AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb]) AST_EXT_LIB_SETUP([ZLIB], [zlib], [z]) AST_EXT_LIB_SETUP([ZAPTEL], [Zaptel], [zaptel])

is it really safe that i make the changes myself when the file is so different that what the patch had to find ?

Thank you for all your help.