Questions tagged [cross-compilation]

Questions should concern compiling for a platform different than the one the compiler is running on. Compiling inside a VM does not count unless it's some sort of hybrid setup i.e. the host which is a different platform is involved.

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

Compile git for /lib/ld-linux-armhf.so.3 from vm that links with /lib/ld-linux-aarch64.so.1 by default

I'm building git from source from a debian 10 vm that has /lib/ld-linux-aarch64.so.1, which ends up linked in the git binary after a basic NO_TCLTK=true make prefix=$(pwd)/2.41.0/arm make all and ~ ...
bpstrngr's user avatar
  • 101
1 vote
1 answer
275 views

How can I create the kernel headers for ARM on X86?

I have an ARM-based board, which I used with factory kernel (5.10.110). To manually build a kernel module, I needed the kernel-header package. To install this package it was explained in the ...
Daniel's user avatar
  • 319
0 votes
2 answers
122 views

could cross compiling be faster than compiling natively?

I've got an arm-based (arm_v8-64, ubuntu20.04) target machine and an amd-based host machine (x86_64, ubuntu20.04). Since the cpu is much more powerful on the host than on the target, I wonder whether ...
furynerd's user avatar
0 votes
0 answers
53 views

'unicode/ucnv.h' file not found when cross compiling PHP for Android

I'm trying to cross compile PHP to Android. After i ran ./configure --host=$TARGET --enable-static --without-iconv all went fine. But when i run make CFLAGS=-I/usr/include/unicode i get following ...
kpwn Apps's user avatar
-1 votes
1 answer
67 views

What are the best practices on storing cross-compiled libs? [closed]

I have a project I want to cross compile (as well as native). I've installed my cross compiler under /opt/x-compiler/arm32/ and I also add some dependencies I have under /opt/lib/arm32/. The ...
CIsForCookies's user avatar
1 vote
1 answer
85 views

configure: error: Could not find alsa!

I'm trying to cross compile jdk for android. I run: ./configure --with-toolchain-path=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64 --with-sysroot=$ANDROID_NDK_HOME/platforms/android-21/...
kpwn Apps's user avatar
0 votes
0 answers
46 views

What is the bootstrapping technique in terms of building cross-gcc and cross-glibc?

Some tutorials for building linux from ground do in first step building the cross compiler toolchain. They do this by invoking so called bootstrapping technique. First they build cross-gcc statically, ...
ptiza_v_nebe's user avatar
0 votes
0 answers
112 views

Nodejs is not building in buildroot because ‘va_list’ has not been declared

I try to build an embedded linux with nodejs for Radxa Zero SBC. I included nodejs through Target packages ---> Interpreter languages and scripting > nodejs and NPM for the target. In the ...
mister_kanister's user avatar
0 votes
0 answers
69 views

How to manually "add" GTK+-3.0 libraries for ARM on a i386 Debian Stretch 32?

I'm working on this old PC running a Debian Stretch 32 bit: some years ago there was the need to compile wxwidgets for arm-gnueabi-hf and was tried to use multiarch to install GCC and GTK2. Something (...
Parduz's user avatar
  • 201
2 votes
1 answer
372 views

GCC linker search path when cross-compiling

I have various tool chain directories on my linux machine for compiling under specific compiler versions. I have a problem where the linker (in the tool chain dir) is selecting a library file from ...
kfank's user avatar
  • 21
0 votes
1 answer
468 views

what target flag should I set to cross compile arm 32 bit code in gcc?

I'm trying to build a cross compiling build server for some 32 bit arm devices, where the architecture is: (from uname -m) "armv5tejl" I have to specify the target for binutils, and gcc, ...
j0h's user avatar
  • 3,487
0 votes
0 answers
119 views

I need help building a kernel

I have some TS-7600 single board computers and I want to recompile the linux kernel to version 3.14 where I will gain some easy of use for the hardware clock, and compatible devices. There is a ...
j0h's user avatar
  • 3,487
1 vote
0 answers
88 views

