From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6780 Path: news.gmane.org!not-for-mail From: Andy Lutomirski Newsgroups: gmane.linux.lib.musl.general Subject: Re: Failed to execute /init (error -2) for system-wide musl libc Date: Sat, 03 Jan 2015 15:37:57 -0800 Message-ID: <54A87D55.8010600@amacapital.net> References: 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: 8bit X-Trace: ger.gmane.org 1420328299 22743 80.91.229.3 (3 Jan 2015 23:38:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 Jan 2015 23:38:19 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6793-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jan 04 00:38:15 2015 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 1Y7YGt-0000nc-8a for gllmg-musl@m.gmane.org; Sun, 04 Jan 2015 00:38:15 +0100 Original-Received: (qmail 26318 invoked by uid 550); 3 Jan 2015 23:38:13 -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 26306 invoked from network); 3 Jan 2015 23:38:12 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=BwRAfkSzAkelY8z5dw8HRAqiTAOAacOxvVOQw/NA+Mc=; b=IUvN7fTHdCbvNlF81/IYXb3rmC10uv2O7YCGcPf6PsST/nkY72wB21k9nBqBhR8969 BXXpR2ucSGxUW63TVjsKzDhe6RPLWFp4fW+PQYpA8PSOuIF0uIPcQAsgg/m6QRSRliyr SYlOFlsJgaTzQp8CRO9jtTKha6TOjjCK3jgjzpsvx25UcGt7Bql33DebOFBPeN51Rg/a vsz4CwvYv6nCX/zS1sjOLuQZCopF6zgNQDxe8DffoZUTzJ+8BZT7J2SuwMGSs+IVhkLD mDwG+bVl0GX+tgslhyqyzRbHukItH8cTyPO9fjjuRxav0HHcwAsDvgba3wn1DnZsAHsV Zo6g== X-Gm-Message-State: ALoCoQmj73zIDi+UGCGa0iKhwZCyJatlaSeFwVrKRZND/1Vf/5g2hg5RASDe2mxgCHw+6fETHPwW X-Received: by 10.70.15.68 with SMTP id v4mr132121096pdc.21.1420328280922; Sat, 03 Jan 2015 15:38:00 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:6780 Archived-At: On 12/31/2014 10:04 AM, piranna@gmail.com wrote: > 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 > 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 > curious side note, when installing the musl-linked gcc libraries, the > /lib/ld-musl-i386.so.1 link dissapear from the cross-toochain folder, > 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 :-) > > Jesús Leganés Combarro "piranna" > > To debug init problems, it might help a lot to run your init in a container under strace. For example: $ unshare -r -p -f # strace chroot /my_rootfs /sbin/init --Andy