Skip to main content

Questions tagged [cross-compilation]

Questions about cross compilation - creating executable code for a platform different than the one on which compiler is running.

Filter by
Sorted by
Tagged with
2 votes
0 answers
211 views

WSL Ubuntu: How to setup gcc to cross-compile for arm with a specific glibc version?

I'm not really an expert of linux, so i'm feeling a bit lost. I'm running an Ubuntu 22.04.3 LTS image in WSL, as i need to cross-compile a program for an ARM linux pc (a BeagleBone Black, "BBB&...
Parduz's user avatar
  • 143
0 votes
1 answer
121 views

Which packet provides /usr/lib32/libstdc++.so?

I'm compiling a 32 bit program on 64 bit ubuntu 22.04 with clang. The linker fails with /usr/bin/ld: cannot find -lstdc++: No such file or directory. There is no file/no symlink at /usr/lib32/libstdc++...
Phaiax's user avatar
  • 3
0 votes
0 answers
67 views

Cross-Compile Raspberry Pi "Kernel configuration is invalid" Error

I'm using ubuntu as a host to cross compile raspberry pi 3b+ as a target. I tried to use commands below: sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C /home/ubuntu/Desktop/workspace/linux M=...
Alperen's user avatar
-1 votes
1 answer
413 views

How to convert a Linux binary from AMD64 to AARCH64 architecture?

I'm trying to convert a Linux binary from AMD64 to AARCH64 architecture, but I'm not sure how to proceed. I've searched online and found that typically, the source code is required for such ...
Adikesh's user avatar
0 votes
1 answer
375 views

Add multi arch (i386) cross dev and run time support

On a 22.04.03 system I've added i386 architecture support : sudo dpkg --add-architecture i386 I can see multiarch-support is already installed : sudo apt list --installed multi* Listing... Done ...
WallyZ's user avatar
  • 212
0 votes
0 answers
33 views

libgdal.so when using 2 architectures on jammy

I am trying to build/cross build for both arm64 and amd64 on my amd64 machine (22.04) to do that I installed both arm64 libraries on my machine (I already had the amd64 installed) it seems that ...
Alon Barzilai's user avatar
0 votes
1 answer
316 views

cross compiling arm64 code in x64 machine

I am trying to cross compile arm64 code on my intel x64 22.04 machine. I installed g++-aarch64-linux-gnu compiler and now I can compile "hello world" like app. to so more than that, I need ...
Alon Barzilai's user avatar
1 vote
1 answer
214 views

How do I install multiple architecture versions of a single package using synaptic?

I am trying to cross compile a program that uses GTK3. The host machine is x86_64 running Ubuntu 22.04. The target machine is arm64 or aarch64 running Debian (Bookworm). I have setup the cross-...
race_max's user avatar
0 votes
0 answers
262 views

How to cross-build external (out-of-tree) kernel module for another Ubuntu?

I can find proper guidelines anywhere how to cross-compile an external module on Ubuntu for another Ubuntu on ARM64. I had to remove -mrecord-mcount from CFLAGS for the process as none of recent ...
Michał F's user avatar
  • 121
1 vote
0 answers
455 views

Setting up dpkg Multiarch on Ubuntu 22.04, libc dependency error

I want to do cross-compilation for my Beaglebone Black and use packages managed by APT. I've already installed the crossbuild-essential-armhf package, so I do have a toolchain that is able to build ...
HANSEMINATOR's user avatar
5 votes
1 answer
10k views

How do I install the gcc-13 aarch64 cross compiler on Ubuntu 22.04?