Testing gcc command in Linux From Scratch?

Linux From Scratch tells me to run these commands to test that the new toolchain is working: echo 'int main(){}' | gcc -xc - readelf -l a.out | grep ld-linux So since I am testing the new toolchain, ...
IPmanfkawde's user avatar
0 votes
1 answer
744 views

Cross-compiling a Debian package from source

There is a package I build from source, following this recipe: echo "deb-src http://archive.ubuntu.com/ubuntu focal main" >> /etc/apt/sources.list echo "deb-src http://archive....
rgov's user avatar
  • 173
0 votes
0 answers
69 views

cross compiling a kernel with backports

I have a "backport" which consists of a makefile that produces some ko files for device driver support. It also comes with some binaries that are dropped on to the host machine in addition ...
GodJohnson's user avatar
1 vote
1 answer
304 views

Unable to cross-compile GNU screen for ARM

I'm on Ubuntu, and trying to build GNU screen for an old ARM device running Busybox. I have a custom cross-compilation toolchain installed in /usr/local/toolchain. I downloaded screen 4.3.1 (from 7 ...
jerkstorecalled's user avatar
1 vote
1 answer
237 views

Compiling a C program with Clang for MIPS (32-bit) on a FreeBSD x86_64/AMD64 system

Is there a way to compile a C program with Clang compiler for MIPS (32-bit) on a FreeBSD x86_64/AMD64 system?
ordinary_guy's user avatar
1 vote
1 answer
107 views

Why this script stuck at "can't execute" branch?

I'm using this tool-chian provided by a manufacture of control boards. I followed the instruction step by step but when I tried to compile example code, the compilation process got stuck at "$...
cream_pi's user avatar
0 votes
0 answers
692 views

Segmentation Fault when entering chroot for LFS

I have been compiling an LFS [Linux From Scratch] operating system, and thus far there were no errors. However, when I was compiling the Linux Kernel, I accidentally tripped on the power cord to my PC ...
rando's user avatar
  • 101
1 vote
1 answer
1k views

How to install armr5-none-eabi-g++ and associated toolchain?

I'm tasked with adding a cross-compiler to an existing Docker image that contains multiple cross-tools. From our existing Dockerfile, I see that apt-get install -y --no-install-recommends build-...
StoneThrow's user avatar
  • 1,585
0 votes
1 answer
255 views

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

I have two options to compile: Cross-compile using an amd64 Ubuntu or Debian system for armhf package compilation. Run an armhf image of Ubuntu or Debian in QEMU. The problem I have is that when ...
Matty A.D.'s user avatar
2 votes
0 answers
227 views

libtool (arm): error: only absolute run-paths are allowed

I am cross-compiling SSSD for ARM architecture.  When I run make, I obtain the following error: arm-xilinx-linux-gnueabi-libtool: error: only absolute run-paths are allowed I configure it as ...
user15061000's user avatar
0 votes
2 answers
2k views

Cross-compile libgpiod library and use it in my program

I am trying to cross-compile a program with the "gpiod" library. My host pc has Ubuntu 18.04 and the target platform I am cross-compiling for is a Board with IMX8X SOM. I found source code ...
powermignolo's user avatar
1 vote
1 answer
2k views

How can I install multi-architecture packages on RHEL 8

On an x86_64 Ubuntu 20.04 system, after some minor modifications under /etc/apt and running dpkg --add-architecture s390x, I can install the foo-dev:s390x package and the gcc-8-s390x-linux-gnu package ...
acm's user avatar
  • 257
0 votes
0 answers
849 views

Glibc 2.34 cross-compiling issue for aarch64 on x86_64

aarch64-linux-gnueabihf-gcc ../sysdeps/gnu/getutmpx.c -c -std=gnu11 -fgnu89-inline -g -O2 -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -...
James's user avatar
  • 101
1 vote
0 answers
59 views

.NET 5 issue on "old" arm64 / how to publish for arm64/gcc4.x

