WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore packages for cross-compilation  (Read 1802 times)

Offline srg

  • Newbie
  • *
  • Posts: 6
piCore packages for cross-compilation
« on: December 14, 2022, 06:41:58 AM »
I want to set up a cross compile for piCore, and I'm following this tutorial (https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi), but the steps would work on Raspbian.

Do you know what packages would need to be installed on piCore to generate the sysroot in the "Building Sysroot from Device" step?

Or if you know any manual I can follow for cross-compiling on piCore.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: piCore packages for cross-compilation
« Reply #1 on: December 15, 2022, 12:08:49 PM »
Thats really complicated.  You will likely run in to library issues.

for piCore64, everything except the kernel is compiled natively.

Offline srg

  • Newbie
  • *
  • Posts: 6
Re: piCore packages for cross-compilation
« Reply #2 on: January 03, 2023, 04:39:54 AM »
And could you help me to compile Qt5 natively on piCore?

Necessary packages, dependencies... Parameters for Configure, Make and installation of Qt source?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14799
Re: piCore packages for cross-compilation
« Reply #3 on: January 03, 2023, 05:41:15 AM »
You can refer to this: http://tinycorelinux.net/11.x/x86_64/tcz/src/qt-5.x/

..note that you would need to replace "-mtune=generic" by "-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp"

Offline srg

  • Newbie
  • *
  • Posts: 6
Re: piCore packages for cross-compilation
« Reply #4 on: January 09, 2023, 02:46:49 AM »
Thanks but after make and make install I get errors like the one in the attached image, so I'm missing something to install or there is something wrong with the configuration.

Device: Raspberry Pi 3b+
piCore: 13 armv7

Adapted tce packages from the url http://tinycorelinux.net/11.x/x86_64/tcz/src/qt-5.x
Code: [Select]
tce-load -wi compiletc sqlite3-dev libmng-dev libpng-dev libtiff-dev cups-dev pulseaudio-dev perl5 gst-plugins-base-dev libwebp-dev mtdev-dev ruby-dev geoclue-dev libpci-dev nss-dev libxkbcommon-dev gperf libgcrypt-dev gnome-keyring-dev libinput-dev harfbuzz-icu-dev wayland-protocols jasper-dev dbus-dev pcre2-dev gzip bash libxslt-dev zstd-dev libvulkan-dev python3.10 ffmpeg-dev

Configure params:
Code: [Select]
CC="gcc -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" CXX="g++ -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" sudo time /mnt/mmcblk0p2/tce/images/qt-everywhere-src-5.14.0/configure -v -opengl es2 -eglfs -no-gtk -opensource -confirm-license -release -reduce-exports -force-pkg-config -nomake examples -no-compile-examples -nomake tests -skip qtwayland -skip qtwebengine -no-feature-geoservices_mapboxgl -qt-pcre -no-pch -ssl -evdev -system-freetype -fontconfig -glib -prefix /usr/local/qt5 -qpa eglfs

However, it takes forever to compile, it's frustrating to test, it's not practical at all.

Do you know if there is a way to emulate piCore in a docker or similar to make compilations faster?
« Last Edit: January 09, 2023, 03:10:48 AM by srg »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14799
Re: piCore packages for cross-compilation
« Reply #5 on: January 09, 2023, 03:01:42 AM »
Do you see any warnings about missing libs when ./configure runs?

What does this give:
Code: [Select]
pkg-config --libs xcb
pkg-config --libs xkbcommon

I've always compiled natively on RPi3/RPi4 so cannot help with cross compiling.
« Last Edit: January 09, 2023, 03:31:21 AM by Juanito »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: piCore packages for cross-compilation
« Reply #6 on: January 10, 2023, 11:49:30 PM »
I advice to drop cross compilation and do it natively especcially with a complex application like Qt. My personal experience is that it works for smaller stand alone binaries but for I always ended in a similar situation wasting lot of time trying cross compilation. I'm building kernel, gcc, glibc, ... on RPi 3/4, It is fast enough and safe.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."