Skip to contentSkip to conversation

New: qt PrefixPath is wrong on 2020.05-rc1

Buildroot bugzilla at busybox.net 1 participant 10 messages May 16, 2020 – May 17, 2020

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=12906

Bug ID: 12906
Summary: qt PrefixPath is wrong on 2020.05-rc1
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: jharjuma at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---

The PrefixPath is /. It should be /usr. For example QML modules are under /usr/qml not /qml.

Head of 'qtdiag --no-gl':

Qt 5.14.2 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 7.5.0) on "eglfs"
OS: Buildroot 2020.05-rc1 [linux version 5.4.3]

Architecture: arm; features:

Environment:

Features: QT_NO_EXCEPTIONS

Library info:
PrefixPath: /
DocumentationPath: /doc
HeadersPath: /include/qt5
LibrariesPath: /lib
LibraryExecutablesPath: /libexec
BinariesPath: /bin
PluginsPath: /lib/qt/plugins
ImportsPath: /imports
Qml2ImportsPath: /qml
ArchDataPath: /
DataPath: /
TranslationsPath: /translations
ExamplesPath: /lib/qt/examples
TestsPath: /tests
SettingsPath: /etc/xdg

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 12906] qt PrefixPath is wrong on 2020.05-rc1

https://bugs.busybox.net/show_bug.cgi?id=12906

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at buildroot.uclibc |ps.report at gmx.net
|.org |

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 12906] qt PrefixPath is wrong on 2020.05-rc1

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12906

--- Comment #1 from Peter Seiderer <[email protected]> --- Tested with the following defconfig (on Raspberry Pi 3 B+):

BR2_arm=y
BR2_cortex_a53=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_DHCP="eth0"
BR2_GENERATE_LOCALE="en_US"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,4f2a4cc501c428c940549f39d5562e60404ac4f7)/linux-4f2a4cc501c428c940549f39d5562e60404ac4f7.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus
bcm2710-rpi-cm3"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_DEJAVU=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_EXAMPLES=y
BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
BR2_PACKAGE_QT5BASE_EGLFS=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="eglfs"
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
BR2_PACKAGE_QT5BASE_GIF=y
BR2_PACKAGE_QT5BASE_JPEG=y
BR2_PACKAGE_QT5BASE_PNG=y
BR2_PACKAGE_QT5QUICKCONTROLS=y
BR2_PACKAGE_QT5QUICKCONTROLS2=y
BR2_PACKAGE_QT5TOOLS=y
BR2_PACKAGE_QT5TOOLS_QTDIAG=y
BR2_PACKAGE_QT5TOOLS_QTPATHS=y
BR2_PACKAGE_QT5TOOLS_QTPLUGININFO=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_USERLAND=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y

$ qtdiag
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT
(in millimeters).
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Qt 5.14.2 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release
build; by GCC 8.4.0) on "eglfs" 
OS: Buildroot 2020.05-rc1 [linux version 4.19.113-v7]

Architecture: arm; features: Neon

Environment:

Features: QT_NO_EXCEPTIONS QT_NO_OPENSSL

Library info:
PrefixPath: /usr
DocumentationPath: /usr/doc
HeadersPath: /usr/include/qt5
LibrariesPath: /usr/lib
LibraryExecutablesPath: /usr/libexec
BinariesPath: /usr/bin
PluginsPath: /usr/lib/qt/plugins
ImportsPath: /usr/imports
Qml2ImportsPath: /usr/qml
ArchDataPath: /usr
DataPath: /usr
TranslationsPath: /usr/translations
ExamplesPath: /usr/lib/qt/examples
TestsPath: /usr/tests
SettingsPath: /usr/etc/xdg
[...]

Examples e.g. quickcontrols2 gallery runs fine:

$ /usr/lib/qt/examples/quickcontrols2/gallery/gallery

The path problem existed in buildroot in some beforehand/RFC version bumps of qt (5.13.x/5.14.1) but not since the 5.14.2 one was applied, for the beforehand ones I used the following patch/hack:

#3 lore raw

[Buildroot] [Bug 12906] qt PrefixPath is wrong on 2020.05-rc1

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12906

