Ubuntu (Xenial): How to force apt-get install libssl-dev:arm64 and armhf so I can cross-compile against pre-built libs
=======
Goal
=======
I am attempting to configure a multi-arch build system to build armhf, arm64, i386/x86, and amd64/x64 builds of a Linux project of mine. I already have the necessary tools in place in my Makefile, along with the following toolchains which I installed via apt-get:
arm-
arm-
aarch64-
aarch64-
=======
Details
=======
I am able to build my projects successfully, but there's a caveat: I had to prebuild a ton of dependencies in advance, including gtkmm, gtkmm-dev, glademm, cairo, etc, so get the GUI components of my project supported on all 4 build variants. I'm trying to find a way to pull all these dependencies from the pre-built archives for Xenial (Ubuntu 16.04 LTS) for the arm64 and armhf architectures.
From reading a separate post, I found out that I can pull complete .deb packages from the apt-get repos using aptitude, but this only solves part of my problem. On my Xenial 64-bit system, I can install x86 compatibility libraries so I can cross compile for 32-bit systems easily enough, by:
Pulling the x86 version of a library (ie: for libssl-dev, I issue: sudo apt-get install libss-devl:i386).
Specify building against x86 by adding: CFLAGS+=-m32.
=======
Issue
=======
For the latter of these two steps, I just use the appropriate cross-compiler: easy enough. For pulling the appropriate packages though, something like sudo apt-get install libssl-dev:arm64 or sudo apt-get install libssl-dev:armhf fails. I've also tried using `sudo dpkg --add-architecture arm64`, but apt-get update fails afterwards, since the apt repos do not have an arm64/armhf directory structure like the LaunchPad repos (ie: https:/
=======
Question
=======
How can I pull development libraries and make them available for the cross-compilers on my system? There are two ways I can think of:
Install the arm64/armhf variants, if possible, via apt-get. I think the command I'm using is wrong, or I need to make some changes to my /etc/apt/
Just download the .deb files using aptitude, and extract them to a local folder, and explicitly pass the folder path in my Makefile.
Unfortunately, I don't know how to do either of these steps, or there may be a hidden third option that's better which I'm unaware of.
How can I accomplish this goal of mine? It sounds like it would be far less hassle than manually building all the dependencies myself.
Thank you.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply: