[Freeswitch-users] Failed to compile sofia.c for ARM

mazilo Nabble at slickdeals.endjunk.com
Sat Jul 3 17:43:29 PDT 2010


I tried to compile freeswitch-1.0.6 on OpenWRT for a Marvell Kirkwood (ARM)
platform to no avail. The same source codes compiled just fine for a
Broadcomm (MIPS/MIPS32) platform. What fails to compile is the source code
of sofia.c at line 1574 with the following error messages:

++++++++++++++++++++++++++
make[8]: Entering directory
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src/mod/endpoints/mod_sofia'
Creating mod_sofia_la-mod_sofia.lo
mkdir .libs
Compiling mod_sofia.c ...
Creating mod_sofia_la-sofia.lo
Compiling sofia.c ...
sofia.c: In function 'logger':
sofia.c:1574: error: used struct type value where scalar is required
make[8]: *** [mod_sofia_la-sofia.lo] Error 1
make[8]: Leaving directory
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src/mod/endpoints/mod_sofia'
make[7]: *** [all] Error 2
make[7]: Leaving directory
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src/mod/endpoints/mod_sofia'
make[6]: *** [mod_sofia-all] Error 1
make[6]: Leaving directory
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src/mod'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory
`/opt/tmp/openwrt-svn-trunk-ARM/build_dir/target-arm_v5te_uClibc-0.9.30.2_eabi/freeswitch-1.0.6/src'
++++++++++++++++++++++++++

The pertaining sofia.c source code at line 1574 is shown below:

++++++++++++++++++++++++++
1569 static void logger(void *logarg, char const *fmt, va_list ap)
1570 {
1571         if (!fmt)
1572                 return;
1573
1574         if (ap) {
1575                 switch_log_vprintf(SWITCH_CHANNEL_LOG_CLEAN,
mod_sofia_glob     als.tracelevel, fmt, ap);
1576         } else {
1577                 switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN,
mod_sofia_globa     ls.tracelevel, "%s", fmt);
1578         }
1579 }
++++++++++++++++++++++++++

I am no programmer; however, isn't va_list ap indicates ap is a struct type
value while the if(ap) expects ap to be a scalar value? If so, why sofia.c
doesn't fail to compile for a MIPS/MIPS32 platform but fails to compile for
an ARM platform? That said, how does one go about to fix this so that
sofia.c source will compile cleanly on both platforms?

Thanks. 
-- 
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Failed-to-compile-sofia-c-for-ARM-tp5252219p5252219.html
Sent from the freeswitch-users mailing list archive at Nabble.com.



More information about the FreeSWITCH-users mailing list