--- Comment #2 from jharjuma at gmail.com ---
Yes, I did complete rebuild. Qt 5.14 introduced relocatable builds
(https://www.qt.io/blog/qt-is-relocatable). I was able to restore correct paths by configuring BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS="-no-feature-relocatable".

Head of qt5base-5.14.2/config.summary

Building on: linux-g++ (x86_64, CPU features: mmx sse sse2) Building for: devices/linux-buildroot-g++ (arm, CPU features: <none>) Target compiler: gcc 7.5.0
Configuration: cross_compile compile_examples enable_new_dtags largefile shared shared release c++11 c++14 c++1z concurrent dbus reduce_exports release_tools stl
Build options:
Mode ................................... release; optimized tools Optimize release build for size ........ no
Building shared libraries .............. yes
Using C standard ....................... C11
Using C++ standard ..................... C++17
Using ccache ........................... no
Using new DTAGS ........................ yes
Relocatable ............................ no
Using precompiled headers .............. no
Using LTCG ............................. no
Target compiler supports:

    NEON ................................. no

Build parts ............................ libs

Peter Seiderer: Did you build relocatable qt?

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 12906] qt PrefixPath is wrong on 2020.05-rc1

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12906

--- Comment #3 from Peter Seiderer <[email protected]> --- No custom changes (see provided defconfig)...

$ cat build/qt5base-5.14.2/config.summary 
Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for: devices/linux-buildroot-g++ (arm, CPU features: neon crc32)
Target compiler: gcc 8.4.0
Configuration: cross_compile compile_examples enable_new_dtags largefile neon
shared shared release c++11 c++14 c++1z concurrent reduce_exports release_tools
stl
Build options:
  Mode ................................... release; optimized tools
  Optimize release build for size ........ no
  Building shared libraries .............. yes
  Using C standard ....................... C11
  Using C++ standard ..................... C++17
  Using ccache ........................... no
  Using new DTAGS ........................ yes
  Relocatable ............................ yes
  Using precompiled headers .............. no
[...]
Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 12906] qt PrefixPath is wrong on 2020.05-rc1

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12906

--- Comment #4 from jharjuma at gmail.com ---
I don't have any dynamic linker configuration files, eg. /etc/ld.so.conf, /etc/ld.so.cache. In system search path /lib is before /usr/lib. libQt5Core.so is installed in /lib/libQt5Core.so and /usr/lib/libQt5Core.so. Relocatable Qt determines PrefixPath by going up towards root from the directory of the loaded libQt5Core and chooses directory that contains 'lib' as PrefixPath
(https://github.com/qt/qtbase/blob/3a6d8df5219653b043bd642668cee193f563ec84/src/corelib/global/qlibraryinfo.cpp#L623).
If Qt is non-relocatable, value of -prefix config switch is used as PrefixPath. qtdiag reports correct PrefixPath if it is forced to use /usr/lib/libQt5Core.so. Should buildroot configure qt as non-relocatable?

LD_LIBRARY_PATH=/usr/lib qtdiag --no-gl

Qt 5.14.2 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 7.5.0) on "eglfs"
OS: Buildroot 2020.02 [linux version 5.4.3]

Architecture: arm; features:

Environment:

Features: QT_NO_EXCEPTIONS

Library info:
PrefixPath: /usr
DocumentationPath: /usr/doc
HeadersPath: /usr/include/qt5
LibrariesPath: /usr/lib
LibraryExecutablesPath: /usr/libexec
BinariesPath: /usr/bin
PluginsPath: /usr/lib/qt/plugins
ImportsPath: /usr/imports
Qml2ImportsPath: /usr/qml
ArchDataPath: /usr
DataPath: /usr
TranslationsPath: /usr/translations
ExamplesPath: /usr/lib/qt/examples
TestsPath: /usr/tests
SettingsPath: /usr/etc/xdg

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#8 lore raw

[Buildroot] [Bug 12906] qt PrefixPath is wrong on 2020.05-rc1

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12906

--- Comment #7 from Peter Seiderer <[email protected]> --- Thanks for report and suggested fix! Buildroot suggested patch can be found under [1]...

[1]
http://patchwork.ozlabs.org/project/buildroot/patch/20200517102823.15132-1-ps.report at gmx.net

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#9 lore raw

[Buildroot] [Bug 12906] qt PrefixPath is wrong on 2020.05-rc1

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12906

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
                 CC|                            |yann.morin.1998 at free.fr

--- Comment #8 from Yann E. MORIN <[email protected]> --- Joonas, All,

Fixed with Peter's commit:
https://git.buildroot.org/buildroot/commit/?id=6491ca40f8374b310a08ceb904e2a274408739af

Thanks for the report.

Regards,
Yann E. MORIN.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.