chan_mobile fails compile (again)

Hello !

It’s seems that version Asterisk 1.6 will not see 2007 so i’m stuck with 1.4 :frowning:

I followed instruction from:
chan-mobile.org/?page_id=5


Checked out external at revision 51.

Checked out revision 238.
Checked out revision 497.

root@core:/kituri/voip/asterisk-1.4/add-ons/asterisk-addons# patch -p0 < chan_mobile-1.4.x.patch
patching file chan_mobile.c
Hunk #2 succeeded at 540 (offset 26 lines).
Hunk #4 succeeded at 664 with fuzz 2 (offset 26 lines).
Hunk #5 succeeded at 701 (offset 3 lines).
Hunk #6 succeeded at 863 with fuzz 1 (offset 24 lines).
Hunk #7 succeeded at 916 (offset 3 lines).
Hunk #8 succeeded at 961 with fuzz 2 (offset 24 lines).
Hunk #9 succeeded at 949 (offset 3 lines).
Hunk #10 succeeded at 980 (offset 24 lines).
Hunk #11 succeeded at 975 (offset 3 lines).
Hunk #12 succeeded at 1091 with fuzz 2 (offset 24 lines).
Hunk #13 succeeded at 1078 (offset 3 lines).
Hunk #14 succeeded at 1109 (offset 24 lines).
Hunk #15 FAILED at 1124.
Hunk #16 FAILED at 1143.
Hunk #17 succeeded at 1159 (offset 3 lines).
Hunk #18 succeeded at 1200 (offset 24 lines).
Hunk #19 succeeded at 1295 (offset 3 lines).
Hunk #20 succeeded at 1357 (offset 24 lines).
Hunk #21 succeeded at 1387 (offset 3 lines).
Hunk #22 FAILED at 1565.
Hunk #23 succeeded at 1662 (offset 29 lines).
Hunk #24 succeeded at 1792 (offset 3 lines).
Hunk #25 succeeded at 1838 (offset 29 lines).
Hunk #26 FAILED at 1866.
Hunk #27 succeeded at 1858 with fuzz 2 (offset 3 lines).
Hunk #28 succeeded at 1935 (offset 27 lines).
Hunk #29 succeeded at 1949 with fuzz 1 (offset -3 lines).
4 out of 29 hunks FAILED – saving rejects to file chan_mobile.c.rej
root@core:/kituri/voip/asterisk-1.4/add-ons/asterisk-addons#

root@core:/kituri/voip/asterisk-1.4/add-ons/asterisk-addons# ./configure
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for uname… /usr/bin/uname
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking for a BSD-compatible install… /usr/bin/ginstall -c
checking whether ln -s works… yes
checking for GNU make… make
checking for grep… /usr/bin/grep
checking for basename… /usr/bin/basename
checking for dirname… /usr/bin/dirname
checking for sh… /bin/sh
checking for ln… /usr/bin/ln
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… (cached) /usr/bin/grep
checking for egrep… /usr/bin/grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for ba2str in -lbluetooth… yes
checking bluetooth/bluetooth.h usability… yes
checking bluetooth/bluetooth.h presence… yes
checking for bluetooth/bluetooth.h… yes
checking for initscr in -lcurses… yes
checking curses.h usability… yes
checking curses.h presence… yes
checking for curses.h… yes
checking for initscr in -lncurses… yes
checking for curses.h… (cached) yes
checking for fax_init in -lspandsp… yes
checking spandsp.h usability… yes
checking spandsp.h presence… yes
checking for spandsp.h… yes
checking for -Wdeclaration-after-statement support… yes
checking for mysql_config… /usr/local/bin/mysql_config
checking for mysql_init in -lmysqlclient… yes
checking for asterisk.h… yes
configure: creating ./config.status
config.status: creating build_tools/menuselect-deps
config.status: creating makeopts

           .$$$$$$$$$$$$$$$=..
        .$7$7..          .7$$7:.
      .$$:.                 ,$7.7
    .$7.     7$$$$           .$$77
 ..$$.       $$$$$            .$$$7
..7$   .?.   $$$$$   .?.       7$$$.

$.$. .$$$7. $$$$7 .7$$$. .$$$.
.777. .$$$$$$77$$$77$$$$$7. $$$,
$$$~ .7$$$$$$$$$$$$$7. .$$$.
.$$7 .7$$$$$$$7: ?$$$.
$$$ ?7$$$$$$$$$$I .$$$7
$$$ .7$$$$$$$$$$$$$$$$ :$$$.
$$$ $$$$$$7$$$$$$$$$$$$ .$$$.
$$$ $$$ 7$$$7 .$$$ .$$$.
$$$$ $$$$7 .$$$.
7$$$7 7$$$$ 7$$$
$$$$$ $$$
$$$$7. $$ ™
$$$$$$$. .7$$$$$$ $$
$$$$$$$$$$$$7$$$$$$$$$.$$$$$$
$$$$$$$$$$$$$$$$.

configure: Package configured for:
configure: OS type : Linux
configure: Host CPU : i686
root@core:/kituri/voip/asterisk-1.4/add-ons/asterisk-addons#

