|
Message-ID: <20161127113744.GY5749@port70.net> Date: Sun, 27 Nov 2016 12:37:44 +0100 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Cc: Sebastian Kemper <sebastian_ml@....net> Subject: Re: Robust shared mutexes? * Sebastian Kemper <sebastian_ml@....net> [2016-11-27 11:54:34 +0100]: > On Sun, Nov 27, 2016 at 12:01:10AM +0100, Szabolcs Nagy wrote: > > * Rich Felker <dalias@...c.org> [2016-11-26 17:56:18 -0500]: > > > On Sat, Nov 26, 2016 at 11:51:05PM +0100, Sebastian Kemper wrote: > > > > > > > > http://lists.openembedded.org/pipermail/openembedded-core/2016-March/119214.html > > > > > > > > It says musl doesn't have process shared mutexes so one should set > > > > apr_cv_process_shared_works=no. I take it that is correct? > > > > > > No, it's incorrect and I have no idea where that idea came from. I'll > > > ask Khem. > > > > > > > apr might care about sharing mutexes across i386 vs x86_64 ? > > > > that does not work (glibc ditto) > > Hello Szabolcs, list, > > I installed a Gentoo musl-1.1.15 x86_64 chroot on my computer. Then I > ran ./configure in apr-1.5.2 in the musl chroot and also outside the > chroot in a glibc-2.22 environment. > > The outcome was the same except for apr_cv_mutex_robust_shared: > > ac_cv_func_setpgrp_void musl yes glibc yes > ac_cv_file__dev_zero musl yes glibc yes > apr_cv_tcp_nodelay_with_cork musl yes glibc yes > apr_cv_mutex_recursive musl yes glibc yes > ac_cv_func_pthread_rwlock_init musl yes glibc yes > apr_cv_type_rwlock_t=yes musl yes glibc yes > apr_cv_process_shared_works musl yes glibc yes > apr_cv_mutex_robust_shared musl no glibc yes > > I've posted the corresponding part from config.log below. It fails > because musl doesn't define PTHREAD_MUTEX_ROBUST_NP (glibc does). And > apr uses PTHREAD_MUTEX_ROBUST_NP. It means that I should set > apr_cv_mutex_robust_shared=no when cross-compiling this apr, I suppose > :) the standard name is PTHREAD_MUTEX_ROBUST since posix2008, so this is an apr bug. > configure:25459: checking for robust cross-process mutex support > configure:25500: gcc -o conftest -g -O2 -DLINUX -D_REENTRANT -D_GNU_SOURCE conftest.c -lpthread >&5 > conftest.c: In function 'main': > conftest.c:197:47: error: 'PTHREAD_MUTEX_ROBUST_NP' undeclared (first use in this function) > if (pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST_NP)) > ^ i think they should use the standard name and provide their own definition on legacy systems #ifndef PTHREAD_MUTEX_ROBUST #define PTHREAD_MUTEX_ROBUST PTHREAD_MUTEX_ROBUST_NP #endif
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.