From patchwork Wed Nov 29 17:10:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABl_PORTAY?= X-Patchwork-Id: 842670 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yn6V11jZmz9s7B for ; Thu, 30 Nov 2017 04:10:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C7C7A880C9; Wed, 29 Nov 2017 17:09:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uftHsZVmzhP4; Wed, 29 Nov 2017 17:09:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id BA98687F51; Wed, 29 Nov 2017 17:09:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C8E5C1C3F9F for ; Wed, 29 Nov 2017 17:09:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C23F7895A1 for ; Wed, 29 Nov 2017 17:09:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x92GGoifussF for ; Wed, 29 Nov 2017 17:09:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by hemlock.osuosl.org (Postfix) with ESMTPS id ABE4489553 for ; Wed, 29 Nov 2017 17:09:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 205F99C2CF2; Wed, 29 Nov 2017 12:09:52 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id vnZQSUE5TQ7U; Wed, 29 Nov 2017 12:09:51 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 97B649C3184; Wed, 29 Nov 2017 12:09:51 -0500 (EST) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wsv2YFttMoAZ; Wed, 29 Nov 2017 12:09:51 -0500 (EST) Received: from archlinux.mtl.sfl (unknown [192.168.50.172]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 796249C2CF2; Wed, 29 Nov 2017 12:09:51 -0500 (EST) From: =?utf-8?q?Ga=C3=ABl_PORTAY?= To: buildroot@buildroot.org, "Yann E. MORIN" , "Thomas Petazzoni" Date: Wed, 29 Nov 2017 12:10:24 -0500 Message-Id: <20171129171024.26931-1-gael.portay@savoirfairelinux.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] support/dependencies: add check for c++ multilib X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Ga=C3=ABl_PORTAY?= Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some packages build C++ 32bits host-tools and need the g++-multilib to be installed on the build machine. As example, qt5webengine builds a C++ host-tool when target is 32bits. Add the check for g++-multilib to the dependencies script; and update the Dockerfile to install g++-multilib package. Signed-off-by: Gaƫl PORTAY --- There are two solutions to solve this issue: The first one consists in checking for g++-multilib when the config option BR2_HOSTARCH_NEEDS_IA32_COMPILER is set; even if it is not required. The implementation is simple (see patch below). The second solution consists in creating a new config option for packages that needs g++-multilib to be installed. As example: BR2_HOSTARCH_NEEDS_IA32_CXX_COMPILER is a good candidate. [For a matter of consistency, I would also rename BR2_HOSTARCH_NEEDS_COMPILER into BR2_HOSTARCH_NEEDS_IA32_C_COMPILER (adding C_); but I do not want to do that to not break existing configurations that are no in-tree]. Which solution do you prefer? support/dependencies/dependencies.sh | 8 ++++++++ support/docker/Dockerfile | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index a195c62c8c..f75ffb96c1 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -249,6 +249,14 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then echo "For other distributions, refer to their documentation." exit 1 fi + + if ! echo "int main(void) {}" | gcc -m32 -x cpp - -o /dev/null 2>/dev/null; then + echo + echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries." + echo "If you're running a Debian/Ubuntu distribution, install the g++-multilib package." + echo "For other distributions, refer to their documentation." + exit 1 + fi fi # Check that the Perl installation is complete enough for Buildroot. diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile index d45b23dc23..e975e66eb2 100644 --- a/support/docker/Dockerfile +++ b/support/docker/Dockerfile @@ -15,7 +15,7 @@ RUN dpkg --add-architecture i386 # The container has no package lists, so need to update first RUN apt-get update -y -qq RUN apt-get install -y -qq --no-install-recommends \ - build-essential cmake libc6:i386 gcc-multilib \ + build-essential cmake libc6:i386 g++-multilib \ bc ca-certificates file locales rsync \ cvs bzr git mercurial subversion wget \ cpio unzip \