From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10749 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Robust shared mutexes? Date: Sun, 27 Nov 2016 12:37:44 +0100 Message-ID: <20161127113744.GY5749@port70.net> References: <20161126214943.GA2635@hotdamn.lan> <20161126222443.GV1555@brightrain.aerifal.cx> <20161126225104.GA2151@hotdamn.lan> <20161126225617.GW1555@brightrain.aerifal.cx> <20161126230110.GX5749@port70.net> <20161127105425.GA14788@hotdamn.lan> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1480246684 17636 195.159.176.226 (27 Nov 2016 11:38:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 27 Nov 2016 11:38:04 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) Cc: Sebastian Kemper To: musl@lists.openwall.com Original-X-From: musl-return-10762-gllmg-musl=m.gmane.org@lists.openwall.com Sun Nov 27 12:37:59 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cAxmO-0003VQ-V0 for gllmg-musl@m.gmane.org; Sun, 27 Nov 2016 12:37:57 +0100 Original-Received: (qmail 32554 invoked by uid 550); 27 Nov 2016 11:37:58 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 32514 invoked from network); 27 Nov 2016 11:37:56 -0000 Mail-Followup-To: musl@lists.openwall.com, Sebastian Kemper Content-Disposition: inline In-Reply-To: <20161127105425.GA14788@hotdamn.lan> Xref: news.gmane.org gmane.linux.lib.musl.general:10749 Archived-At: * Sebastian Kemper [2016-11-27 11:54:34 +0100]: > On Sun, Nov 27, 2016 at 12:01:10AM +0100, Szabolcs Nagy wrote: > > * Rich Felker [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