From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6769 Path: news.gmane.org!not-for-mail From: "piranna@gmail.com" Newsgroups: gmane.linux.lib.musl.general Subject: Re: Failed to execute /init (error -2) for system-wide musl libc Date: Wed, 31 Dec 2014 20:49:06 +0100 Message-ID: References: <20141231193540.GD3156@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1420055387 443 80.91.229.3 (31 Dec 2014 19:49:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2014 19:49:47 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6782-gllmg-musl=m.gmane.org@lists.openwall.com Wed Dec 31 20:49:42 2014 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 1Y6PH1-0001rT-1c for gllmg-musl@m.gmane.org; Wed, 31 Dec 2014 20:49:39 +0100 Original-Received: (qmail 24019 invoked by uid 550); 31 Dec 2014 19:49:37 -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 24008 invoked from network); 31 Dec 2014 19:49:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=9oOF6b24urk6bGhx7yGsIIavZwdPNF3GAqCvZtEbcjQ=; b=y9pv14sWLNrq7VUe6VFWugE5LIaWPMjtMTbBsYE+yKKk137E72ac3J0+CujWFpWhvX J4hoejvX+gVfrehdAm2CTArEpZ+XFnu0vMcTB+Jk3NRmB8owwsxyOd4oQcd/CrkRAEs/ 6sLd+A/mekbyV57IPQhLqOgK6o2vuvDJZJUIPYnEu89Z3wqgxZ60sEInreFIMvNMaA+h 7crhpN7gQDucIJ0Ya/3d9nJDpiUtWUIa/fD4UdUwZdH7+xJYlE6lDwR4phnrVsYXYFuA 2N+YPWyFcfYUDyPXhkDD6wjfQGRjO6+w+MQ9lqmDfIcdgS7novlq81uImb7tXTauQ9jS GX8A== X-Received: by 10.180.81.7 with SMTP id v7mr117089576wix.74.1420055366188; Wed, 31 Dec 2014 11:49:26 -0800 (PST) In-Reply-To: <20141231193540.GD3156@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:6769 Archived-At: > i think if static init works then try to use > that to boot up the system and then debug the > dynamic case.. It's a good idea, didn't though about it :-) > you can run libc.so with a dynamic executable > as argument then you can debug the loader Definitely I can be able to use Node.js child_process module to launch libc.so, I'll try it :-) > if you have no debug tools on the target then > i think you can add dprintf's to early loader > code in src/ldso/dynlink.c which may help in > figuring out what fails It's just a Node.js REPL, so no debug tools here (at least, no C ones, like GDB), but knowing that src/ldso/dynlink.c has the code of the dynamic linker, add some debug printf's seems a good idea, I believe although it's in the boot process it should write some output to the console... >> executables compiled with the cross-toolchain works on our desktops >> but they don't on QEmu, and we've added all the dynamic libraries that >> readelf request (only libc.so, libstdc++.so & libgcc_s.so). As a > > libgcc_s.so shouldnt be needed It's shown as a dependency of libstdc++.so both by ldd and readelf -d. Maybe could this be the issue? Both libstdc++.so & libgcc_s.so are compiled against musl... >> curious side note, when installing the musl-linked gcc libraries, the >> /lib/ld-musl-i386.so.1 link dissapear from the cross-toochain folder, > > sounds like a clfs buildsystem issue Or CLFS, or gcc, but it's something curious because before the compilation of libstdc++.so & libgcc_s.so against musl the symbolic link is there, and after compile them the symbolic link has dissapear... It doesn't makes sense... :-/ > i've seen the symlink disappearing on openwrt buildsystem once > (that one was not deterministic) i'm not sure what caused it In my case is deterministic, allways happens on the libstdc++.so & libgcc_s.so generation step (more exactly, the make install on the cross-toolchain directory), checked by doing them by hand :-/ --=20 "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." =E2=80=93 Linus Tordvals, creador del sistema operativo Linux