cross compiling PJSIP for arm_qemu on Ubuntu

H
hemanth@advaitamtech.com
Fri, Dec 15, 2017 4:53 AM

Hello All,

I am trying to crosscompile PJSIP on UBUNTU for arm_qemu by installing arm toolchain following the link below

https://trac.pjsip.org/repos/wiki/ARM_QEMU

I am able to install GCC 4.6.1, But compiling PJSIP is failing with below errors


root@hemanth:~/pjsip_comp# make
for dir in pjlib/build pjlib-util/build pjnath/build third_party/build pjmedia/build pjsip/build pjsip-apps/build ; do
if make  -C $dir all; then
true;
else
exit 1;
fi;
done
make[1]: Entering directory /home/hemanth/pjsip_comp/pjlib/build' make -f /home/hemanth/pjsip_comp/build/rules.mak APP=PJLIB app=pjlib ../lib/libpj-arm-unknown-elf.a make[2]: Entering directory /home/hemanth/pjsip_comp/pjlib/build'
mkdir -p output/pjlib-arm-unknown-elf
arm-elf-gcc -c -Wall -DPJ_AUTOCONF=1 -I/arm/arm-elf/include -msoft-float -D_POSIX_SOURCE -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1 -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS    -I../include
-o output/pjlib-arm-unknown-elf/ioqueue_select.o
../src/pj/ioqueue_select.c
../src/pj/ioqueue_select.c:48:5: error: #error "PJ_IOQUEUE_MAX_HANDLES cannot be greater than FD_SETSIZE"
In file included from ../src/pj/ioqueue_select.c:137:0:
../src/pj/ioqueue_common_abs.c: In function 'ioqueue_dispatch_write_event':
../src/pj/ioqueue_common_abs.c:257:25: error: storage size of 'addr' isn't known
../src/pj/ioqueue_common_abs.c:257:25: warning: unused variable 'addr' [-Wunused-variable]
../src/pj/ioqueue_select.c: In function 'rescan_fdset':
../src/pj/ioqueue_select.c:173:21: error: 'FD_SETSIZE' undeclared (first use in this function)
../src/pj/ioqueue_select.c:173:21: note: each undeclared identifier is reported only once for each function it appears in
../src/pj/ioqueue_select.c: In function 'pj_ioqueue_register_sock2':
../src/pj/ioqueue_select.c:377:5: warning: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration]
../src/pj/ioqueue_select.c:377:21: error: 'FIONBIO' undeclared (first use in this function)
make[2]: *** [output/pjlib-arm-unknown-elf/ioqueue_select.o] Error 1
make[2]: Leaving directory /home/hemanth/pjsip_comp/pjlib/build' make[1]: *** [libpj-arm-unknown-elf.a] Error 2 make[1]: Leaving directory /home/hemanth/pjsip_comp/pjlib/build'
make: *** [all] Error 1
root@hemanth:~/pjsip_comp#


Can anyone help me where i am going wrong in compiling my PJSIP,

Thanks & Regards
Hemanth

Hello All, I am trying to crosscompile PJSIP on UBUNTU for arm_qemu by installing arm toolchain following the link below [ https://trac.pjsip.org/repos/wiki/ARM_QEMU ]( https://trac.pjsip.org/repos/wiki/ARM_QEMU ) I am able to install GCC 4.6.1, But compiling PJSIP is failing with below errors ********************************************************************************************************** root@hemanth:~/pjsip_comp# make for dir in pjlib/build pjlib-util/build pjnath/build third_party/build pjmedia/build pjsip/build pjsip-apps/build ; do \ if make -C $dir all; then \ true; \ else \ exit 1; \ fi; \ done make[1]: Entering directory `/home/hemanth/pjsip_comp/pjlib/build' make -f /home/hemanth/pjsip_comp/build/rules.mak APP=PJLIB app=pjlib ../lib/libpj-arm-unknown-elf.a make[2]: Entering directory `/home/hemanth/pjsip_comp/pjlib/build' mkdir -p output/pjlib-arm-unknown-elf arm-elf-gcc -c -Wall -DPJ_AUTOCONF=1 -I/arm/arm-elf/include -msoft-float -D_POSIX_SOURCE -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1 -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS -I../include \ -o output/pjlib-arm-unknown-elf/ioqueue_select.o \ ../src/pj/ioqueue_select.c ../src/pj/ioqueue_select.c:48:5: error: #error "PJ_IOQUEUE_MAX_HANDLES cannot be greater than FD_SETSIZE" In file included from ../src/pj/ioqueue_select.c:137:0: ../src/pj/ioqueue_common_abs.c: In function 'ioqueue_dispatch_write_event': ../src/pj/ioqueue_common_abs.c:257:25: error: storage size of 'addr' isn't known ../src/pj/ioqueue_common_abs.c:257:25: warning: unused variable 'addr' [-Wunused-variable] ../src/pj/ioqueue_select.c: In function 'rescan_fdset': ../src/pj/ioqueue_select.c:173:21: error: 'FD_SETSIZE' undeclared (first use in this function) ../src/pj/ioqueue_select.c:173:21: note: each undeclared identifier is reported only once for each function it appears in ../src/pj/ioqueue_select.c: In function 'pj_ioqueue_register_sock2': ../src/pj/ioqueue_select.c:377:5: warning: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration] ../src/pj/ioqueue_select.c:377:21: error: 'FIONBIO' undeclared (first use in this function) make[2]: *** [output/pjlib-arm-unknown-elf/ioqueue_select.o] Error 1 make[2]: Leaving directory `/home/hemanth/pjsip_comp/pjlib/build' make[1]: *** [libpj-arm-unknown-elf.a] Error 2 make[1]: Leaving directory `/home/hemanth/pjsip_comp/pjlib/build' make: *** [all] Error 1 [ root@hemanth:~/pjsip_comp# ]( mailto:root@hemanth:~/pjsip_comp# ) ************************************************************************************************************** Can anyone help me where i am going wrong in compiling my PJSIP, Thanks & Regards Hemanth
TC
Tzafrir Cohen
Wed, Dec 20, 2017 5:48 AM

On Fri, Dec 15, 2017 at 10:23:17AM +0530, hemanth@advaitamtech.com wrote:

Hello All,

I am trying to crosscompile PJSIP on UBUNTU for arm_qemu by installing arm toolchain following the link below

https://trac.pjsip.org/repos/wiki/ARM_QEMU

I'm not sure what "arm_qemu" is. Recent Debian and Ubuntu already have
an existing cross-compiling package for a system with no OS that uses
newlib (and uses a recent gcc). Try installing gcc-arm-none-eabi .

Any specific reason you installed gcc 4.6.1 and not a newer version?

--
Tzafrir Cohen
+972-50-7952406          mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com

On Fri, Dec 15, 2017 at 10:23:17AM +0530, hemanth@advaitamtech.com wrote: > > Hello All, > > I am trying to crosscompile PJSIP on UBUNTU for arm_qemu by installing arm toolchain following the link below > > [ https://trac.pjsip.org/repos/wiki/ARM_QEMU ]( https://trac.pjsip.org/repos/wiki/ARM_QEMU ) I'm not sure what "arm_qemu" is. Recent Debian and Ubuntu already have an existing cross-compiling package for a system with no OS that uses newlib (and uses a recent gcc). Try installing gcc-arm-none-eabi . Any specific reason you installed gcc 4.6.1 and not a newer version? -- Tzafrir Cohen +972-50-7952406 mailto:tzafrir.cohen@xorcom.com http://www.xorcom.com