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 E208813800E for ; Thu, 2 Aug 2012 18:09:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 45C71E07A7 for ; Thu, 2 Aug 2012 18:09:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1DAC0E0029 for ; Thu, 2 Aug 2012 16:14:39 +0000 (UTC) Received: from [192.168.1.101] (dynamic-adsl-84-221-248-233.clienti.tiscali.it [84.221.248.233]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lu_zero) by smtp.gentoo.org (Postfix) with ESMTPSA id 0D5331B402E; Thu, 2 Aug 2012 16:14:37 +0000 (UTC) Message-ID: <501AA76B.6050608@gentoo.org> Date: Thu, 02 Aug 2012 18:14:35 +0200 From: Luca Barbato User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120801 Thunderbird/14.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-soc@lists.gentoo.org Reply-to: gentoo-soc@lists.gentoo.org MIME-Version: 1.0 To: Jing Huang CC: gentoo-soc@lists.gentoo.org Subject: [gentoo-soc] Re: cross_container_support - progress report #9 References: <50183267.5050800@gentoo.org> In-Reply-To: X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: ddd32391-c7c0-46ca-ab94-e34b02b1a46d X-Archives-Hash: 3e71ff05414b3eab3cc777765c2b0122 On 08/02/2012 05:23 PM, Jing Huang wrote: > Hmm.. The root cause of this fault is: > > ./x86-program(built with dynamic libraries) > -->load_elf_binary() > -->open_exec("/lib/ld-linux.so.2"); > > lxc chroot lacks of /lib/ld-linux.so.2. This problem is a difficult > one. In my opinion, the following two steps are essential to solve it. > > 1. alter linker script to build x86-program using custom ld-linux.so.2 > path ( /target/lib/ld-linux.so.2 ). > Overriding it is an interesting task, for the time being try mixing amd64 and arm binaries, they use /lib and /lib64 so it is fine. > 2. switch dynamic libraries to custom paths. > This point is relatively easy. I could use either LD_LIBRARY_PATH or > ld.so.conf. > > "ldconfig /etc/ld.so.conf" is odd. I had altered ld.so.conf and > env.d/00basic to exclude original library path(/lib, /usr/lib, > /usr/local/lib), but the new generated cache file still include these > paths. > Unfortunately, linker will link libraries accroding to the ld cache > file unless declare the DT_RPATH and LD_LIBRARY_PATH. Yes, it is one of the issue to investigate. lu