From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11033 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ld-musl-i386.so.1 disappear after gcc install Date: Sun, 12 Feb 2017 22:26:28 -0500 Message-ID: <20170213032628.GF1520@brightrain.aerifal.cx> References: <000301d285a0$885689c0$99039d40$@binbones.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1486956408 1627 195.159.176.226 (13 Feb 2017 03:26:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2017 03:26:48 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11048-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 13 04:26:44 2017 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 1cd7Hk-0008J2-Oa for gllmg-musl@m.gmane.org; Mon, 13 Feb 2017 04:26:40 +0100 Original-Received: (qmail 17422 invoked by uid 550); 13 Feb 2017 03:26:44 -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 16374 invoked from network); 13 Feb 2017 03:26:43 -0000 Content-Disposition: inline In-Reply-To: <000301d285a0$885689c0$99039d40$@binbones.com> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11033 Archived-At: On Mon, Feb 13, 2017 at 03:26:07AM +0100, Romain wrote: > Hello, > > I try to create a script to cross-build a small linux based on musl. > (https://github.com/rom1nux/zydux-forge) > > Basically I first create my cross toolchain in 3 steps > > 1 – Build static gcc (first pass) > 2 – Build musl > 3 – Build dynamic gcc (second pass) > > When I build musl, I can find the loader ld-musl-i386.so.1 this is a link to > /lib/libc.so > But when I do the second pass of gcc the ld-musl-i386.so.1 is removed at the > gcc “make install” > > I create a watch with “audit” to see what process remove the file, and it > seem that /sbin/ldconfig.real remove the loader, I don’t understand why. > (I fix this by creating my own link, and I can start my target, but I don’t > understand what append) > > My host : > Ubuntu 16.04 > Arch : x86_64 > Kernel : 4.4.0 > Gcc : 5.4 (x86_64-linux-gnu-gcc) > > My Cross/Target : > Arch : x86 > Kernel : 4.9.7 > Gcc : 6.3.0 (i486-linux-musl-gcc) > Musl : 1.1.16 > > Can you help me to understand why the linker ld-musl-i386.so.1 is removed > by /sbin/ldconfig.real, and how to avoid this ? Where did ldconfig.real come from? If it's part of the Ubuntu system you're compiling from, it shouldn't be getting run on the cross-target at all; my guess would be that something in your build process is unaware that you're cross-compiling. If it's part of the target musl system then it should not even exist; ldconfig is a glibc thing. Rich