Search code examples
linuxarmcross-compilingfreeswitch

Cross Compiling freeswitch for ARM on Centos 6.3 using ELDK 5.3 APR.H ssize_t error


I am trying to cross compile freeswitch for ARM using ELDK 5.3 on CentOS 6.3.

Found this error on make:

./include/apr.h:347:2: error: #error Can not determine the proper size for ssize_t

I already done declaring the following

declare -x CROSS_COMPILE="/opt/eldk-5.3/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/arm-linux-gnueabi-"
declare -x CC="$CROSS_COMPILE"gcc
declare -x CXX="$CROSS_COMPILE"g++
declare -x CPP="$CROSS_COMPILE"cpp
declare -x STRIP="$CROSS_COMPILE"strip
declare -x RANLIB="$CROSS_COMPILE"ranlib
declare -x AR="$CROSS_COMPILE"ar
declare -x AS="$CROSS_COMPILE"as
declare -x NM="$CROSS_COMPILE"nm
declare -x LD="$CROSS_COMPILE"ld

export PATH=$PATH:/opt/eldk-5.3/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi

configured using the following flags

./configure --target=arm --host=arm-linux --build=i686-linux --prefix=/opt/eldk-5.3/armv5te/rootfs-base/armcodasVL  ac_cv_file__dev_ptmx=yes config_BUILD_CC=gcc config_TARGET_CC=arm-linux-gnueabi-gcc config_TARGET_READLINE_INC=" " ac_cv_file__dev_zero=yes ac_cv_func_setpgrp_void=yes apr_cv_tcp_nodelay_with_cork=yes ac_cv_file_dbd_apr_dbd_mysql_c=no ac_cv_va_copy=yes

followed by make, I am unable to figure it out why is this happening! Please suggest if any of you faced the same?


Solution

  • The solution I earlier posted was a bit of bad way to do it.. as it was in a generated header, Later i figure out the correct way to do it and that was to add a configure flag

    export ac_cv_sizeof_ssize_t=4;
    

    Just did it before configure and all is well since then!