From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9728 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl + libc++ Date: Tue, 22 Mar 2016 13:28:48 +0100 Message-ID: <20160322122848.GF9862@port70.net> References: <2C455331-61AF-4818-BB41-B95F911B3F48@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1458649772 10475 80.91.229.3 (22 Mar 2016 12:29:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2016 12:29:32 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9741-gllmg-musl=m.gmane.org@lists.openwall.com Tue Mar 22 13:29:25 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aiLQq-0007ZF-Gv for gllmg-musl@m.gmane.org; Tue, 22 Mar 2016 13:29:08 +0100 Original-Received: (qmail 13933 invoked by uid 550); 22 Mar 2016 12:29:01 -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 13912 invoked from network); 22 Mar 2016 12:29:00 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <2C455331-61AF-4818-BB41-B95F911B3F48@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9728 Archived-At: * Lei Zhang [2016-03-22 20:05:29 +0800]: > On Mar 22, 2016, at 7:48 PM, Luca Barbato wrote: > > > > On 22/03/16 04:43, Lei Zhang wrote: > >> 2016-03-22 7:39 GMT+08:00 Hayden Livingston : > >> > >>> Have folks gotten around using musl + libc++ (from the llvm project)? > >>> > >>> I'm trying to get a setup where all my dependencies can be moved to > >>> musl and libc++ to build static executables. > >>> > >> > >> I've tried to do about the same thing before and failed because libc++ > >> depends on some functions not implemented in musl yet, like strtoll_l() > >> and __printf_chk() IIRC. > > > > Nothing should directly use __printf_chk() how did you get that symbol > > there?. > > Well, I manually linked a toy C++ program with musl and libc++, and when I ran the program the dynamic linker complained about not finding a bunch of symbols, including strtoll_l, __printf_chk, etc. Perhaps I mistakenly messed musl with glibc somehow... > you probably used a libc++ built against glibc. that should work on x86_64 if you provide the missing symbols (e.g. LD_PRELOAD a dso with a dummy strtoll_l and __printf_chk). but it is better to build the entire toolchain for musl instead of doing musl-gcc like wrapping for c++ even if you can get the wrapper to work. e.g. a libstdc++ built against glibc works for simple things but can be broken for multi-threaded code.