Background I'm having more success than expected running binaries from a (relatively simple) C# program on "antiquated" arm and arm64 systems built on linux-x64 and published with RIDs linux-...
ppenguin's user avatar
  • 115
0 votes
0 answers
30 views

Ubuntu can't run on vm-ware after installing local packages

i want to do petalinux cross-compilation at ubuntu on vm-ware and offline. so, i downloaded all needed packages and installed them. and then i tried to restart ubuntu. but, unfortunately, ubuntu not ...
Leonardo's user avatar
0 votes
1 answer
181 views

Compilation order when cross compiling Linux

I've been following the Linux From Scratch book and just need to fill some gaps in my understanding of cross compiling Linux. Where a toolchain has already been built for the target machine, is the ...
oorst's user avatar
  • 101
6 votes
3 answers
3k views

Why is the Canadian Cross used for cross-compilation in Linux From Scratch?

I'm going through the Linux From Scratch 11.0 book. In III. Building the LFS Cross Toolchain and Temporary Tools, ii. Toolchain Technical Notes, there is a bit about Canadian Cross cross-compilation. ...
mnj's user avatar
  • 271
2 votes
1 answer
2k views

Crosscompile go(lang) app with docker for alpine linux (musl) aarch64 with native libs so CGO enabled

Background I'm writing an open-source GTK go app subsonic API client which: targets on first place mobile friendly Linux like postmarketOS (alpine linux), Mobian (debian) in future will be also ...
BigB's user avatar
  • 21
1 vote
0 answers
337 views

Error while loading shared libraries (libandroid.so): internal error

I'm trying to run a sample sensor NDK application in an embedded target with Qualcomm Snapdragon QCS610 running a Linux BSP supplied from the dev board manufacturer. The sensor application depends on ...
Laks's user avatar
  • 11
0 votes
1 answer
306 views

emacs ./configure encounters missing function 'tputs' when cross-compiling for arm-linux-gnueabihf

I'm trying to cross compile Emacs for an armv7l system on my main rig through an Arch virtual-box, and so far I've had no issues until the ./configure stage. I've properly set up the build, host, and ...
itz-el's user avatar
  • 1
0 votes
1 answer
2k views

Where to get linux "5.4.0-77-generic" kernel source?

I have installed ubuntu 20.04 on a qemu arm64 virtual machine. This is based on qemu's arm64 'virt' machine and I added a peripheral in the virtual machine. Now to test device driver, I need to build ...
Chan Kim's user avatar
  • 367
2 votes
1 answer
6k views

How do I cross compile the Linux kernel?

I've spent hours, if not days figuring out how to cross compile Linux for AArch64. I'm using Ubuntu in a VM to do this, however all guides I managed to find didn't work completely. Most of them ...
László Szerémi's user avatar
0 votes
0 answers
829 views

How to crosscompile a kernel for raspbian in an arch linux host?

I have a raspberrypi 3B and want to compile and install a new kernel on it, but I only have an arch linux(x86_64) host to compile it on. Following the official documentation I get stuck trying to ...
barzilay's user avatar
1 vote
1 answer
438 views

LFS GCC-10.2.0 Pass 2 Fails with source-code error in crtstuff.c

When I'm trying to run Chapter 6.18 of the LFS (with systemd) book, make fails because in the file crtstuff.c, line 695, there is an undefined reference to __CTOR_END__. This seems like some sort of g+...
Alexander P's user avatar
1 vote
1 answer
581 views

Why can my statically compiled ARM binary of BusyBox run on my x86_64 PC? [duplicate]

Bit of a strange situation there. I compiled a static executable of BusyBox 1.32.1 for the ARM platform (32-bit) and strangely it runs without problems on both platforms. Look by yourself: root@...
Nicolas Mailloux's user avatar
0 votes
1 answer
261 views

Linux Kernel custom module build skips module

I'm trying to cross-compile (arm64) a custom module on my linux box. So what I did so far is: install the target Kernel sources install the cross-compiler enable module and build the Kernels with the ...
cips's user avatar
  • 1
