Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160322122848.GF9862@port70.net>
Date: Tue, 22 Mar 2016 13:28:48 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: musl + libc++

* Lei Zhang <zhanglei.april@...il.com> [2016-03-22 20:05:29 +0800]:

> On Mar 22, 2016, at 7:48 PM, Luca Barbato <lu_zero@...too.org> wrote:
> > 
> > On 22/03/16 04:43, Lei Zhang wrote:
> >> 2016-03-22 7:39 GMT+08:00 Hayden Livingston <halivingston@...il.com>:
> >> 
> >>> 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.

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.