From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6599908608985530368 X-Received: by 2002:a50:ed18:: with SMTP id j24-v6mr455763eds.5.1538131629301; Fri, 28 Sep 2018 03:47:09 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:ec08:: with SMTP id g8-v6ls4581589edr.8.gmail; Fri, 28 Sep 2018 03:47:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV60WiXRTc4+wI0xMjm7DWAIvrxP6Hx1fSgTX6UVEU8tSk78S3qh79MLwPWD7haWXHXIYzGwi X-Received: by 2002:a05:6402:3d8:: with SMTP id t24mr466897edw.12.1538131628914; Fri, 28 Sep 2018 03:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538131628; cv=none; d=google.com; s=arc-20160816; b=oymnhrZXnb1DIkraItqPfYnUn7k8n4GMvsd2oQ/TsnsyOt20vanSneCIW/8migP2Bb dOCcz006RvTA67iVkI/Eogi/iqL0NDoPJj7lO2BRY8tMp2/CUFHnz+Cal0RNsCj9qNHq qcvBSy+FwXhQ1akHHn/1xqvynWCwIHAICv4BNzUBad6iDrdqtYKCpgPuukGJsGuxR8PB fyrUcPmVZJm+mhzRrq1Yz0Ep1HYXaYexnfBOhudJ4jjgOtGFeK5S5dgwO6w8gxrbXhv/ fghI5s/RB+q9wwY1imi3lKAXnz+/HO0tq1PxFpOPOFBFgU0WDEA8X1o+hWQwNTpCZxNT Sk5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=hFa9abls+7YHKUjerNZH7kYQ1TlLMJBysqbNmKdonQ8=; b=uAgm36EYwgtkHTms9ZzVFQUsQuyygyxqRPb3MNqE7F2jDo2J22iczVAQRdqoCkYH6p DQ5yV6xXoGLw7TpxEZ5jy/952fQbo2MM7+UvIZVl803yT8XwaMhM0AA34swm8fsGl/2r BlI5PIyPYiA5UCFpd+NvqeYkT1MsvbMqZS/e1vI3KYNEOiaAjTz3BNr7SFE4VWvhl2aU EFkvc76Zd8YzmtCk9k3e7P0VvE+4/Cr4kzFM/qZoKgaELASA4P2KVFZC7XTD70/Q6ewd Ju39AC/52wbU2eSnxJNKf3J1TuRoZsUGOoHLAabh1BZGSF7pUW9MNmad1BtZXysf+HGz RLew== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id m11si165183edv.5.2018.09.28.03.47.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 03:47:08 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id w8SAl8h7024563 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Sep 2018 12:47:08 +0200 Received: from md1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTPS id w8SAl5Fw024464 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 28 Sep 2018 12:47:08 +0200 Date: Fri, 28 Sep 2018 12:47:04 +0200 From: Henning Schild To: "Maxim Yu. Osipov" Cc: isar-users Subject: Re: [PATCHv2 1/2] cross: use env variables instead of switches Message-ID: <20180928124704.642e5fb3@md1pvb1c.ad001.siemens.net> In-Reply-To: <63ddc92e-c7c5-06d5-fe6d-cb7ea689b8d0@ilbers.de> References: <20180911101605.21977-2-henning.schild@siemens.com> <20180921125542.3026-1-henning.schild@siemens.com> <20180921150840.02e8bd55@md1pvb1c.ad001.siemens.net> <63ddc92e-c7c5-06d5-fe6d-cb7ea689b8d0@ilbers.de> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: hh7DoIm4Nii/ Am Thu, 27 Sep 2018 10:12:25 +0300 schrieb "Maxim Yu. Osipov" : > On 9/21/18 4:08 PM, Henning Schild wrote: > > Am Fri, 21 Sep 2018 14:55:42 +0200 > > schrieb Henning Schild : > > > >> Debian has environment variables to set the architectures to be > >> used by dpkg-buildpackage and mk-build-deps. Use those instead of > >> adding parameters to the tools. > >> This patch now also uses the debian names for cross building and > >> we do not have confusing statements like "--host-arch > >> $target_arch" anymore. > > > > The change to v1 is that we call mk-build-deps still with > > --host-arch. And we provide the "default"-argument, according to > > the man-page. The tool does not do what its man-page says, or at > > least the man-page is very confusing. > > I've reran scripts/ci_build.sh on stretch host - (both variants - > native and cross) - build still fails on example-hello, example > module etc. > > I would suggest to run CI script before submitting patch to the > mailing list. The cover letter says that this series is not ready to be merged, but more like raising the issue that the names are mixed up. Sorry if that was not clear. Henning > Maxim. > > > Henning > > > >> Signed-off-by: Henning Schild > >> --- > >> meta/classes/dpkg.bbclass | 6 +++++- > >> meta/recipes-devtools/buildchroot/files/build.sh | 2 +- > >> meta/recipes-devtools/buildchroot/files/common.sh | 13 > >> ------------- meta/recipes-devtools/buildchroot/files/deps.sh | > >> 4 ++++ 4 files changed, 10 insertions(+), 15 deletions(-) > >> > >> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > >> index da0b40d..959c041 100644 > >> --- a/meta/classes/dpkg.bbclass > >> +++ b/meta/classes/dpkg.bbclass > >> @@ -7,6 +7,8 @@ inherit dpkg-base > >> do_install_builddeps() { > >> dpkg_do_mounts > >> E="${@ bb.utils.export_proxies(d)}" > >> + export DEB_HOST_ARCH="${DISTRO_ARCH}" > >> + export DEB_BUILD_ARCH="${HOST_ARCH}" > >> sudo -E chroot ${BUILDCHROOT_DIR} /isar/deps.sh ${PP}/${PPS} > >> ${DISTRO_ARCH} dpkg_undo_mounts > >> } > >> @@ -19,5 +21,7 @@ do_install_builddeps[stamp-extra-info] = > >> "${DISTRO}-${DISTRO_ARCH}" # Build package from sources using build > >> script dpkg_runbuild() { > >> E="${@ bb.utils.export_proxies(d)}" > >> - sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS} > >> ${DISTRO_ARCH} > >> + export DEB_HOST_ARCH="${DISTRO_ARCH}" > >> + export DEB_BUILD_ARCH="${HOST_ARCH}" > >> + sudo -E chroot ${BUILDCHROOT_DIR} /isar/build.sh ${PP}/${PPS} > >> } > >> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh > >> b/meta/recipes-devtools/buildchroot/files/build.sh index > >> e74bc14..0458b1f 100644 --- > >> a/meta/recipes-devtools/buildchroot/files/build.sh +++ > >> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -15,4 +15,4 > >> @@ for i in configure aclocal.m4 Makefile.am Makefile.in; do done > >> > >> # Build the package > >> -dpkg-buildpackage -a$target_arch -d --source-option=-I > >> +dpkg-buildpackage -d --source-option=-I > >> diff --git a/meta/recipes-devtools/buildchroot/files/common.sh > >> b/meta/recipes-devtools/buildchroot/files/common.sh index > >> b7551eb..61917b8 100644 --- > >> a/meta/recipes-devtools/buildchroot/files/common.sh +++ > >> b/meta/recipes-devtools/buildchroot/files/common.sh @@ -6,19 +6,6 > >> @@ > >> set -e > >> > >> -# Create human-readable names > >> -target_arch=$2 > >> - > >> -# Notes: > >> -# mk-build-deps for jessie and jtretch has different parameter > >> name to specify -# host architecture. > >> -debian_version=$(cut -c1 /etc/debian_version) > >> -if [ $(($debian_version)) -ge 9 ]; then > >> - set_arch="--host-arch $target_arch" > >> -else > >> - set_arch="-a $target_arch" > >> -fi > >> - > >> # Go to build directory > >> cd $1 > >> > >> diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh > >> b/meta/recipes-devtools/buildchroot/files/deps.sh index > >> 4bd604f..cc34b2d 100644 --- > >> a/meta/recipes-devtools/buildchroot/files/deps.sh +++ > >> b/meta/recipes-devtools/buildchroot/files/deps.sh @@ -23,5 +23,9 @@ > >> apt-get update \ -o Dir::Etc::sourceparts="-" \ > >> -o APT::Get::List-Cleanup="0" > >> > >> +# according to the man-page --host-arch should default to exactly > >> what we say +# here ... but it does not, so we have to provide this > >> argument +set_arch="--host-arch `dpkg-architecture > >> -qDEB_HOST_ARCH`" + > >> # Install all build deps > >> mk-build-deps $set_arch -t "${install_cmd}" -i -r > >> debian/control > > > >