[Freeswitch-users] Cross compiling freeswitch for raspberry pi

Dušan Dragić dragic.dusan at gmail.com
Tue Dec 3 23:21:09 MSK 2013


Hi all,

This weekend I tried my luck at cross-compiling freeswitch for
raspberry pi (armv6). After a few bumps along the way (opened jiras
for those) I managed to build it, but  when running freeswitch on the
target system it segfaults during startup.

I'm building on Fedora 19 x86_64 using the prebuilt toolchain from
https://github.com/raspberrypi/tools (I can build a toolchain from
source if anyone thinks it might be better). Raspbian debootstrap
created base system is used as sysroot (also tried loop mounted
raspbian image as sysroot).

My simple build environment setup script:
http://pastebin.freeswitch.org/21698

The build process (source the script, configure and compile):
./bootstrap.sh
. ~/fs-cc-env.sh
./configure --build=x86_64-redhat-linux --host=arm-linux-gnueabihf
--with-sysroot=$SYSROOT
make

make install didn't work (I guess it's kinda expected, didn't really
look into it) so I just copied the binaries, libraries and modules to
rpi.
Also mod_spidermonkey and mod_xml_rpc were disabled. Didn't even try
to build mod_spidermonkey and mod_xml_rpc failed to build (well it
builds but makefile tries to run
libs/xmlrpc-c/lib/expat/gennmtab/gennmtab which was compiled for arm
and should have been x86, probably should create jira for this as
well).

Console log when FS is started:
http://pastebin.freeswitch.org/21699

and backtrace:
http://pastebin.freeswitch.org/21700

Is my build environment sane? What am I missing, any hints? Has anyone
successfully cross-compiled FS for raspberry pi?

Thanks,
-- 
Dušan Dragić



Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list