From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPTCX-0008CW-AK for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:28:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPTCR-0007KE-B6 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:28:36 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:37404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPTCQ-0007Jd-Ee for qemu-devel@nongnu.org; Tue, 19 Jul 2016 07:28:31 -0400 Received: by mail-wm0-x231.google.com with SMTP id i5so22566732wmg.0 for ; Tue, 19 Jul 2016 04:28:29 -0700 (PDT) References: <1468916208-18668-1-git-send-email-famz@redhat.com> <1468916208-18668-3-git-send-email-famz@redhat.com> <20160719110645.GF21295@redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <20160719110645.GF21295@redhat.com> Date: Tue, 19 Jul 2016 12:28:29 +0100 Message-ID: <87fur5n9ya.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v6 2/8] tests/docker/docker.py: support --include-executable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Fam Zheng , qemu-devel@nongnu.org Daniel P. Berrange writes: > On Tue, Jul 19, 2016 at 04:16:42PM +0800, Fam Zheng wrote: >> From: Alex Bennée >> >> When passed the path to a binary we copy it and any linked libraries (if >> it is dynamically linked) into the docker build context. These can then >> be included by a dockerfile with the line: >> >> # Copy all of context into container >> ADD . / >> >> This is mainly intended for setting up foreign architecture docker >> images which use qemu-$arch to do cross-architecture linux-user >> execution. It also relies on the host and guest file-system following >> reasonable multi-arch layouts so the copied libraries don't clash with >> the guest ones. > > So that's going to fail on anything other than Debian derivatives, > since they'll be using /usr/lib or /usr/lib64 for all arches. Well currently we only have a bootstrap for Debian anyway. However it doesn't preclude you from using -static builds if you want. Is Debian really the only multi-arch supporting distro out there? For example I tested this in Arch as well. I'm fairly sure Gentoo is doing it right too. > IMHO it'd be better to simply reject use of qemu-$arch if it is > not statically linked, rather than trying to deal with fact that > libraries between host FS and foreign guest arch FS may clash. > > All distros except Fedora have long provided static qemu-$arch > builds and I've recently improved Fedora to also provide static > qemu$arch builds in F24 & rawhide. That's great but we also want to test our built qemus. For example the hot-path stuff has all been tested inside docker containers because it makes the setting up of test cases a lot simpler and reproducible. > > So I don't see much compelling reason to support dynamically > linked qemu-$arch binaries - it'll just cause pain & suffering > with clashing libs on many distros. I do, because I built with dynamic libs all the time for system emulation. This way it is simple to build test other arches when I'm making system emulation changes without having to constantly switch from one build configuration to another. I'll look into if there is any way we can do better with warnings on non-multiarch systems? -- Alex Bennée