Questions tagged [cross-compilation]
Questions on how to compile software for the Raspberry Pi using other devices.
182
questions
1
vote
1
answer
84
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/...
1
vote
1
answer
179
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:
+ ...
1
vote
0
answers
51
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 ...
0
votes
0
answers
135
views
How to use libwiringPi.so for cross compiling using CMake?
I'm trying to use CMake to cross compile a C++ code using the Wiring Pi library but I'm having trouble with making CMake to find said the correct library. Since I'm compiling from x86 to ARM in order ...
0
votes
1
answer
742
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 ...
0
votes
2
answers
2k
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 ...
0
votes
0
answers
140
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 ...
0
votes
0
answers
310
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 ...
1
vote
1
answer
398
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 ...
0
votes
1
answer
621
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-...
0
votes
0
answers
119
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 ...
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 | ...
0
votes
1
answer
92
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 ...
0
votes
1
answer
262
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 ...
0
votes
1
answer
578
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 ...
0
votes
1
answer
502
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 ...
4
votes
3
answers
905
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.
...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
172
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.
...
1
vote
0
answers
225
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 ...
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 ...
0
votes
0
answers
125
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 ...
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 ...
3
votes
1
answer
9k
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' ...
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 ...
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. ...
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 ...
1
vote
0
answers
282
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 ...
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 ...
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 ...
1
vote
0
answers
169
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 ...
2
votes
0
answers
281
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=/...
1
vote
0
answers
453
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. ...
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 ...
4
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
...
1
vote
0
answers
238
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 ...
1
vote
1
answer
570
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/...
3
votes
1
answer
6k
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 ...
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 ...
1
vote
0
answers
530
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 ...
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 ...
3
votes
0
answers
138
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....
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' ...
1
vote
1
answer
161
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 ...
2
votes
0
answers
687
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
...
0
votes
1
answer
328
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 ...
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 ...
1
vote
0
answers
218
views
Raspberry Pi Qt toolchain on Ubuntu 16.04
I have issues creating a tool-chain for cross compiling Raspberry Pi 3 Qt applications through Ubuntu. I used directions from this guide, https://wiki.qt.io/Raspberry_Pi_Beginners_Guide, to help me ...
2
votes
0
answers
1k
views
Latest Qt5 does not provide EGLFS during cross-compilation
Some time ago I set up a Linux host to cross-compile Qt5. I used this configure command:
./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/opt/tools/arm-...
3
votes
1
answer
3k
views
Cross compiling for RPi - error while loading shared libraries
I'm trying to compile a simple program on my Ubuntu using the ARM cross compile toolchain (arm-linux-gnueabihf-gcc) and run it on my Raspberry Pi. The program is using the wiringPi shared library (...