root@core:/kituri/voip/asterisk-1.4/add-ons/asterisk-addons# make
make[1]: Entering directory /kituri/voip/asterisk-1.4/add-ons/asterisk-addons' [CC] chan_mobile.c -> chan_mobile.o chan_mobile.c:178: warning: "struct ast_cli_args" declared inside parameter list chan_mobile.c:178: warning: its scope is only this definition or declaration, which is probably not what you want chan_mobile.c:179: warning: "struct ast_cli_args" declared inside parameter list chan_mobile.c:180: warning: "struct ast_cli_args" declared inside parameter list chan_mobile.c:183: error: initializer element is not constant chan_mobile.c:183: error: (near initialization formbl_cli[0].cmda[0]’)
chan_mobile.c:184: error: initializer element is not constant
chan_mobile.c:184: error: (near initialization for mbl_cli[0].cmda[1]') chan_mobile.c:185: error: initializer element is not constant chan_mobile.c:185: error: (near initialization formbl_cli[0].cmda[2]’)
chan_mobile.c:186: error: initializer element is not constant
chan_mobile.c:186: error: (near initialization for mbl_cli[0].cmda') chan_mobile.c:186: error: initializer element is not constant chan_mobile.c:186: error: (near initialization formbl_cli[0]’)
chan_mobile.c:248: warning: “struct ast_cli_args” declared inside parameter list
chan_mobile.c:249: error: conflicting types for ‘handle_cli_mobile_show_devices’
chan_mobile.c:178: error: previous declaration of ‘handle_cli_mobile_show_devices’ was here
chan_mobile.c:249: error: conflicting types for ‘handle_cli_mobile_show_devices’
chan_mobile.c:178: error: previous declaration of ‘handle_cli_mobile_show_devices’ was here
chan_mobile.c: In function handle_cli_mobile_show_devices': chan_mobile.c:257: error:CLI_INIT’ undeclared (first use in this function)
chan_mobile.c:257: error: (Each undeclared identifier is reported only once
chan_mobile.c:257: error: for each function it appears in.)
chan_mobile.c:258: error: structure has no member named command' chan_mobile.c:263: error:CLI_GENERATE’ undeclared (first use in this function)
chan_mobile.c:267: error: dereferencing pointer to incomplete type
chan_mobile.c:268: error: CLI_SHOWUSAGE' undeclared (first use in this function) chan_mobile.c:270: error: dereferencing pointer to incomplete type chan_mobile.c:274: error: dereferencing pointer to incomplete type chan_mobile.c:281: error:CLI_SUCCESS’ undeclared (first use in this function)
chan_mobile.c: At top level:
chan_mobile.c:284: warning: “struct ast_cli_args” declared inside parameter list
chan_mobile.c:285: error: conflicting types for ‘handle_cli_mobile_search’
chan_mobile.c:179: error: previous declaration of ‘handle_cli_mobile_search’ was here
chan_mobile.c:285: error: conflicting types for ‘handle_cli_mobile_search’
chan_mobile.c:179: error: previous declaration of ‘handle_cli_mobile_search’ was here
chan_mobile.c: In function handle_cli_mobile_search': chan_mobile.c:298: error:CLI_INIT’ undeclared (first use in this function)
chan_mobile.c:299: error: structure has no member named command' chan_mobile.c:304: error:CLI_GENERATE’ undeclared (first use in this function)
chan_mobile.c:308: error: dereferencing pointer to incomplete type
chan_mobile.c:309: error: CLI_SHOWUSAGE' undeclared (first use in this function) chan_mobile.c:318: error: dereferencing pointer to incomplete type chan_mobile.c:319: error:CLI_SUCCESS’ undeclared (first use in this function)
chan_mobile.c:329: error: dereferencing pointer to incomplete type
chan_mobile.c:340: error: dereferencing pointer to incomplete type
chan_mobile.c:344: error: dereferencing pointer to incomplete type
chan_mobile.c: At top level:
chan_mobile.c:352: warning: “struct ast_cli_args” declared inside parameter list
chan_mobile.c:353: error: conflicting types for ‘handle_cli_mobile_rfcomm’
chan_mobile.c:180: error: previous declaration of ‘handle_cli_mobile_rfcomm’ was here
chan_mobile.c:353: error: conflicting types for ‘handle_cli_mobile_rfcomm’
chan_mobile.c:180: error: previous declaration of ‘handle_cli_mobile_rfcomm’ was here
chan_mobile.c: In function handle_cli_mobile_rfcomm': chan_mobile.c:358: error:CLI_INIT’ undeclared (first use in this function)
chan_mobile.c:359: error: structure has no member named command' chan_mobile.c:365: error:CLI_GENERATE’ undeclared (first use in this function)
chan_mobile.c:369: error: dereferencing pointer to incomplete type
chan_mobile.c:370: error: CLI_SHOWUSAGE' undeclared (first use in this function) chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:373: error: dereferencing pointer to incomplete type chan_mobile.c:378: error: dereferencing pointer to incomplete type chan_mobile.c:378: error: dereferencing pointer to incomplete type chan_mobile.c:379: error:CLI_SUCCESS’ undeclared (first use in this function)
chan_mobile.c:382: error: dereferencing pointer to incomplete type
chan_mobile.c: In function mbl_load_config': chan_mobile.c:1878: error: too many arguments to functionast_config_load’
make[1]: *** [chan_mobile.o] Error 1
make[1]: Leaving directory `/kituri/voip/asterisk-1.4/add-ons/asterisk-addons’
make: *** [all] Error 2
root@core:/kituri/voip/asterisk-1.4/add-ons/asterisk-addons#

This is what I get when I try to patch. Of course configure and make would not be successful if chan-mobile.c is not patched properly. What can I do to fix this? Thanks

[/img]

NVM my post. I was patching the latest svn and then running install. That is wrong because patch is for 1.4 and while using SVN no patch is needed.

okey, I am back at square one. Whether I used the patch or the latest svn still there are problems. By the way I am using PBXinaflash 1.1 which is using Asterisk 1.4.

I encounter same problem as original thread author.

Any guidance?

Thanks,
Bruce

Wondering if this forum is dead or not?

Does no one else face the same problems as us?

Thanks

See this - geek-pages.com/articles/aste … box_3.html