Questions tagged [cross-compilation]

Questions on how to compile software for the Raspberry Pi using other devices.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Finding a compatible commit of the kernel source files to cross-compile a kernel module

For Raspberry Pi I used an image from https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit I cloned the entire history from the https://github.com/raspberrypi/linux to the ...
totoro115's user avatar
0 votes
0 answers
76 views

Cross-Compiling Qt6 for Zero 2 W?

I am trying to build a cross compiling setup for the following system configuration: Qt6.5 LTS Running Raspberry Pi OS Lite 64-bit based on Bookworm Host: Ubuntu 22.04.3 LTS on WSL There aren't many ...
Vishesh Varma's user avatar
0 votes
0 answers
104 views

Crosscompile on Ubuntu computer for Rpi Zero 2W

I am trying to follow this manual (https://earthly.dev/blog/cross-compiling-raspberry-pi/) to set up crosscompiling for RPi zero 2w running raspbian bullseye. So far I have failed with any ...
dtto's user avatar
  • 1
0 votes
1 answer
35 views

cross compiling release files

In my Makefile I have this to crosscompile for my rpi0w, rpi02w and rpi4: release_files: clean @mkdir build @echo building for linux/amd64 ... @CGO_ENABLED=1 GOARCH=amd64 GOOS=linux $(MAKE)...
Jeroen Oudshoorn's user avatar
1 vote
1 answer
122 views

Correct cross-compilation options to run binary on Raspberry 3 model B

I have Raspberry Pi 3 Model B with me. I am developing on Ubuntu Linux laptop computer. I want to cross-compile so that the binary may run on Raspberry. My Raspberry info: pi@raspberrypi:~ $ cat /proc/...
AlphaParticle's user avatar
1 vote
1 answer
622 views

Help with pico-sdk directory structure and CMake

Background: I am writing C++ code for the Pico on Windows using VS Code and CMake. What was working before: I have been writing programs successfully using the recommended directory structure: + ...
Rocketmagnet's user avatar
1 vote
0 answers
58 views

Is there a toolchain to the Pico 20240 available for Ada?

For nostalgia's sake I was just unearthing some of my Ada texts from the 80's when I came upon this site Ada on the Raspberry Pi Pico. GNAT Ada is available easy enough for RaspberryOS though having a ...
Nick's user avatar
  • 776
0 votes
1 answer
889 views

How to get Python binding to recompiled libcamera?

I am trying to recompile libcamera, as I will be changing some stuff in it and I would therefore like to install it manually. The compilation and installation are successful, but I am not able to ...
arminveres's user avatar
0 votes
2 answers
3k views

Makefile file format not recognized when using cross compiler

I setup a container to cross compile my program so taht i can run it on a Raspberry Pi. It compiles fine when using ${CC} but prints: /usr/bin/arm-linux-gnueabihf-gcc -o test main.o CAcquireData.o ...
MisdeBug's user avatar
0 votes
0 answers
163 views

Can Not Install crossbuild-essential-arm64 On RaspberryPi 4 Model B: Held Broken Packages

I am attempting to install crossbuild-essential-arm64 on my Raspberry Pi 4 Model B, running Raspbian. However, I am getting an error saying "you have held broken packages", along with a list ...
Brendan R.'s user avatar
0 votes
0 answers
356 views

GCC compiling on Pi for x86_64 linux

In using a Raspberry Pi as my development machine - how would I go about compiling a basic C program for running on x86_64 linux? I see some references to x86_64-linux-gnu-gcc, but this package is not ...
Nate Roiger's user avatar
1 vote
1 answer
439 views

Is t possible/feasible to use android's NDK toolchain to cross-compile for Pi?

That's it, really. I have an x86_64 host that already cross-compiles a C application for android's 4 supported architectures, could I use the existing toolchain to build armeabi-v7a for a Pi (running ...
vesperto's user avatar
  • 151
0 votes
1 answer
697 views

Linaro cross toolchain 32 bit or 64 bit?

I am developing a kernel on my PC (running Linux Mint 64 bit) and want to transfer that code later onto a Raspberry Pi 3B+ running Raspbian 32 bit. Now I am confused. Do I need my IDE to pick my gcc-...
uwethebest123's user avatar
0 votes
0 answers
126 views

How to solve "make" issue while cross-compiling for Raspberry Pi 4 on the ubuntu

I am trying to cross-compile this (ultralytics/yolov5) project on my ubuntu machine. Since I am compiling it for my another machine "raspberry Pi" so I already installed the toolchain which ...
Jaskirat Singh's user avatar
0 votes
1 answer
2k views

fatal error: wiringPi.h: No such file or directory

Learning cmake for use with CLion. I have a raspberry pi project and I'm trying to bring in wiringPi library on my Ubuntu box. Here's my build results. ====================[ Build | rookery_exe | ...
Thom's user avatar
  • 117
0 votes
1 answer
109 views

Can't find my raspberry pi executable

So, based on the advice given here: Cannot find filesystem I used the RPi-Cpp-Toolchain to build my executable on my Ubuntu desktop. The build appeared to succeed, but I can't find the executable ...
Thom's user avatar
  • 117
0 votes
1 answer
299 views

Cannot find filesystem

Still scraping rust off of C++ and learning CLion, Raspberry Pi and Cmake. I am following https://blog.monotok.org/compile-locally-run-raspberry-pi-via-clion/ to cross-compile on my Ubuntu platform. I ...
Thom's user avatar
  • 117
0 votes
1 answer
608 views

Unable to run compiler from raspberry-pi-tools, cannot execute binary file: Exec format error

Trying to follow instructions from https://blog.monotok.org/compile-locally-run-raspberry-pi-via-clion/ for building executables on my local machine for my raspberry pi. I have downloaded raspberry pi ...
Thom's user avatar
  • 117
0 votes
1 answer
559 views

Do `pthreads` work on the Pico with the native c++ SDK without posix?

I am trying to port AprilTags to the Pi Pico. This has a dependancy on pthreads. As is outlined in this SO question pthreads needs a posix layer. However there is this youtube video showing it working ...
Edwin Shepherd's user avatar
4 votes
3 answers
1k views

Raspberry Pi 4 Target Architecture Cross Linux From Scratch

I'm following the Cross-compiled Linux From Scratch - Embedded book. I need to know the following information for the Raspberry Pi 4B: Target architecture triplet - aarch64-linux-musleabihf. ...
junglie85's user avatar
  • 181
0 votes
1 answer
2k views

How to build initramfs for custom kernel from cross-compile machine

I'm trying to start my Raspberry Pi with a custom 5.10.y cross-compiled Kernel for https://cdimage.ubuntu.com/releases/20.04.2/release/ubuntu-20.04.2-preinstalled-server-arm64+raspi.img.xz with ...
junglie85's user avatar
  • 181
0 votes
1 answer
181 views

Cross Compilation of Qt OPC UA Server on Raspberry Pi 4B fails

currently I am trying to cross compile a stand-alone Opc Ua Server on a Raspberry Pi4B with Qt 5.15.2 and the Qt Opc Ua Plugin. For Cross Compilation, I used this instruction: https://wapel.de/?p=842. ...
Mauda's user avatar
  • 1
1 vote
0 answers
272 views

how to develop an desktop application for raspberry pi? [closed]

am interested in developing a desktop application for raspberry pi. Am having a little bit of coding experience in c and python. The main thing is I don't understand where to start and how to start. I ...
praveen kumar's user avatar
0 votes
1 answer
2k views

How can I make an app linked against GLIBCXX_3.4.26 run on Raspbian Buster, which only offers 3.4.25?

I'm now trying to compile C++ apps for my Raspi 3B by using crosstool-ng on my OpenSuSE-based host machine. The toolchain now works fine, but when trying to run the app on the Raspi, I always get this ...
Neppomuk's user avatar
  • 452
0 votes
0 answers
129 views

Why does an executable built with crosstool-ng not work on a Pi 3B with 64-bit Raspbian?

I've just tried out crosstool-ng on my Linux PC to compile C++ apps for my Pi 3B much quicker than on the Pi itself. I followed this instruction, but executing the dummy program as stated in the ...
Neppomuk's user avatar
  • 452
4 votes
2 answers
2k views

Where to get Bluetooth/Bluetooth.h for Raspberry Pi?

This is a stupid question. But I cannot find a solution to it. I am trying to build a BLE application with reference to this tutorial https://people.csail.mit.edu/albert/bluez-intro/c404.html. I am ...
user avatar
3 votes
1 answer
11k views

Upgrading libc (libc6) raspberry pi os (rasbian buster)

after extracting so much useful information from this community I finally decided to join this one as well. I have a specific question about the procedure to upgrade glibc. Yes, I know this is 'risky' ...
YVbakker's user avatar
0 votes
1 answer
1k views

Cross compiling QT 5.14 for raspberry pi 4 [ Could not queue DRM page flip on screen HDMI (invalid argument) ]

I have cross-compiled Qt 5.14 on raspberry pi 4 using ubuntu 18.04 I just followed al the steps of this tutoriel https://www.youtube.com/watch?v=TmtN3Rmx9Rk&t=2538s the code is just right here ...
mina's user avatar
  • 377
1 vote
2 answers
2k views

How can i cross-compile for Raspberry Pi Zero with WSL?

I am working on a project with the Raspberry Pi Zero and since I don't have a monitor to connect the Pi and don't want to use vi through ssh I thouhgt that cross compiling would be a decent solution. ...
Riff's user avatar
  • 11
0 votes
1 answer
1k views

Building kernel for raspberry pi 4 b on a host machine(ubuntu 18.04)

I am new to linux and I really need your help. I am working on project for my end of studies internship : controlling sensors and displaying the result on an LCD screen. For that I will use Raspberry ...
mina's user avatar
  • 377
1 vote
0 answers
307 views

Cross compiling 64bit to 32bit

Is there a means of compiling applications on 64bit RaspbianOS to run on 32bit Raspbian? I'm trying to compile Google Test on a 32bit Pi at the moment and I'm not getting very far. So I'm guessing an ...
Nick's user avatar
  • 776
1 vote
1 answer
2k views

Cross compile opencv WITH gstreamer on raspberry pi 3/4

I want to compile opencv WITH gstreamer for an application to run on my Raspberry pi 3b+. I am unsure what to do as many tutorials are outdated or complicated and there is no build with gstreamer ...
Kevin's user avatar
  • 131
1 vote
1 answer
1k views

How to install pi libraries to cross compile for pi-zero in wsl2

I started developing a dbus based code for pi-zero, and compilation is slow. I would like to cross compile in my PC to speed things up. I have WSL2(Ubuntu) setup on my PC and copied the pi toolchain ...
kibudude's user avatar
1 vote
0 answers
178 views

How to cross-compile a binary for a Raspberry Pi written in Haskell in Ubuntu Linux? [closed]

In the past I have compiled binaries for different architectures on an x86_x64 with the resulting target binary generated for a different architecture; For instance the target binary might be for ...
leeand00's user avatar
  • 704
2 votes
0 answers
303 views

OpenCV cross-compilation fails

I have cross-compiled Qt on my CentOS host for my Raspberry Pi and now I want to cross-compile OpenCV with the following script: CORES=4 IP=192.168.178.52 TEMP_PATH=/home/kampi/OpenCV SYSROOT_PATH=/...
Kampi's user avatar
  • 203
1 vote
0 answers
470 views

Compile Linux kernel with toolchain built for aarch64 and uClibc

I am using RPI3 model B I have compiled toolchain using crosstool-ng with the following sample. ./ct-ng aarch64-rpi3-linux-gnu Using ./ct-ng menuconfig, I changed C library from glibc to uClibc. ...
NayabSD's user avatar
  • 111
1 vote
2 answers
1k views

How can I run a cross-compile binary on my RPi?

I compile a simple Hello World programm with different compilers (from https://github.com/raspberrypi/tools): ./arm-linux-gnueabihf-c++ ~/Desktop/hello.c -o ~/Desktop/myapp -static The compilation ...
h0ch5tr4355's user avatar
5 votes
1 answer
6k views

Cross compiling and sysroot

I've been following instructions to cross compile code for the Raspberry Pi but I need some clarification regarding the tool chain and sysroot. My setup is as follows: Host: 4.15.0-76-generic x86_64 ...
Koisto's user avatar
  • 51
1 vote
0 answers
245 views

Cross-compiling QT interface to a Raspberry PI 3

I'm trying to install Qt interface to a Raspberry Pi 3, which raspbian is the "2016-05-27-raspbian-jessie". I didn't want to install, directly, all the packages on the raspberry so as to let ...
Nour's user avatar
  • 19
1 vote
1 answer
626 views

Cross-compile of Qt for Raspberry Pi fails for XCB support with updated toolchain

I had successfully cross-compiled Qt 5.11.2 for Raspbian Buster on Ubuntu 18.04 host mostly using these guides: https://www.ics.com/blog/configuring-qt-creator-raspberry-pi https://wiki.qt.io/...
NickD2039's user avatar
3 votes
1 answer
7k views

Cross compile for Raspberry Pi Zero from Ubuntu?

I've got a CMake project I'd like to cross-compile for Raspberry Pi zero. I'm able to compile my code using the gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf toolchain and run it over Raspberry ...
galah92's user avatar
  • 133
2 votes
1 answer
4k views

Is it possible to compile AOSP on the Raspberry Pi 4?

I am planning to get the RPi4 with 4GB RAM to replace my desktop. I occasionally build AOSP and Lineage for my android devices, so I wanted to check if RPI4 can be used to compile the same? I have ...
desikoder's user avatar
1 vote
0 answers
542 views

Cross-compiling for Raspberry Pi I fails using Linaro 7.4.1 toolchain

I downloaded the latest Linaro toolchain (https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/) to cross-compile C++ code for different Raspberry Pis which running a ...
elnacho's user avatar
  • 43
1 vote
1 answer
1k views

symbol lookup error: undefined symbol: _ZN7QWidget8qwsEventEP8QWSEvent

I have cross-compiled executable file from QT 4.8.7. I am running it on a Raspberry PI (Ubuntu), with QT 4.8.7 and QT declarative module installed. When i run the executable file on my raspberry pi, i ...
Mehta's user avatar
  • 31
3 votes
0 answers
145 views

How do I build just some in-tree modules for the Raspbian kernel?

I would like to cross-build some in-tree modules (capi, gigaset) that are included in the kernel source but not in the standard Raspbian kernel. My toolchain is using the tools from https://github....
maf's user avatar
  • 131
2 votes
2 answers
6k views

“apt-get: command not found” issue on raspberry pi os built using Buildroot

I have built a sdcard.img for raspberry pi using Buildroot. When I run apt-get command it throws error "apt-get: command not found". I did not find apt-get/dpkg package to enable in 'make menuconfig' ...
Prathamesh Konkar's user avatar
1 vote
1 answer
194 views

Linux headers missing from a custom kernel built through cross-compilation

Helo, I have followed the instructions given at https://www.raspberrypi.org/documentation/linux/kernel/building.md to build a custom kernel. (I have cross-compiled it on an x86 box.) The custom ...
Brasiliano's user avatar
2 votes
0 answers
700 views

Qt cross compilation *QOpenGLShaderProgram: could not create shader program* error

I am using the QT Creator for my laptop (Linux LMDE 3 Cindy OS) And for Raspberry Zero Cross-compiling. I have installed the QT based of this instruction and by this setting: mkdir ~/raspi ...
Soheil Paper's user avatar
0 votes
1 answer
330 views

Developing in Ada 2012 in Windows 10 for Raspberry Pi

I would like to develop in Ada 2012 in Windows 10 for Raspberry Pi. I would prefer not to install the GPS on the Raspberry Pi, at least , not at first; not least because I want a headless Pi and to ...
Mawg's user avatar
  • 401
4 votes
6 answers
8k views

Is there a way to cross-compile for armv6 using gcc-7?

I am trying to cross-compile for raspberry B/raspberry zero on ubuntu18.04 using crossbuild-essential-armhf. I installed it using : apt-get install -y crossbuild-essential-armhf In order to test I ...
mpromonet's user avatar
  • 1,124