[sr-dev] Kamailio master build failing on Raspberry Pi (raspbian)

Konstantin M. evilzluk at gmail.com
Wed Sep 11 11:14:19 CEST 2013


Hi Peter,
Adding CC_EXTRA_OPTS=-DNOSMP to make command (example: make
CC_EXTRA_OPTS=-DNOSMP) solves the problem, even don't need to modify def's,
unless the system can't recognize this fact.
But also need to deal with the following:

During a compilation you'll get something like:
/tmp/ccr4MEib.s:5860: Warning: swp{b} use is deprecated for this
architecture

The swp{b} instruction is deprecated in ARMv6 and above. Worse, it isn't
supported at all in ARMv7 and is fixed up in the illegal instruction trap
in the Linux kernel - at some runtime cost. Your compiler should absolutely
not be generating it. Since raspi is armb6 arch - this warning will be
silently ignored, but if you'll build on cubieboard (A10/A20) - it will be
a catastrophe.

Regarding to SMP to ARMv6 - there is no SMP support. The SMP is only above
ARM9.







2013/9/11 Peter Dunkley <peter.dunkley at crocodilertc.net>

> Hi Konstantin,
>
> I used the latest raspbian distribution downloaded from
> www.raspberrypi.org and the commands:
> make cfg
> make
>
> This produced the error output I reported.
>
> Making the change to Makefile.defs fixed that problem for me.
>
> Presumably you had to set some extra options when compiling? So the
> question is, should I commit the change to Makefile.defs to make the
> compile work without extra options required?
>
> The only reason not to make the change would be if someone has, or expects
> to have, an arm6 device with SMP support.
>
> Regards,
>
> Peter
>
> --
> Peter Dunkley
> Technical Director
> Crocodile RCS Ltd
>
> On 10 Sep 2013, at 23:49, "Konstantin M." <evilzluk at gmail.com> wrote:
>
> I just successfuly compiled master on raspi:
>
> root at raspberrypi:/usr/local/src/kamailio#
> /opt/kamailio-master/sbin/kamailio -V
> version: kamailio 4.1.0-dev8 (arm6/linux) 6f1720
> flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
> USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT-NOSMP, USE_DNS_CACHE, USE_DNS_FAILOVER,
> USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> id: 6f1720
> compiled on 23:49:15 Sep 10 2013 with gcc 4.6.3
>
> root at raspberrypi:/usr/local/src/kamailio# lsb_release -a
> No LSB modules are available.
> Distributor ID: Debian
> Description:    Debian GNU/Linux 7.1 (n/a)
> Release:        7.1
> Codename:       n/a
>
>
>
> 2013/9/10 Konstantin M. <evilzluk at gmail.com>
>
>> At Mar, 14 I have posted:
>> ---------------
>> Hi,
>>
>> Successfully compiled on Raspberry PI for armv6(hf).
>>
>> root at rpi:/opt/kamailio# ./sbin/kamailio -V
>> version: kamailio 4.1.0-dev1 (arm6/linux) 7d46ff
>> flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
>> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
>> USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT-NOSMP, USE_DNS_CACHE, USE_DNS_FAILOVER,
>> USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
>> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>> id: 7d46ff
>> compiled on 22:47:35 Mar 13 2013 with gcc 4.6.3
>>
>> A process of compilation is exactly the same, but need to add
>> CC_EXTRA_OPTS=-DNOSMP because SMP is not supported for arm atomic
>> operations.
>>
>> You can add this remark in WIKI if you need.
>>
>>
>>
>> 2013/9/10 Peter Dunkley <peter.dunkley at crocodilertc.net>
>>
>>>  Hello,
>>>
>>> I am trying to build a Kamailio Raspberry Pi for my presentation at
>>> AstriCon but the build fails on the very first file (action.c).  This was
>>> working before (although I was using Fedora on the Pi last time).
>>>
>>> Has anyone changed anything recently or have any ideas about this?
>>>
>>> It may be as simple as tweaking the build arguments, but as this worked
>>> for me before I thought I'd ask first...
>>>
>>> Here is the build output:
>>> CC (gcc) [kamailio] action.o
>>> In file included from parser/../mem/../atomic/atomic_native.h:74:0,
>>>                  from parser/../mem/../futexlock.h:44,
>>>                  from parser/../mem/../lock_ops.h:85,
>>>                  from parser/../mem/shm_mem.h:75,
>>>                  from parser/../ut.h:64,
>>>                  from parser/../ip_addr.h:50,
>>>                  from parser/msg_parser.h:61,
>>>                  from select.h:38,
>>>                  from route_struct.h:47,
>>>                  from action.h:42,
>>>                  from action.c:69:
>>> parser/../mem/../atomic/atomic_arm.h:69:2: warning: #warning SMP not
>>> supported for arm atomic ops, try compiling with -DNOSMP [-Wcpp]
>>> In file included from parser/../mem/../atomic/atomic_arm.h:81:0,
>>>                  from parser/../mem/../atomic/atomic_native.h:74,
>>>                  from parser/../mem/../futexlock.h:44,
>>>                  from parser/../mem/../lock_ops.h:85,
>>>                  from parser/../mem/shm_mem.h:75,
>>>                  from parser/../ut.h:64,
>>>                  from parser/../ip_addr.h:50,
>>>                  from parser/msg_parser.h:61,
>>>                  from select.h:38,
>>>                  from route_struct.h:47,
>>>                  from action.h:42,
>>>                  from action.c:69:
>>> parser/../mem/../atomic/atomic_unknown.h:59:2: warning: #warning no
>>> native memory barrier implementations, falling back to slow lock based
>>> workarround [-Wcpp]
>>> parser/../mem/../atomic/atomic_unknown.h:64:1: error: unknown type name
>>> ‘gen_lock_t’
>>> In file included from parser/../mem/../atomic/atomic_native.h:74:0,
>>>                  from parser/../mem/../futexlock.h:44,
>>>                  from parser/../mem/../lock_ops.h:85,
>>>                  from parser/../mem/shm_mem.h:75,
>>>                  from parser/../ut.h:64,
>>>                  from parser/../ip_addr.h:50,
>>>                  from parser/msg_parser.h:61,
>>>                  from select.h:38,
>>>                  from route_struct.h:47,
>>>                  from action.h:42,
>>>                  from action.c:69:
>>> parser/../mem/../atomic/atomic_arm.h: In function ‘mb_atomic_get_int’:
>>> parser/../mem/../atomic/atomic_arm.h:229:2: warning: implicit
>>> declaration of function ‘lock_release’ [-Wimplicit-function-declaration]
>>> parser/../mem/../atomic/atomic_arm.h:229:2: warning: implicit
>>> declaration of function ‘lock_get’ [-Wimplicit-function-declaration]
>>> make: *** [action.o] Error 1
>>>
>>> Regards,
>>>
>>> Peter
>>>
>>> --
>>> Peter Dunkley
>>> Technical Director
>>> Crocodile RCS Ltd
>>>
>>> _______________________________________________
>>> sr-dev mailing list
>>> sr-dev at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>>
>>>
>>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20130911/008d14ee/attachment.html>


More information about the sr-dev mailing list