[asterisk-dev] Update: Cross-compiling woes under openWRT

Vadim Lebedev vadim at mbdsys.com
Mon Sep 3 09:56:23 CDT 2007


Brian Capouch wrote:
> Bad news.  I just fetched trunk r81419 and not only are all the problems 
> I mentioned in the email last week on this topic still there; there's 
> another new one, and this time I can't overcome it to get things to build.
>
>   
>> Brian Capouch wrote:
>>
>>     
>>> 1. The openWRT build system now whines about virtually all the 
>>> individual ~/app, ~/res, etc. .c files, with the following message on 
>>> the console as each is encountered:
>>>
>>> <built-in>:0: note: someone does not honour COPTS correctly, passed 0 times
>>>       
>> Russell Bryant wrote:
>> From some quick googling, it looks like this build system passes in custom
>> target CFLAGS in the COPTS variable.  I tweaked the Makefile in 1.4 and trunk to
>> add the contents of COPTS to CFLAGS.  This should fix it.
>>
>>     
>
> The build system still kicks out the COPTS warning as it processes each 
> .c file.
>
>   
>>> 2. I couldn't get the build to go at all until I added this code to the 
>>> bottom of the files ~/utils/extconf.c and ~utils/check_expr.c:
>>>
>>> AST_MUTEX_DEFINE_STATIC(fetchadd_m); /* used for all fetc&add ops */
>>> int ast_atomic_fetchadd_int_slow(volatile int *p, int v)
>>>       
>   . . . .
>   
>> This should be fixed in trunk rev 80262.  I didn't make the change in 1.4
>> because I wasn't sure the problem existed there or not.  If you find that it is,
>> I'll backport it.
>>
>>     
>
> I still have to add the function ast_atomic_fetchadd_int_slow() to both 
> extconf.c and check_expr.c to get the compiler to proceed.
>
> After kludging up the above fixes, the build now stops here:
>
> In file included from 
> /usr/src/brianc/trunk/staging_dir/toolchain-mipsel_gcc4.1.2/lib/gcc/mipsel-linux-uclibc/4.1.2/../../../../mipsel-linux-uclibc/sys-include/stdio.h:72,
>                   from 
> /usr/src/brianc/trunk/build_dir/mipsel/asterisk-svn-trunk/include/asterisk/utils.h:29,
>                   from astobj2.c:25:
> /usr/src/brianc/trunk/staging_dir/toolchain-mipsel_gcc4.1.2/lib/gcc/mipsel-linux-uclibc/4.1.2/../../../../mipsel-linux-uclibc/sys-include/bits/uClibc_stdio.h:278: 
> error: expected specifier-qualifier-list before 
> 'use_ast_mutex_t_instead_of_pthread_mutex_t'
> make[4]: *** [astobj2.o] Error 1
> make[3]: *** [main] Error 2
> make[3]: Leaving directory 
> `/usr/src/brianc/trunk/build_dir/mipsel/asterisk-svn-trunk'
>
> I wish I could fix this stuff up on my own, but I can't.  I hope 
> reporting it is of some use anyways.
>
> Thanks.
>
> b.
>
>
>
>
>
>   
Brian

It's a wild guess, but i suggest you add #include <stdio.h> at the 
beginning of astobj2.c

Thanks
Vadim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070903/9ee1cd62/attachment.htm 


More information about the asterisk-dev mailing list