From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13415 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Problems with pthreads from a shared object? Date: Thu, 8 Nov 2018 10:17:15 -0500 Message-ID: <20181108151715.GA5150@brightrain.aerifal.cx> References: <20181107233142.GV5150@brightrain.aerifal.cx> <20181107234526.GW5150@brightrain.aerifal.cx> <20181108004312.GX5150@brightrain.aerifal.cx> 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 1541690126 22077 195.159.176.226 (8 Nov 2018 15:15:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Nov 2018 15:15:26 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-13431-gllmg-musl=m.gmane.org@lists.openwall.com Thu Nov 08 16:15:22 2018 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 1gKm1f-0005YN-NE for gllmg-musl@m.gmane.org; Thu, 08 Nov 2018 16:15:19 +0100 Original-Received: (qmail 5316 invoked by uid 550); 8 Nov 2018 15:17:28 -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 5295 invoked from network); 8 Nov 2018 15:17:28 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:13415 Archived-At: On Thu, Nov 08, 2018 at 09:53:38AM -0500, Barry Flartus wrote: > > > > Sorry to butt-in. > > > > Alpine Linux uses musl. BF won't need anything special to use or > > exercise musl (and certainly won't need to worry about > > cross-pollination). > > > > Jeff, no worries about butting in. Could you clarify your statement? > Im not quite sure I understand your cross-pollination analogy :) I think it would be helpful to understand what you're trying to do. If your goal is just ensuring your application is compatible with musl so that it can be built and used on musl-based systems/distros, using one (such as Alpine, or Adelie, or Void with musl, or Sabotage, etc.), possibly in a container, is going to be the easiest way to achieve that. If your goal is building an application with musl and dlopen'd modules that you can deploy to systems that might or might not be musl-based, this can be done, but requires using dynamic linking and some glue for explicitly running the dynamic linker, since it can't be found via a fixed absolute path the way 'native' dynamic linking works. If your goal is to get around the glibc limitation that loading libpthread dynamically doesn't work, trying to use musl to produce .so files that use threads that glibc-linked programs can load, this simply does not, and cannot, work. A much better simpler solution is just ensuring the main program always links with -lpthread when using glibc. Rich