1 vote
1 answer
1k views

Cross-compiling Linux kernel fails on bzImage

I want to compile a Linux kernel from scratch for the arm64 (aarch64) platform, used for booting a Raspberry Pi 4. The host is amd64 and is running a Debian-variant (Ubuntu 20.04.1 LTS) I created the ...
Grez's user avatar
  • 21
1 vote
0 answers
130 views

what are the leftovers from the previous builds of Qt?

it's been a while that I am trying to cross compile Qt for my Raspberry pi 4 on a lite version of OS (that has no desktop, no x server ..) on my Ubuntu 18.04 I tried many times and I changed the ...
mina's user avatar
  • 111
0 votes
1 answer
222 views

What is convention on where to install cross-platform libraries?

What is the prevailing (or correct) convention on where to install cross-platform libraries? E.g. libfoo.so.1.0.0 compiled for the host might typically be located at /usr/local/lib/. If I also had to ...
StoneThrow's user avatar
  • 1,585
0 votes
1 answer
3k views

Building a gcc cross compiler on linux, how do I know which "--target"s are supported and the exact keyword for specifying them?

I'm trying to build gcc compiler to producing executables that are supposed to run on x86-64 machines. I'm actually using existing 64bit gcc compiler on my computer. It is redundant but I'm doing it ...
User's user avatar
  • 232
0 votes
0 answers
180 views

Error on building gcc cross compiler toolchain

I'm following this guide to build a linux system for learning experience On the the guide at the section titled GCC (Static), I'm having an error, on running the command ` $ ln -vs libgcc.a `${...
User's user avatar
  • 232
1 vote
1 answer
217 views

Which of these commands actually installs gcc?

I'm writing a "custom" Linux system, mainly using this guide. Great guide! But, my problem is, once I boot into my system, I don't have gcc. Now, it's completely possible that I missed a ...
Bobbbay's user avatar
  • 401
1 vote
1 answer
3k views

-lcrypt error cross compiling 64 to 32

I am trying to compile dirtycow exploit file which can be found in here. gcc -pthread dirty.c -o dirty -m32 -lcrypt Because my target is 32 bit I compile it with -m32 and -lycrypt to make sure it ...
hanysfa's user avatar
  • 103
1 vote
0 answers
30 views

Ubuntu Core/Debian Compiling for MT2712

I want to build latest kernel of Ubuntu core or Debian for MT2712 but I cannot find any ways to compile the Debian or Ubuntu for this. Is MT2712 supported by Ubuntu or Debian? Can anyone guide me ...
Hunzla's user avatar
  • 11
0 votes
1 answer
821 views

How to compile busybox for cortex-m7 (-march=armv7-m)?

I'm trying to run busybox on my waveshare stm32 development board but my SOC has "armv7-m" architecture not "armv7-a". so I've put the march flag in the menuconfig of busybox (-...
Mahyar Shokraeian's user avatar
0 votes
1 answer
1k views

cannot cross-compile busybox for arm

I've configured my busybox in menuconfig and made it as a static binary (no shared libs) + forced no MMU build. I'm using the prebuilt arm cross compiler and when I enter the below command, it gave me ...
Mahyar Shokraeian's user avatar
0 votes
0 answers
2k views

WARNING: No NSS support for mDNS detected, consider installing nss-mdns!

I have cross compiled avahi-0.8 library for MIPS plateform. I am able to run avahi daemon on consol. but getting below warning : WARNING: No NSS support for mDNS detected, consider installing nss-mdns!...
Nirav Patel's user avatar
-12 votes
1 answer
163 views

Why do FOSS developers claim cross-platform support when their stuff is frequently broken on Windows in frustrating ways? [closed]

Two examples out of thousands I've countered: Bitcoin Core on Windows has a very annoying glitch which causes a cmd.exe (or similar) window to briefly appear and immediately go away, showing only for ...
K. Seer's user avatar

1
2 3 4 5 6