build Qt distcc Raspberry Pi 2 unrecognized command line option

  • Hi there,

    The mission: crosscompile Qt-5.10.1 on my Raspberry Pi 2 with
    the help of my desktop running distcc server

    Desktop: gentoo, arm64, gcc-7.3.1
    Raspberry Pi 2, Ubuntu Mate gcc-7.3.1

    Distcc server is running on desktop, test compile a code snippet on the Raspberry Pi with "distcc -o main.o -c main.c" succeeds with:

    (dcc_job_summary) client: COMPILE_OK exit:0 sig:0 core:0 ret:0 time:29ms cc main.c

    on the Desktop.

    Now for the short test I dive into

    cd /mnt/u/opt/qt-everywhere-src-5.10.1/qtsvg/

    on the Raspberry and run:

    make -j3 CXX="distcc" CC="distcc"

    I get compile error on the Desktop server logs:

    COMPILE_ERROR exit:1 sig:0 core:0 ret:0 time:2344ms cc qsvghandler.cpp

    And this error in the /tmp logs on the raspberry:

    gcc: Fehler: nicht erkanntes Kommandozeilenargument in Option »-mabi=aapcs-linux«
    gcc: Anmerkung: gültige Argumente für »-mabi=« sind: ms sysv
    gcc: Fehler: unbekannte Kommandozeilenoption »-marm«; meinten Sie »-mabm«?
    gcc: Fehler: unbekannte Kommandozeilenoption »-mthumb-interwork«
    gcc: Fehler: unbekannte Kommandozeilenoption »-mfpu=neon-vfpv4«
    gcc: Fehler: unbekannte Kommandozeilenoption »-mfloat-abi=hard«

    meaning something like "unknown commandline option.."..
    Any ideas where this behaviour comes from, how to fix it?

  • Moderators

    Have you run configure in you Qt source root dir? You need your source configured, and qtbase built, before you can proceed with other Qt modules

  • Yes, prior crosscompile I compiled Qt natively on the raspberry pi because all attemps to compile including qtwebengine failed...
    So I decided to compile without qtwebengine and without crosscompile:

    PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig PKG_CONFIG_SYSROOT_DIR=/ ../qt-everywhere-src-5.10.1/configure -v -opengl es2 -eglfs -no-gtk -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/usr/bin/ -opensource -confirm-license -release -reduce-exports -force-pkg-config -no-kms -nomake examples -no-compile-examples -no-pch -skip qtwayland -no-feature-geoservices_mapboxgl -qt-pcre -ssl -evdev -system-freetype -fontconfig -glib -skip qtwebengine -prefix /mnt/u/opt/Qt5.10/ && make -j4

    That succeeded but now I really want to compile the rest (qtwebengine) via crosscompile... But even without crossc. it fails to compile it somewhere at step (~11100 of ~16000). Then my HDD is permanently blinking, seems to swap endlessly , cpu is at 5% and nothing goes on...

    I simply dont want to wait for every attemp to compile qtwebengine one whole day until I reach 11100 of 16000 again... So I really want crosscompile that part.

  • Moderators

    Hm I don't think I can help, then. I always skip web engine when compiling for Raspberry.

    Perhaps people who build Raspbian will be able to help? I remember that RPi has some special patches for chromium's engine (which is the same as in QtWebEngine IIRC), and they have built Qt for raspbian at some point...

  • Well, I consider to remove/change the code in my qt app to not depend on qtwebengine... It just displays some wheather maps (images) from an online source. I think I can realize that by fetching those images somehow from that online source and display them on an QLabel or so. I think qtwebengine is quite an overkill for that :)