From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6566555412143800320 X-Received: by 2002:a1c:640b:: with SMTP id y11-v6mr819650wmb.13.1529264477517; Sun, 17 Jun 2018 12:41:17 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:9c91:: with SMTP id d17-v6ls5057507wre.13.gmail; Sun, 17 Jun 2018 12:41:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLOQFKErVazPP7WU351TY+sND5tV9UJLOWoFPbVqWsE8l8+06MwdTP6N83LzGjJICiMz7Ap X-Received: by 2002:adf:e5c3:: with SMTP id a3-v6mr795358wrn.19.1529264477110; Sun, 17 Jun 2018 12:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529264477; cv=none; d=google.com; s=arc-20160816; b=xSCWHm3h3r2uqAskuBYdPBbB6UEJr3JrIElL5fk4IK3PiKZtcC3r+Kw1XLi14eSE29 ue+iql/mm6JE7FJvnW3ytGi/H45drgIjRYpZn0qLYhfR8DiFNSbunCPj5Xxw5dIUIXYN qPwhBnwfyOtxt874s5PAT5WFONMzxXh0XUwsHav3otwOxAD6x1/dLA+BVTmhKLcozZU2 qQek3rrTWjHNUCJehQfOEMNBYjaHAbnbWBn3tdDA5YVVfpU0meRoylzDYz0zKDcbNkXb uwI29jDYZH/ywmK8uNZUu0YZFGeBlrEhLU20heyv7XIUSBhvKMcO0i9LvP0iTml2LJdQ 7b7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :arc-authentication-results; bh=8XkHqZOpPlBvEMTM4CPoJwTEnCA55zIIRFBG3T2jJYA=; b=v8SSVwGG2G08fplzIJNt/SEuOa6JhqBVKB/2A6aaeHxqsnjqxWta+Mm6W1aQFw7y4t 1DXaOpU+yBf6Hr7IXZ291I2naVarm/cxozEHekEyPlYgWYGrpLar+aShrAVUiTdSqFdk bsKeIUzbqp5yTdgeKHaRAgJBxCSyp6MbGJga4alFuimCx1YnbQB07NRBULiNbzEM7W21 QB8G5TYsg2cXrO101bm66nHVfLngNsq6RoaWynMIg3H5yISDf7m1YQLWEB7CDdkHjpkm LSPOZhbTIb4HgqHBFU0dMjB+y04ceyPuk0OI/xI5eddOsgJEuq92xXTllDr4njdAsBBY DhJw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id e18-v6si283952wmh.1.2018.06.17.12.41.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jun 2018 12:41:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w5HJfDNZ013789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sun, 17 Jun 2018 21:41:15 +0200 Subject: Re: [RFC] [PATCH 0/9] Initial cross-compilation support To: Henning Schild Cc: isar-users@googlegroups.com References: <20180613130807.2461-1-asmirnov@ilbers.de> <20180614132041.02ee1d78@md1pvb1c.ad001.siemens.net> From: Alexander Smirnov Message-ID: <78111574-15e2-449f-fb71-626587033863@ilbers.de> Date: Sun, 17 Jun 2018 22:41:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180614132041.02ee1d78@md1pvb1c.ad001.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: jg1Qdt6lUPDm Hi Henning, On 06/14/2018 02:20 PM, Henning Schild wrote: > Am Wed, 13 Jun 2018 15:07:58 +0200 > schrieb Alexander Smirnov : > >> Hi all, >> >> this series introduces basic cross-compilation support for Isar. The >> implementation is based around new entity - buildchroot-cross, which >> is quite similar to original buildchroot, but has host architecture. >> >> This series tested for the following configuration only: >> >> $ bitbake multiconfig:qemui386 >> >> In this build: >> - libhello is cross-compiled >> - example-hello is compiled traditionally (but it's successfully >> linked with libhello) >> >> TODO list: >> - Depending on the target architecture, various host tools should be >> installed. For example binutils package has the following names: >> * binutils >> * binutils-x86-64-linux-gnu >> * binutils-arm-linux-gnueabihf >> - Cross-dependency installation. This topic is still open for me >> because 'mk-build-deps' tool doesn't work here correctly. For example >> package depends on binutils, but instead of installation of >> 'binutils-arm-linux-gnueabihf' it tries to install 'binutils:armhf' >> and ruins the rootfs. > > mk-build-deps supports the following switches "--arch foo --host-arch > foo", maybe they help? > Sorry that mess the thread, but the last message in this thread doesn't contain you comment :-) So, I've tried to play with mk-build-deps, but results are really disappointed: 1. mk-build-deps support --host-arch and --build-arch starting from stretch only, in jessie these parameters are not presented. 2. I've tried to run mk-build-deps in stretch for libhello: $ mk-build-deps --host-arch amd64 --build-arch i386 debian/control ... dpkg -I libhello-cross-build-deps-depends_0.1_amd64.deb new debian package, version 2.0. size 2012 bytes: control archive=516 bytes. 367 bytes, 11 lines control 283 bytes, 3 lines md5sums Package: libhello-cross-build-deps-depends Version: 0.1 Architecture: amd64 Maintainer: root Installed-Size: 9 Depends: build-essential:i386, crossbuild-essential-amd64:i386, debhelper (>= 9), docbook-to-man Section: devel Priority: optional Multi-Arch: foreign Description: build-dependencies for libhello Dependency package to build the 'libhello' package BUT: package 'crossbuild-essential-amd64:i386' does not exists. At least I wasn't able to find it via apt (I've also added i386 to source list). Another issue during attempts to install generated deps: $ apt-get install build-essential:i386 Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: build-essential:i386 : Depends: libc6-dev:i386 but it is not going to be installed or libc-dev:i386 Depends: gcc:i386 (>= 4:6.3) but it is not going to be installed Depends: g++:i386 (>= 4:6.3) but it is not going to be installed Depends: make:i386 libhello-cross-build-deps : Depends: crossbuild-essential-amd64:i386 but it is not installable E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). It tries to pull target compiler, what is also incorrect behavior. The cross binutils should be installed instead. So, will continue this investigation :-( Alex > Henning > >> So, as usually, comments and suggestions are welcome :-) >> >> With best redgards, >> Alex >> >> Alexander Smirnov (9): >> isar-bootstrap: Add routin to determine host arch >> isar-bootstrap: Move common part to include >> isar-bootstrap: Add host architecture support >> isar-bootstrap-helper: Add parameter to set arch >> buildchroot-cross: Initial implementation >> classes/dpkg*: Relocate dependency from buildchroot >> classes/dpkg*: Drop hardcoded buildchroot blobs >> classes/dpkg-cross: Initial implementation >> [FOR TESTING] libhello: Switch to cross compilation >> >> meta-isar/recipes-app/libhello/libhello.bb | 2 +- >> meta/classes/dpkg-base.bbclass | 17 +- >> meta/classes/dpkg-cross.bbclass | 15 ++ >> meta/classes/dpkg-raw.bbclass | 7 +- >> meta/classes/dpkg.bbclass | 7 +- >> meta/classes/image.bbclass | 2 +- >> meta/classes/isar-bootstrap-helper.bbclass | 13 +- >> meta/conf/isar-bitbake.conf | 1 + >> .../isar-bootstrap/isar-bootstrap-host.bb | 44 ++++ >> .../isar-bootstrap/isar-bootstrap-target.bb | 44 ++++ >> meta/recipes-core/isar-bootstrap/isar-bootstrap.bb | 259 >> --------------------- .../recipes-core/isar-bootstrap/isar-bootstrap.inc >> | 223 >> ++++++++++++++++++ .../buildchroot/buildchroot-cross.bb >> | 53 +++++ meta/recipes-devtools/buildchroot/buildchroot.bb | 2 >> +- .../buildchroot/files/build-cross.sh | 29 +++ 15 >> files changed, 443 insertions(+), 275 deletions(-) create mode 100644 >> meta/classes/dpkg-cross.bbclass create mode 100644 >> meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb create mode >> 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb >> delete mode 100644 meta/recipes-core/isar-bootstrap/isar-bootstrap.bb >> create mode 100644 >> meta/recipes-core/isar-bootstrap/isar-bootstrap.inc create mode >> 100644 meta/recipes-devtools/buildchroot/buildchroot-cross.bb create >> mode 100644 meta/recipes-devtools/buildchroot/files/build-cross.sh >> >