Talk:Cross-Compile Qt 6 for Raspberry Pi: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(Replaced content with "This discussion page is intended for talks about improving the article. Feel free to suggest anything to make the page better --~~~~ <h2>Issue with libdbus</h2> I just ad...")
Tag: Replaced
Line 1: Line 1:
This discussion page is intended for talks about improving the article.
This discussion page is intended for talks about improving the article. Feel free to suggest anything to make the page better --[[User:Uraihan|Uraihan]] ([[User talk:Uraihan|talk]]) 15:14, 22 June 2022 (UTC)


<h2>Issue with libdbus</h2>
<h2>Issue with libdbus</h2>
During the testing process, we found a compilation error related to libdbus.
I just added my own issue with <code>libdbus</code> in the main page, but I actually still undecided whether I should keep it there or not. --[[User:Uraihan|Uraihan]] ([[User talk:Uraihan|talk]]) 15:14, 22 June 2022 (UTC)
 
<syntaxhighlight lang="shell">
FAILED: qtbase/lib/libQt6DBus.so.6.3.0 qtbase/src/dbus/DBus.version /home/uraihan/qt-cross/qtbase/src/dbus/DBus.version
cd /home/uraihan/qt5/qtbase/src/dbus && /usr/bin/perl /home/uraihan/qt5/qtbase/mkspecs/features/data/unix/findclasslist.pl < /home/uraihan/qt-cross/qtbase/src/dbus/DBus.version.in > /home/uraihan/qt-cross/qtbase/src/dbus/DBus.version && cd /home/uraihan/qt-cross && /usr/bin/aarch64-linux-gnu-g++-9 --sysroot=/home/uraihan/rpi-sysroot -fPIC -I/home/uraihan/rpi-sysroot/usr/include -pipe -O2  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed  -Wl,--version-script,/home/uraihan/qt-cross/qtbase/src/dbus/DBus.version -Wl,--no-undefined -Wl,--enable-new-dtags -shared -Wl,-soname,libQt6DBus.so.6 -o qtbase/lib/libQt6DBus.so.6.3.0 qtbase/src/dbus/CMakeFiles/DBus.dir/DBus_autogen/mocs_compilation.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbus_symbols.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusabstractadaptor.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusabstractinterface.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusargument.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusconnection.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusconnectioninterface.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbuscontext.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbuserror.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusextratypes.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusintegrator.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusinterface.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusinternalfilters.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusintrospection.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusmessage.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusmetaobject.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusmetatype.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusmisc.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbuspendingcall.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbuspendingreply.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusreply.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusserver.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusservicewatcher.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusunixfiledescriptor.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusutil.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusvirtualobject.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusxmlgenerator.cpp.o qtbase/src/dbus/CMakeFiles/DBus.dir/qdbusxmlparser.cpp.o  -Wl,-rpath,/home/uraihan/rpi-sysroot:/home/uraihan/qt-cross/qtbase/lib:  /home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a  qtbase/lib/libQt6Core.so.6.3.0  -lpthread && :
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-message.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `dbus_message_unref' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-message.o): in function `_dbus_message_loader_unref':
(.text+0x59d8): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-timeout.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_dbus_timeout_unref' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-timeout.o): in function `_dbus_timeout_list_free':
(.text+0x130): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-watch.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_dbus_watch_unref' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-watch.o): in function `_dbus_watch_list_free':
(.text+0x1b0): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-sysdeps-unix.o): in function `_dbus_listen_systemd_sockets':
(.text+0x204c): undefined reference to `sd_listen_fds'
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: (.text+0x2090): undefined reference to `sd_is_socket'
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-userdb.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_dbus_group_info_unref' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/uraihan/rpi-sysroot/usr/lib/aarch64-linux-gnu/libdbus-1.a(libdbus_1_la-dbus-userdb.o): in function `_dbus_user_database_new':
(.text+0x4e8): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
[563/4792] Building CXX object qtbase/src/testlib/CMakeFiles/Test.dir/qjunittestlogger.cpp.o
ninja: build stopped: subcommand failed.
</syntaxhighlight>
 
It was found that the libdbus inside the initial sysroot was not a dynamically shared objects. As a temporary fix, it was decided to temporarily exclude this feature from the configuration by including <code>-DFEATURE_dbus=OFF</code> flag, but this is fixable by doing clean reinstall of Raspberry Pi OS.

Revision as of 15:14, 22 June 2022

This discussion page is intended for talks about improving the article. Feel free to suggest anything to make the page better --Uraihan (talk) 15:14, 22 June 2022 (UTC)

Issue with libdbus

I just added my own issue with

libdbus

in the main page, but I actually still undecided whether I should keep it there or not. --Uraihan (talk) 15:14, 22 June 2022 (UTC)