Pavel_47
Posts: 98
Joined: Mon Jun 12, 2017 8:34 am
Location: Switzerland

Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 12:26 pm

Hello,

After several unsuccessful attempts to build Qt cross toolchain for RPi3, I decided to change the device. This time it's the RPi4. The problem persists: make process on Ubuntu fails due to lack of a library, which is referenced in the code of Qt. Here is the name of library: libatspi. The guys from Qt suggested to install libatspi and libatspi-dev on RPi and then re-synchronize with Ubuntu and rebuild once more. The problem is that RPi can't locate libatspi packages.
Any comments ?
P.S. Here is where it fails (when running make on Ubuntu):

Code: Select all

constant_mappings.cpp: In function ‘quint64 spiStatesFromQState(QAccessible::State)’:
constant_mappings.cpp:82:35: error: ‘ATSPI_STATE_READ_ONLY’ was not declared in this scope
         setSpiStateBit(&spiState, ATSPI_STATE_READ_ONLY);
                                   ^
Makefile:2911: recipe for target '.obj/constant_mappings.o' failed
make[3]: *** [.obj/constant_mappings.o] Error 1
make[3]: Leaving directory '/home/pavel/qtbase/src/platformsupport/linuxaccessibility'
Makefile:358: recipe for target 'sub-linuxaccessibility-make_first' failed
make[2]: *** [sub-linuxaccessibility-make_first] Error 2
make[2]: Leaving directory '/home/pavel/qtbase/src/platformsupport'
Makefile:585: recipe for target 'sub-platformsupport-make_first' failed
make[1]: *** [sub-platformsupport-make_first] Error 2
make[1]: Leaving directory '/home/pavel/qtbase/src'
Makefile:50: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2

User avatar
topguy
Posts: 6284
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 12:42 pm

The library souce can be downloaded from here https://developer.gnome.org/libatspi/ and might be compilable on the Pi ( havent tried )

But maybe a simpler solution would be to disable the build of the module that uses this (linuxaccessibility).

Pavel_47
Posts: 98
Joined: Mon Jun 12, 2017 8:34 am
Location: Switzerland

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 12:45 pm

You mean edit makefile ?

User avatar
topguy
Posts: 6284
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 1:41 pm

The "configure" command has a whole bunch of different options. Maybe you find one that relates to Accessibility.

Which Qt version are you working with ?

Pavel_47
Posts: 98
Joined: Mon Jun 12, 2017 8:34 am
Location: Switzerland

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 2:29 pm

Here is configure options that I used before lunching make:

./configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v

Have you an idea which option could disable libatspi ?

User avatar
topguy
Posts: 6284
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 2:45 pm

No.. but do a "./configure --help" and you will see the rest of the options..

Pavel_47
Posts: 98
Joined: Mon Jun 12, 2017 8:34 am
Location: Switzerland

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 4:56 pm

Here is the option report used during the build:

Build options:
Mode ................................... release
Optimize release build for size ........ no
Building shared libraries .............. yes
Using C standard ....................... C11
Using C++ standard ..................... C++11
Using ccache ........................... no
Using gold linker ...................... no
Using new DTAGS ........................ yes
Using precompiled headers .............. yes
Using LTCG ............................. no
Target compiler supports:
NEON ................................. yes
Build parts ............................ libs
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... yes
Qt D-Bus directly linked to libdbus .... yes
Qt Gui ................................. yes
Qt Network ............................. yes
Qt Sql ................................. yes
Qt Testlib ............................. yes
Qt Widgets ............................. yes
Qt Xml ................................. yes
Support enabled for:
Using pkg-config ....................... yes
udev ................................... yes
Using system zlib ...................... yes
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... yes
iconv .................................. yes
ICU .................................... no
Tracing backend ........................ <none>
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
Using system PCRE2 ..................... no
Qt Network:
getifaddrs() ........................... yes
IPv6 ifname ............................ yes
libproxy ............................... no
Linux AF_NETLINK ....................... yes
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ no
OpenSSL 1.1 ............................ no
DTLS ................................... no
SCTP ................................... no
Use system proxies ..................... yes
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ yes
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. yes
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... yes
PNG .................................. yes
Using system libpng ................ yes
EGL .................................... yes
OpenVG ................................. yes
OpenGL:
Desktop OpenGL ....................... no
OpenGL ES 2.0 ........................ yes
OpenGL ES 3.0 ........................ yes
OpenGL ES 3.1 ........................ yes
OpenGL ES 3.2 ........................ yes
Vulkan ................................. no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. yes
libinput ............................... yes
INTEGRITY HID .......................... no
mtdev .................................. yes
tslib .................................. yes
xkbcommon .............................. yes
X11 specific:
XLib ................................. yes
XCB Xlib ............................. yes
EGL on X11 ........................... yes
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... yes
EGLFS GBM ............................ yes
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ yes
LinuxFB ................................ yes
VNC .................................... yes
Mir client ............................. no
XCB:
Using system-provided XCB libraries .. yes
XCB XKB .............................. yes
XCB XInput ........................... no
Native painting (experimental) ....... yes
GL integrations:
GLX Plugin ......................... no
EGL-X11 Plugin ..................... yes
Qt Sql:
SQL item models ........................ yes
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows
Qt PrintSupport:
CUPS ................................... yes
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... yes
PostgreSQL ............................. yes
SQLite2 ................................ yes
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... yes
Qt Testlib:
Tester for item models ................. yes


I don't see anything in connection with libatspi.

User avatar
topguy
Posts: 6284
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 5:18 pm

Since you already have someones attention on the Qt forums, maybe ask them.
You still havent told us which version of Qt you are trying to build.

Pavel_47
Posts: 98
Joined: Mon Jun 12, 2017 8:34 am
Location: Switzerland

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 12, 2020 7:49 pm

Qt version: 5.12.6

Pavel_47
Posts: 98
Joined: Mon Jun 12, 2017 8:34 am
Location: Switzerland

Re: Building Qt cross toolchain for RPi4: library is missed

Thu Feb 13, 2020 11:42 am

I have checked this library on RPi - and found it in /user/lib/arm-linux-gnueabihf/.
But it isn't present in ~/raspi/sysroot/usr/lib/arm-linux-gnueabihf/ on Ubuntu after re-synchronization.
There are problems with synchronization between Ubuntu and RPi but no any log file. I've checked information on display buffers, but didn't see any errors. But at the end of resync execution I get this message:

sent 838,480 bytes received 1,554,923,460 bytes 2,198,956.81 bytes/sec
total size is 3,341,241,457 speedup is 2.15
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1668) [generator=3.1.2]

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25417
Joined: Sat Jul 30, 2011 7:41 pm

Re: Building Qt cross toolchain for RPi4: library is missed

Wed Feb 19, 2020 1:17 pm

Is this specific to Ubuntu? Been asked to move this to a more appropriate forum, but not sure where it would go.If its specific to Ubuntu it needs to stay here.

When I do `apt-cache search libatspi` on the Pi there are packages, so not sure why they are apparently missing. What errors are seem when trying to install the packages?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

Return to “Ubuntu”