lueschem / edi-raspbian Goto Github PK
View Code? Open in Web Editor NEWedi configuration for emulated raspbian and raspbian cross compilation.
Home Page: https://www.get-edi.io
License: MIT License
edi configuration for emulated raspbian and raspbian cross compilation.
Home Page: https://www.get-edi.io
License: MIT License
In general, the system works very well, and this isn't really a bug report; it's a request for comment on best practice.
Here's the issue:
I'm compiling a Raspbian-targeted application that depends on libudev-dev
, which requires libudev1
. This is a core library for Ubuntu and Raspbian (so lots of applications, like apt
, break when this library gets screwed up). My understanding is that, for multiarch installations, the versions of each architecture must be identical. Here are the available versions as reported by sudo apt list libudev1
:
libudev1/stable,now 241-7~deb10u5 amd64 [installed]
libudev1/stable 241-7~deb10u5+rpi1 armhf
So the versions are different by the "+rpi1".
Question:
What is the best practice for dealing with a situation like this? (If I just force the installation of the armhf version, it breaks the machine (no availability of apt;
lots of other amd64 applications/libraries are removed.)
libudev1
, libudev-dev
include files, etc.) from a Raspbian machine into the corresponding armhf directories on the edi machine? (Lots of manual work and/or creating a script to do all the stuff that the package installer usually does.)make install
? (This seems fraught and likely to result in similar 'damage' to libudev1
-dependent packages.)How do you deal with this situation when library versions are substantially identical, but not exactly so? If you have a good answer, it might be worth a blog post.
edi -v lxc configure jessie-cross-test jessie-cross.yml
.TASK [development_tools : Download corresponding armhf version of linux-libc-dev.] *** fatal: [jessie-cross-test]: FAILED! => {"changed": false, "dest": "/tmp/linux-libc-dev_3.16.7-ckt25-2_armhf.deb", "failed": true, "msg": "Request failed", "response": "HTTP Error 404: Not Found", "state": "absent", "status_code": 404, "url": "http://deb.debian.org/debian/pool/main/l/linux//linux-libc-dev_3.16.7-ckt25-2_armhf.deb"}
linux-libc-dev from jessie-updates got updated and therefore the version 3.16.7-ckt25-2 is no longer available.
nathan@Dell-latitude-E6510:~/edi-raspbian$ sudo edi -v lxc configure raspbian-buster-cross buster-cross.yml
INFO:root:Load time dictionary:
edi_configuration_name: buster-cross
edi_configure_remote_target: false
edi_create_distributable_image: false
edi_current_display: '0'
edi_current_user_gid: 1000
edi_current_user_group_name: nathan
edi_current_user_host_home_directory: /home/nathan
edi_current_user_name: nathan
edi_current_user_ssh_pub_keys: []
edi_current_user_target_home_directory: /home/nathan
edi_current_user_uid: 1000
edi_edi_plugin_directory: /usr/lib/python3/dist-packages/edi/plugins
edi_edi_version: 1.9.4+u1804
edi_host_ftp_proxy: ''
edi_host_hostname: Dell-latitude-E6510
edi_host_http_proxy: ''
edi_host_https_proxy: ''
edi_host_no_proxy: ''
edi_host_socks_proxy: ''
edi_log_level: INFO
edi_lxd_version: 3.0.3
edi_project_directory: /home/nathan/edi-raspbian
edi_project_plugin_directory: /home/nathan/edi-raspbian/plugins
edi_work_directory: /home/nathan/edi-raspbian
INFO:root:Using base configuration file 'buster-cross.yml'
INFO:root:Using overlay configuration file 'configuration/overlay/buster-cross.global.yml'
INFO:root:Merged configuration:
bootstrap:
additional_packages:
Going to bootstrap initial image - be patient.
INFO:root:Running command: ['debootstrap', '--arch=amd64', '--variant=minbase', '--include=python,sudo,netbase,net-tools,iputils-ping,ifupdown,isc-dhcp-client,resolvconf,systemd,systemd-sysv,gnupg,dumb-init', '--components=main', '--force-check-gpg', '--keyring=/home/nathan/edi-raspbian/tmpkmbxibdj/temp_keyring.gpg', 'buster', '/home/nathan/edi-raspbian/tmpkmbxibdj/rootfs', 'http://deb.debian.org/debian']
I: Retrieving InRelease
I: Checking Release signature
E: Release signed by unknown key (key id DCC9EFBF77E11517)
Error: Command '['debootstrap', '--arch=amd64', '--variant=minbase', '--include=python,sudo,netbase,net-tools,iputils-ping,ifupdown,isc-dhcp-client,resolvconf,systemd,systemd-sysv,gnupg,dumb-init', '--components=main', '--force-check-gpg', '--keyring=/home/nathan/edi-raspbian/tmpkmbxibdj/temp_keyring.gpg', 'buster', '/home/nathan/edi-raspbian/tmpkmbxibdj/rootfs', 'http://deb.debian.org/debian']' returned non-zero exit status 1.
For more information increase the log level.
The setup of a cross compilation container fails behind a proxy:
Environment:
ansible: 2.3.1.0
lxc: 2.15
edi: 0.6.1
$ sudo edi -v lxc configure raspbian-jessie-cross-3 jessie-cross.yml
...
TASK [multiarch_support : Update apt cache.] **********************************************************************************************
changed: [raspbian-jessie-cross-3]
TASK [development_tools : Install specific version of native linux-libc-dev.] *************************************************************
changed: [raspbian-jessie-cross-3]
TASK [development_tools : Download corresponding armhf version of linux-libc-dev.] ********************************************************
fatal: [raspbian-jessie-cross-3]: FAILED! => {"changed": false, "dest": "/tmp/linux-libc-dev_3.16.7-ckt25-2_armhf.deb", "failed": true, "msg": "Request failed: <urlopen error [Errno 101] Network is unreachable>", "state": "absent", "url": "http://ftp.ch.debian.org/debian/pool/main/l/linux//linux-libc-dev_3.16.7-ckt25-2_armhf.deb"}
to retry, use: --limit @/home/lueschm1/workspace/edi-raspbian/plugins/playbooks/development_setup/main.retry
PLAY RECAP ********************************************************************************************************************************
raspbian-jessie-cross-3 : ok=11 changed=10 unreachable=0 failed=1
Error: Command '['sudo', '-u', 'lueschm1', 'ansible-playbook', '--connection', 'lxd', '--inventory', '/home/lueschm1/workspace/edi-raspbian/tmpiadj8xfl/inventory', '--extra-vars', '@/home/lueschm1/workspace/edi-raspbian/tmpiadj8xfl/extra_vars_050_development_setup', '/home/lueschm1/workspace/edi-raspbian/plugins/playbooks/development_setup/main.yml']' returned non-zero exit status 2
For more information increase the log level.
TASK [development_tools : Install cross development tools.] ********************
failed: [raspbian-jessie-cross] (item=[u'crossbuild-essential-armhf', u'dpkg-cross']) => {"cache_update_time": 0, "cache_updated": false, "failed": true, "item": ["crossbuild-essential-armhf", "dpkg-cross"], "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'crossbuild-essential-armhf' 'dpkg-cross'' failed: E: Unable to correct problems, you have held broken packages.\n", "stderr": "E: Unable to correct problems, you have held broken packages.\n", "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n crossbuild-essential-armhf : Depends: gcc-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed\n Depends: g++-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " crossbuild-essential-armhf : Depends: gcc-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed", " Depends: g++-arm-linux-gnueabihf (>= 4.9.1-1) but it is not going to be installed"]}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @/home/lueschem/workspace/edi-raspbian/plugins/playbooks/development_setup/main.retry
PLAY RECAP *********************************************************************
raspbian-jessie-cross : ok=16 changed=11 unreachable=0 failed=1
Error: Command '['sudo', '-u', 'lueschem', 'ansible-playbook', '--connection', 'lxd', '--inventory', '/home/lueschem/workspace/edi-raspbian/tmprulrnem2/inventory', '--extra-vars', '@/home/lueschem/workspace/edi-raspbian/tmprulrnem2/extra_vars_050_development_setup', '/home/lueschem/workspace/edi-raspbian/plugins/playbooks/development_setup/main.yml']' returned non-zero exit status 1
For more information increase the log level.
Reason: emdebian did not rebuild gcc after the retpoline updates. Therefore we end up with an incompatible version mix between the packages coming from emdebian, Debian, Debian security and Raspbian.
I build the debian buster, do you have a script for building the cross-compilers?
TASK [development_tools : Install corresponding versions of linux-libc-dev.] ***
failed: [raspbian-stretch-cross] (item=[u'linux-libc-dev', u'linux-libc-dev:armhf']) => {"cache_update_time": 0, "cache_updated": false, "failed": true, "item": ["linux-libc-dev", "linux-libc-dev:armhf"], "msg": "'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'linux-libc-dev' 'linux-libc-dev:armhf'' failed: E: Unable to correct problems, you have held broken packages.\n", "stderr": "E: Unable to correct problems, you have held broken packages.\n", "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n linux-libc-dev:armhf : Breaks: linux-libc-dev (!= 4.9.82-1+deb9u3+rpi1) but 4.9.82-1+deb9u3 is to be installed\n linux-libc-dev : Breaks: linux-libc-dev:armhf (!= 4.9.82-1+deb9u3) but 4.9.82-1+deb9u3+rpi1 is to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " linux-libc-dev:armhf : Breaks: linux-libc-dev (!= 4.9.82-1+deb9u3+rpi1) but 4.9.82-1+deb9u3 is to be installed", " linux-libc-dev : Breaks: linux-libc-dev:armhf (!= 4.9.82-1+deb9u3) but 4.9.82-1+deb9u3+rpi1 is to be installed"]}
Hello, I tried to use edi-raspbian but the set up fails when ansible asks the raspbian-buster-cross to update and upgrade apt. Here the message. Do you know if something else is needed for this to work? I follow the instructions and have tried several times:
After trying:
sudo edi -v lxc configure raspbian-buster-cross buster-cross.yml
at one point I get this error:
TASK [apt_setup : Update and upgrade apt.] *************************************
[WARNING]: Updating cache and auto-installing missing dependency: python-apt
fatal: [raspbian-buster-cross]: FAILED! => {"changed": false, "cmd": "apt-get install --no-install-recommends python-apt -y -q", "msg": "E: Package 'python-apt' has no installation candidate", "rc": 100, "stderr": "E: Package 'python-apt' has no installation candidate\n", "stderr_lines": ["E: Package 'python-apt' has no installation candidate"], "stdout": "Reading package lists...\nBuilding dependency tree...\nPackage python-apt is not available, but is referred to by another package.\nThis may mean that the package is missing, has been obsoleted, or\nis only available from another source\n\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Package python-apt is not available, but is referred to by another package.", "This may mean that the package is missing, has been obsoleted, or", "is only available from another source", ""]}
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.