The Linux kernel now requires gcc v13 in order to compile, but Ubuntu 22.04 is stuck on gcc v11. I found instructions to install the latest native gcc-13 via a PPA (https://launchpad.net/~ubuntu-...
lord_nimon's user avatar
3 votes
0 answers
429 views

How do I install arm64 development libraries on an amd64 device in Ubuntu 22.04?

I'm trying to install development libraries for ARM64 so I can cross-compile arm64 software from my amd64 device, using Ubuntu 22.04. I've managed to install the aarch64-linux-gnu packages, but I can'...
JesseTG's user avatar
  • 383
2 votes
1 answer
4k views

What's the "collect2: error: ld returned 1 exit status" in cross compile

When trying to cross compile the CUDNN samples: cp -r /usr/src/cudnn_samples_v8/ $HOME cd $HOME/cudnn_samples_v8/mnistCUDNN make clean make TARGET_ARCH=aarch64 SBSA=1 Here is the error: CUDA_VERSION ...
stackbiz's user avatar
  • 383
0 votes
0 answers
243 views

Openssl package for MIPS 32 cross compilation on Ubuntu 20.04

Am cross compiling my code in X86 machine and OS is Ubuntu 20.04. Earlier when i was cross compiling for ARM, it was working fine and my code was like below: echo "### Seting ARM architecture in '...
Karma Yogi's user avatar
0 votes
0 answers
111 views

Cross Compiled V4L2 of embedded Linux

Hello all I am new to Embedded Linux. I am having embedded hardware running Linux 5. I want to enable a webcam on it but i dont have internet access or a compiler installed. So i cross compiled V4L2 ...
APC1Wi's user avatar
  • 1
0 votes
0 answers
371 views

Is it possible to cross-compile among different Ubuntu relases?

Real case scenario: I have a dev machine that runs Ubuntu 22.04. Most of my customers have a dedicated remote machine that run Ubuntu as well, but with different releases - 20.04, 21.04, etc... I ...
Mark's user avatar
  • 527
0 votes
0 answers
24 views

moshudp crosscompilation

I have a board with MIPS cpu of mips64el and buildRoot with toolchain. When I try compile a moshudp program by rust from buildRoot I get follow error $ source $BUILD_ROOT_PATH/buildroot/output/host/...
Vitaly's user avatar
  • 1
3 votes
1 answer
10k views

How to install "gcc-arm-linux-gnueabihf" specific version?

Am performing cross compilation on x86 and target platform is armhf. When i run command apt-get install -y gcc-arm-linux* g++-arm-linux*, It installs 4.11.2.0 version and output is as below g++-arm-...
Karma Yogi's user avatar
0 votes
0 answers
826 views

How to install i686-elf compiler?

I'm starting out writing a (very basic) operating system, using the Osdev wiki. It recommends that I use the i686-elf toolchain, but I've had trouble installing it on my system. I'm running Ubuntu 22....
Blue Herring's user avatar
0 votes
0 answers
2k views

How to install openssl 1.1.1 in ubuntu for ARM cross compilation

I have build script for ARM cross compilation and is running on x86 machine. This script has commands as below. sudo debootstrap --arch=amd64 --variant=buildd focal /srv/armRoot" echo "deb [...
Karma Yogi's user avatar
1 vote
0 answers
264 views

problem doing multiarch installs on ubuntu

so this is an issue i got from probably the most annoying bug I've had ever. i made a help thread on reddit but i think the only way to do it right is to post it here. I've been working on a software ...
makerio's user avatar
  • 26
1 vote
0 answers
370 views

Clang : Depends: clang-3.8 (>= 3.8~) but it is not going to be installed

04, I tried installing clang using the following command `sudo apt install clang` however getting the following error Reading package lists... Done Building dependency tree Reading ...
Ankit Kumar's user avatar
0 votes
0 answers
3k views

Cross compiling for arm64 on amd64 architecture

I trying compiling rpi-imager for arm64 and I have a problem. dpkg --add-architecture arm64 apt update Status of 'apt update' is OK, because I edited sources.list, where I'm changing from archive....
Qmails's user avatar
  • 53
3 votes
1 answer
12k views

how to install libpython3.6m.so.1.0 on ubuntu 20.04?

I tried updating my cross tools for arm64 on my x86-64 ubuntu 20.04 machine. The installed cross tools gcc-arm-11.2-2022.02-x86_64-aarch64-none-elf from arm. When I run the aarch64-none-elf-gdb, it ...
Chan Kim's user avatar
  • 2,081
0 votes
1 answer
341 views

Cross Compilation ARMHF or Compilation for Android from Debian or Ubuntu package?

I have two options to compile, Option1: Cross-compile using a x86_x64 ubuntu or debian system for armhf package compilation, Option2 Image of ubuntu or debian armhf in Qemu. The problem I have is that ...
Matty A.D.'s user avatar
1 vote
0 answers
921 views

Cross Compile QEMU from Ubuntu to Windows 10

For several days I have been stuck trying to cross compile QEMU for windows 10 x64. I am not familiar with minwg at all. I read a lot of pages but most of time it seems to be to old or or to not use ...
Vonkel.'s user avatar
  • 111
3 votes
0 answers
528 views

gcc-multilib-arm-linux-gnueabihf used to install on disco, missing on impish

I have a Dockerfile to build a cross compiling environment for Rust. In the past I have only support musl builds for static executables. When I upgraded from disco to impish I am missing the important ...
xrl's user avatar
  • 131
0 votes
1 answer
1k views

Why is there no cross-compiler in Arm64 version of Ubuntu?

In the Amd64 version of Ubuntu, there's the gcc-{version}-{architecture}-linux-gnu packages that I can use to build binaries for different architectures, of which, the built binaries can be tested ...
DannyNiu's user avatar
  • 117
2 votes
0 answers
965 views

How to build gcc-mips-linux-gnu from source

I've been using the gcc-mips-linux-gnu package, and now I want to make a small modification to the compiler. How can I build the exact same package locally? I already tried using apt-get source based ...
Sagar's user avatar
  • 121
2 votes
0 answers
235 views

Compiling ARMv7A (AArch32) code on an ARMv8A (AArch64) machine?

I've read in many places that ARMv8A supports backwards compatible ARMv7A code (the former is now called AArch64 and the later is now called AArch32). I'm running an ARMv8A machine (on the Raspberry ...
Gregory Fenn's user avatar
1 vote
0 answers
77 views

Why can't I install coreutils:armhf alongside coreutils

I am trying to install coreutils:armhf on my machine I am cross compiling for armhf architecture. When I execute sudo apt-get install coreutils:armhf Ubuntu tells me WARNING: The following essential ...
arminb's user avatar
  • 111
1 vote
2 answers
312 views

Why can't I install two architecture versions of libi2c-dev?

I am running Ubuntu 20.04 on a 64bit ARM architecture. I am trying to build some code which links libi2c (-li2c). However I want to be able to build both as local architecture and also cross compile ...
atomcraft's user avatar
0 votes
0 answers
1k views

Ubuntu 18.04: error while loading shared libraries: libstdc++.so.6 during cross platform compilation

I'm experience very strange error on Ubuntu 18.04 while doing cross compilation: "arm-hisiv400-linux-gnueabi-g++: error while loading shared libraries: libstdc++.so.6: cannot open shared object ...
Steeve007's user avatar
1 vote
1 answer
465 views

add the line with xenial-updates

This is a follow up question on Cross-compile for armhf and install a static library In the accepted answer following is mentioned at the end, Clarification: Multiarch packages need to be installed ...
Ajey's user avatar
  • 11
1 vote
0 answers
9k views

Installing anydesk armhf on 20.10 arm64 machine

am trying to install any desk:arm-hf in Ubuntu 20.10 arm64 machine. because of cross platform I used dpkg for installation. > > pi@pi-desktop:~/Downloads$ sudo dpkg --force architecture -i ...
praveen kumar's user avatar
1 vote
0 answers
842 views

arm64 packages not installed into arm64 sysroot, so CMake doesn't find them

I need to cross compile an application, using CMake. I install the toolchain packages and the arm64 versions of my dependencies. Looks like the sysroot is in /usr/aarch64-linux-gnu, which contains ...
godfool's user avatar
  • 21
0 votes
1 answer
3k views

GCC Issue with Building an Old Linux Kernel

I am trying to build from source version 2.6.37 of the Linux Kernel compiled for ARM. The reason I need to do so is related to work; I need that specific version. I am able to build the most recent ...
Nick Foster's user avatar
1 vote
0 answers
2k views

undefined reference to `log@GLIBC_2.29' collect2: error: ld returned 1 exit status

cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" aarch64-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=aarch64-...
hccya's user avatar
  • 11
0 votes
1 answer
1k views

How to install libseccomp-dev for different CPU arch

I am trying to install libseccomp-dev:armhf (and arm64) on Ubuntu bionic (same on Xenial). I'm doing this because I would like to cross compile something that depends on libseccomp-dev. This works ...
cpuguy83's user avatar
  • 101
0 votes
0 answers
2k views

Cross compile C++ application for ARM64 with openSSL libraries

I made an application in C++ for x86_64 and it works fine on Ubuntu. Now I want to run the same application on arm64 board running Ubuntu. For this I downloaded a cross-compilation tool chain from ...
Keval88's user avatar
  • 36
5 votes
1 answer
4k views

How to set the CC environmental variable during debian cross packing

I'm trying to build a debian package for an ARM64 platform on my AMD64 Ubuntu OS. I execute the command debuild -us -uc --host-arch arm64 but get the warning dpkg-architecture: warning: specified ...
user5265160's user avatar
4 votes
1 answer
8k views

Cross-compiler path

I have some compilers for different architectures: $ > whereis gcc gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz $ > whereis arm-linux-gnueabi-gcc arm-linux-gnueabi-gcc: /usr/bin/...
Anisyanka's user avatar
1 vote
0 answers
400 views

Qt 4.8.7 - Cross compilation error - symbol lookup error: undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent

I have cross compiled executable file from QT 4.8.7 and i am running it on Raspberry PI(Ubuntu OS installed in it) which have installed QT 4.8.7 and QT declarative module also. When i run the cross ...
Mehta's user avatar
  • 95
1 vote
1 answer
2k views

ARM cross compiler - arm-linux-gnueabihf error. liblto_plugin.so not found

I am trying to make a linux kernel - 4.15.17. It is a project I have inherited, and it appears to use the arm-linux-gnueabihf-gcc compiler. Below is the output from the make process: ndu@ndu-...
ChrisMason's user avatar
0 votes
1 answer
2k views

How to install a package of another architecture

I want to cross compile from my Intel i7 for a Raspberry Pi4. Now I added the following to my sources.list: deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic main restricted which seems ...
abergmeier's user avatar
1 vote
1 answer
11k views

How to switch the version of arm-linux-gnueabihf-gcc?

I would like to use version 5 of arm-linux-gnueabihf-gcc. So I installed it via: apt-get install gcc-5-arm-linux-gnueabihf But now when I do gcc --version it will tell me it's version 7. How do ...
Paul Bernhard Wagner's user avatar
12 votes
1 answer
10k views

How do I create a DMG file on linux Ubuntu for MacOS

I cross compiled a program on linux for MacOS and now I want that MacOS binary to convert to DMG file for MacOS. Is there a way to convert a MacOS binary on Linux (Ubuntu) into DMG file for MacOS?
CryptoMiningPoolSetupYiimp's user avatar
0 votes
0 answers
2k views

libc.so.6: cannot open shared object file: No such file or directory

I want to cross compile the C code from Linux Ubuntu PC to Beagle Bone Black using "arm-cortexa8-linux-gnueabihf-gcc compiler. But I face following error: root@ubuntu:/home/teqlinux/HMI_SCADA/...
Milav Soni's user avatar
5 votes
3 answers
9k views

Cross-compile for armhf and install a static library

I have set up a cross-compile docker instance. In a nutshell I started setting up the apt-get update apt-get install binutils-multiarch dpkg --add-architecture armhf # Manually add correct armhf ...
psiphi75's user avatar
  • 956
2 votes
2 answers
3k views

Install Python2.7 and 3 arm headers in a amd64 architecture machine

I've been struggling around because I want to cross-compile an application which needs the Python to compile. Just in case you are curious the case is that when it goes to the pyconfig.h it tries to ...
Marc43's user avatar
  • 141