Hi Roberto,
On 14.04.2011 17:36, Roberto De Ioris wrote:
> Il giorno 14/apr/2011, alle ore 16.32, Leonid Borisenko ha scritto:
>
>> I've been successful in compiling uWSGI 0.9.7.2 on OpenWRT 8.09 (it's
>> 2-year old stable version, I'm tied to it and can't update to trunk
>> now). I've compiled it for mipsel architecture with uClibc 0.9.30.3.
>>
>> But uWSGI exits soon after start with message 'unable to share mutex'.
>>
>> As I understand, this is not bug, but expected error, as ordinary
>> uClibc doesn't support PTHREAD_PROCESS_SHARED flag in
>> pthread_mutexattr_setpshared function. So I should investigate for
>> possibility to recompile uClibc with NPTL support.
>>
>> But I want to know, how strong is requirement of
>> PTHREAD_PROCESS_SHARED? Can uWSGI be somehow trivially changed to
>> compile without using of PTHREAD_PROCESS_SHARED or removing of this flag
>> will introduce massive rewriting of codebase?
>
> edit builconf/default.ini and change locking from 'auto' to 'flock' (this is
> the way used by NetBSD/OpenBSD)
Thanks, it works with locking = flock!
>> BTW, some patching was required to compile uWSGI on uClibc 0.9.30.3.
>> If you are interested, look at attached patch.
>
>
> i will apply it soon, thanks
After more careful looking at uClibc source, my patch is seeming to be
overnaive. uClibc is definitely supports sched_setaffinity [1], but just
not in my case.
Sorry, I can't suggest more general patch.
JFYI, here are compilation errors which were fixed by my patch:
cc1: warnings being treated as errors
uwsgi.c: In function 'uwsgi_start':
uwsgi.c:2067: warning: implicit declaration of function 'CPU_ZERO'
uwsgi.c:2076: warning: implicit declaration of function 'CPU_SET'
uwsgi.c:2080: warning: implicit declaration of function
'sched_setaffinity'
I've compiled uWSGI in OpenWRT-based environment (downloaded from [2])
and tested it on Realtek RT3052-based router.
[1]
http://git.uclibc.org/uClibc/commit/?id=d8761c147db463209939f7c6a11da3a6fb1feecf
[2]
http://dl1.web.zyxel.ru/001/Keenetic/firmware/zyxel_keenetics_gpl_v.1.00_2_D0.tar.bz2
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi