crocket
Posts: 111
Joined: Thu Mar 07, 2019 12:38 pm

[SOLVED] How can I change SYSROOT for aarch64-unknown-linux-gnu-emerge?

Sat Mar 23, 2019 9:23 am

qemu arm64 chroot is at least 10 times as slow as cross compilation because it is single-threaded and my CPU has 8 threads.
I want to use cross-compilation instead of qemu arm64 chroot.

I want aarch64-unknown-linux-gnu-emerge to work as if it were in an arm64 chroot. How can I do that?

Code: Select all

sudo env ROOT=/mnt/data/Backup/rpi3b+ SYSROOT=/mnt/data/Backup/rpi3b+ PORTAGE_CONFIGROOT=/mnt/data/Backup/rpi3b+ ARCH=arm64 CROSS_C
OMPILE=aarch64-unknown-linux-gnu- aarch64-unknown-linux-gnu-emerge -q sys-fs/zfs
results in the following error in config.log

Code: Select all

configure:15731: cp conftest.c build && make modules -C /mnt/data/Backup/rpi3b+/usr/src/linux EXTRA_CFLAGS=-Werror-implicit-function-declaration   M=/var/tmp/portage/sys-kernel/spl-0.7.13/work/spl-0.7.13/build
/lib/ld-linux-aarch64.so.1: No such file or directory
make[1]: *** [scripts/Makefile.build:310: /var/tmp/portage/sys-kernel/spl-0.7.13/work/spl-0.7.13/build/conftest.o] Error 255
make[1]: *** Deleting file '/var/tmp/portage/sys-kernel/spl-0.7.13/work/spl-0.7.13/build/conftest.o'
make: *** [Makefile:1520: _module_/var/tmp/portage/sys-kernel/spl-0.7.13/work/spl-0.7.13/build] Error 2
/mnt/data/Backup/rpi3b+/lib/ld-linux-aarch64.so.1 exists, but /lib/ld-linux-aarch64.so.1 doesn't.
It seems aarch64-unknown-linux-gnu-emerge cannot work as if it were in /mnt/data/Backup/rpi3b+
Last edited by crocket on Thu Mar 28, 2019 11:07 am, edited 5 times in total.

k-pi
Posts: 811
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: What is the fastest way to build arm64 packages for Raspberry Pi 3B+?

Sat Mar 23, 2019 10:32 am

A desktop/laptop, with a fast processor & plenty of ram, & a cross compiler tool chain, I would think. 8-)

crocket
Posts: 111
Joined: Thu Mar 07, 2019 12:38 pm

Re: How can I change SYSROOT for aarch64-unknown-linux-gnu-emerge?

Mon Mar 25, 2019 9:34 am

I gave up on fiddling with aarch64-unknown-linux-gnu-emerge.

Return to “Gentoo”