From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6767 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy 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:35:40 +0100 Message-ID: <20141231193540.GD3156@port70.net> References: 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 1420054558 20813 80.91.229.3 (31 Dec 2014 19:35:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2014 19:35:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6780-gllmg-musl=m.gmane.org@lists.openwall.com Wed Dec 31 20:35:54 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 1Y6P3h-0008RB-Vc for gllmg-musl@m.gmane.org; Wed, 31 Dec 2014 20:35:54 +0100 Original-Received: (qmail 17911 invoked by uid 550); 31 Dec 2014 19:35:52 -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 17903 invoked from network); 31 Dec 2014 19:35:52 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:6767 Archived-At: * piranna@gmail.com [2014-12-31 19:04:55 +0100]: > On NodeOS we are having some problems creating an i686 cross-compiler > using musl (https://github.com/NodeOS/NodeOS/pull/89). > > The point is that by generating a fully statically linked Node.js > executable it boot correctly, but by using a dynamically one we get a > "Failed to execute /init (error -2)" error. We have crafted the > cross-compiler following the instructions at > http://clfs.org/view/clfs-embedded with no lack. The fact is that i think if static init works then try to use that to boot up the system and then debug the dynamic case.. you can run libc.so with a dynamic executable as argument then you can debug the loader 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 > 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 > 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 i've seen the symlink disappearing on openwrt buildsystem once (that one was not deterministic) i'm not sure what caused it > but also adding it by hand all the dynamic linked executables refuse > to load on QEmu, also a simple "Hello World" that only depends on > libc.so :-/ > > We are getting out of ideas, any clue about what could be happening? > > Greetings, and Happy New Year :-)