From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 286131384B4 for ; Mon, 14 Dec 2015 07:25:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C419421C00E; Mon, 14 Dec 2015 07:25:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5037421C00E for ; Mon, 14 Dec 2015 07:25:45 +0000 (UTC) Received: from greysprite.dite (cpe-74-77-145-97.buffalo.res.rr.com [74.77.145.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: blueness) by smtp.gentoo.org (Postfix) with ESMTPSA id E0628340875 for ; Mon, 14 Dec 2015 07:25:43 +0000 (UTC) Subject: Re: [gentoo-releng] Uclibc chroots and catalyst To: gentoo-releng@lists.gentoo.org References: <566E682B.4020601@gentoo.org> From: "Anthony G. Basile" X-Enigmail-Draft-Status: N1110 Message-ID: <566E6EF3.9010805@gentoo.org> Date: Mon, 14 Dec 2015 02:25:39 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-releng@lists.gentoo.org Reply-to: gentoo-releng@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <566E682B.4020601@gentoo.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4ae8de7b-8a39-48ca-92ef-55be3f169875 X-Archives-Hash: f6f6c8d969516852e25674db128f614f On 12/14/15 1:56 AM, Joshua Kinard wrote: > I am curious to know if anyone has had any odd issues with using Gentoo= 's > releng tool, catalyst, to build Uclibc-based stages before. > > I was attempting to resurrect MIPS-III, big-endian stages once more usi= ng an > old ~2012 mips3 seed stage that Anthony Basile put together a while bac= k. I > started by manually updating the seed to be current (sans ncurses-6.x),= and > that all worked out fine. I then fed that seed stage into Catalyst to = build a > new stage1, and that also worked fine. > > But when I went to run the stage2 spec, it failed due to bash generatin= g a > segfault via an attempted NULL pointer dereference. So I manually test= ed by > attempting to chroot into the /tmp/stage1root directly, and that's also= > segfaulting. I can run other executables within the stage1root via chr= oot > directly, but it appears that anything linked to ncurses is triggering = a segfault. > > The original stages were built with gcc-5.3, so I fell back to gcc-4.8.= 5, but > the segfaults are still happening. I forced the stage1root to upgrade = to > ncurses-6.0, but that isn't working either. I manually remerged bash b= y > setting ROOT=3D"/tmp/stage1root", but it's linking against /lib/libncur= ses.so.5 > from the seed root instead of /lib/libncurses.so.6 in the stage1root. > > Not sure how to work around this. Everything in the seed root works fi= ne. If > I manually merge select packages into a different $ROOT (uclibc, ncurse= s, bash, > readline, libiconv), then copy libgcc_s.so into $ROOT/lib manually, I c= an > execute bash there just fine. So part of the problem may also be in ho= w > catalyst's stage1 script is merging the packages into $ROOT. > > Thoughts? > because mips is ~arch we are always building the cutting edge which is going to get you into trouble. without knowing what's cauing the seg fault, its hard to proceed. you can `strace chroot /path ` but this may bog down in some heavy debugging. i'd just start with the original stage, keep updates back by masking in /etc/portage and emerging that way. take a look in the releng git repo I have some scripts for automating stage1-2-3 with a customized /etc/portage directory. putting stuff in /etc/portage for our stage's is evil, but its sometimes a necessary evil. (vapier opened a bug about it.) --=20 Anthony G. Basile, Ph.D. Gentoo Linux Developer [Hardened] E-Mail : blueness@gentoo.org GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA GnuPG ID : F52D4BBA