From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1260 Path: news.gmane.org!not-for-mail From: idunham@lavabit.com Newsgroups: gmane.linux.lib.musl.general Subject: Re: Hello Date: Sat, 7 Jul 2012 11:54:08 -0400 (EDT) Message-ID: <3929.50.0.229.11.1341676448.squirrel@lavabit.com> References: <20120607200123.402a1672@sibserver.ru> <4FD0A902.6070108@barfooze.de> <20120607231831.66c78c33@sibserver.ru> <4FD0D6D9.5080707@barfooze.de> <20120607161928.GE163@brightrain.aerifal.cx> <20120608011516.0b5fca7d@sibserver.ru> <20120608033141.GH163@brightrain.aerifal.cx> <20120706012417.5ae680f0@sibserver.ru> <20120705233457.GR544@brightrain.aerifal.cx> <20120706140601.252e4e83@sibserver.ru> <20120706062614.GS544@brightrain.aerifal.cx> <20120706162205.5c72cd6a@sibserver.ru> <35058.132.241.65.68.1341616457.squirrel@lavabit.com> <20120707160740.49a91c85@sibserver.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1341676466 27243 80.91.229.3 (7 Jul 2012 15:54:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2012 15:54:26 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1261-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jul 07 17:54:23 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SnXKw-0004MD-3I for gllmg-musl@plane.gmane.org; Sat, 07 Jul 2012 17:54:22 +0200 Original-Received: (qmail 11957 invoked by uid 550); 7 Jul 2012 15:54:21 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11946 invoked from network); 7 Jul 2012 15:54:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=aeSfxifINVE9H5d/dTqXIyjl5jH0LdznMSn5N38NiNTbxhHbAI0D+PAXGCMRf1/C9c1nzj6WCwxaVDiIyGdyQihsUd09rmiOe/xTcPtiRKmcc+pWssVs52L+mVbxvmuBAO4JqnhhP2LL7JB2leb2iKOwxnni0PM6B1FRnAWzHeo=; h=Message-ID:In-Reply-To:References:Date:Subject:From:To:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20120707160740.49a91c85@sibserver.ru> User-Agent: SquirrelMail/1.4.13 Xref: news.gmane.org gmane.linux.lib.musl.general:1260 Archived-At: > On Fri, 6 Jul 2012 16:14:17 -0700 (PDT) > idunham@lavabit.com wrote: > >> >> > gtk2 will not work that way, I checked. One library in chain >> >> > requires libstdc++, libstdc++ defines 'unique' symbols (see >> >> > manual page of binutils nm) which musl linker cannot handle. >> >> > Additionally, there is much more missing symbols including >> >> > missing functions. But plain X11 apps worked (I checked xfontsel >> >> > and xlogo). >> >> >> >> Have you looked into building the apps/libs natively against musl >> >> except for the nvidia binary blob, to see if the blob works under >> >> that usage? I think that's a usage case that's a lot more >> >> applicable to real-world usage of musl, and in fact it's probably >> >> the first real reason anybody would be interested in having musl >> >> work with code that was built against glibc... >> The first step would probably be dropping a musl-compatible (generic, >> not gnu-linux) libstdc++ into the test environment. > > Bootstrapping libstdc++ I think even more nightmarish than dealing with > pkg-config or autohell, since this library is part of gcc. So I went in > another way: I've taken my package cache and relinked gtk2 and pango, > now they do not depend on libstdc++ (since they do not import things > from that library. Why they were linked to it - is another open > question.) Apparently this wouldn't be ABI compatible (IE-don't bother trying), but it isn't too hard: apply the musl patches, then (if they don't already do this) cd libstdc++-v3/os; rm gnu-linux; cp generic gnu-linux; cd - > After some dancing around undefined symbols I've got not-so-big list: > > __res_init(), __res_iclose(), inet_nsap_ntoa(), __res_maybe_init(), > initstate_r(), random_r() and stuff related to pthread scheduling: > pthread_setschedparam(), pthread_getschedparam(). > > Since that gtk2 and it's stuff do not require libstdc++ to work I'll > try to build them against musl. >> Also, I often set up a chroot with musl and build under that. If >> you'd rather not build the whole chroot yourself, you can prepare a >> chroot and follow the installation notes for converting a glibc-based >> system, using the chroot environment instead of a full install (this >> works well with Debian). >> If you do this, make sure not to do a plain cp of the system >> libraries; this would mess up the sonames, since lib*.so must be >> symlinks to lib*.so.. It also really messes with ldconfig. > > Converting existing system maybe possible, but I will prefer to rebuild > all the stuff from scratch with musl and (possibly in future) with > different compiler(s) (I really tired from gcc/binutils, but there > seems no any alternatives written in C and able to build major > software like gtk2 and Linux kernel). Converting will be possible when > musl will be binary compatible with glibc, but this is not primary > goal. As a bonus, maybe. One issue here was that binary nvidia blob > that can be needed even after rebuild on desktop, so missing interfaces > were not big deal with it. Other things can be patched/recompiled. Converting a system (as described in musl/INSTALL) does not mean replacing libc; it means a parallel install of musl, move system libs out of the default search path, then change gcc to use musl by default. It would work even with an ABI-incompatible libc, since you leave ld-linux alone.