SDK sometimes creates files with 000 permissions

REPRODUCIBILITY: Occasionally
OS VERSION: 4.5.0.18
HARDWARE: SDK
UI LANGUAGE: NA
REGRESSION: Don’t know

DESCRIPTION:

Once in a while, result of compilation can lead to files with 000 permissions. As a result, this leads to a failure in compilation at later stages.

PRECONDITIONS:

Get latest SFOS target and tooling. Add following repositories to compile:

Enabled repositories (global): 
 - adaptation-common ... https://releases.jolla.com/releases/4.5.0.18/jolla-hw/adaptation-common/aarch64/
 - apps              ... https://releases.jolla.com/jolla-apps/4.5.0.18/aarch64/
 - customer-jolla    ... https://releases.jolla.com/features/4.5.0.18/customers/jolla/aarch64/
 - hotfixes          ... https://releases.jolla.com/releases/4.5.0.18/hotfixes/aarch64/
 - jolla             ... https://releases.jolla.com/releases/4.5.0.18/jolla/aarch64/
 - sdk               ... https://releases.jolla.com/releases/4.5.0.18/sdk/aarch64/

Enabled repositories (user): 
 - qt515  ... https://repo.sailfishos.org/obs/home:/rinigus:/qt515:/packaging/sailfish_latest_aarch64/

STEPS TO REPRODUCE:

  1. Clone repository GitHub - sailfishos-chum/qtgraphicaleffects
  2. Checkout commit f19ed1d0bf34e615bb193e179adb2f74cad4fefc (later commits have the issue “fixed” by running chmod in directory - doesn’t always work)
  3. try to build with mb2 -t devel-aarch64 build .

EXPECTED RESULT:

Package builds

ACTUAL RESULT:

Fails at stage

/opt/qt5/bin/qmake -install qinstall /home/rinigus/qt/qtgraphicaleffects/upstream/src/effects/private/GaussianMaskedBlur.qml /home/rinigus/qt/qtgraphicaleffects/installroot/opt/qt5/lib64/qt5/qml/QtGraphicalEffects/private/GaussianMaskedBlur.qml
/opt/qt5/bin/qmake -install qinstall /home/rinigus/qt/qtgraphicaleffects/upstream/qml/QtGraphicalEffects/private/DropShadowBase.qmlc /home/rinigus/qt/qtgraphicaleffects/installroot/opt/qt5/lib64/qt5/qml/QtGraphicalEffects/private/DropShadowBase.qmlc
Error copying /home/rinigus/qt/qtgraphicaleffects/upstream/qml/QtGraphicalEffects/private/DropShadowBase.qmlc to /home/rinigus/qt/qtgraphicaleffects/installroot/opt/qt5/lib64/qt5/qml/QtGraphicalEffects/private/DropShadowBase.qmlc: Cannot open /home/rinigus/qt/qtgraphicaleffects/upstream/qml/QtGraphicalEffects/private/DropShadowBase.qmlc for input
make[3]: *** [Makefile:1429: install_qmlcacheinst] Error 3
make[3]: Leaving directory '/home/rinigus/qt/qtgraphicaleffects/upstream/src/effects/private'
make[2]: *** [Makefile:77: sub-private-install_subtargets] Error 2
make[2]: Leaving directory '/home/rinigus/qt/qtgraphicaleffects/upstream/src/effects'
make[1]: *** [Makefile:59: sub-effects-install_subtargets] Error 2
make[1]: Leaving directory '/home/rinigus/qt/qtgraphicaleffects/upstream/src'
make: *** [Makefile:60: sub-src-install_subtargets] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.mOM0VG (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.mOM0VG (%install)
Messages from sb2:
 (WARNING)      qmake[1156975/-142907584]       Path not found for FD 3, for __fxstatat64()

Examining the corresponding file:

ls -l /home/rinigus/qt/qtgraphicaleffects/upstream/qml/QtGraphicalEffects/private/DropShadowBase.qmlc
---------- 1 rinigus rinigus 7424 Mar 21 23:03 /home/rinigus/qt/qtgraphicaleffects/upstream/qml/QtGraphicalEffects/private/DropShadowBase.qmlc

MODIFICATIONS:

None

ADDITIONAL INFORMATION:

The issue can occur earlier in the build as well. As a result we have used constructions like

%make_build  -k || chmod -R ugo+r . || true
%make_build

in some RPM SPECs while packaging Qt 5.15. Issue happens at OBS as well.

1 Like

Thanks for the report, added to internal bugzilla

This bug has been major problem in packaging Qt6. Seems like calls to

/usr/lib64/qt6/libexec/qmltyperegistrar

would lead to that. As a result, we had to build large fraction of Qt6 packages using QEMU and docker build containers. Typical case demonstrating a bug:

  • during compilation, you have a call:
    [ 75s] [42/50] cd /home/abuild/rpmbuild/BUILD/kf6-kiconthemes-6.6.0+main.20241004220339.b70f889/upstream/aarch64-meego-linux-gnu/src/qml && /usr/lib64/qt6/libexec/qmltyperegistrar --generate-qmltypes=/home/abuild/rpmbuild/BUILD/kf6-kiconthemes-6.6.0+main.20241004220339.b70f889/upstream/aarch64-meego-linux-gnu/bin/org/kde/iconthemes/iconthemesplugin.qmltypes --import-name=org.kde.iconthemes --major-version=1 --minor-version=0 @/home/abuild/rpmbuild/BUILD/kf6-kiconthemes-6.6.0+main.20241004220339.b70f889/upstream/aarch64-meego-linux-gnu/src/qml/qmltypes/iconthemesplugin_foreign_types.txt -o /home/abuild/rpmbuild/BUILD/kf6-kiconthemes-6.6.0+main.20241004220339.b70f889/upstream/aarch64-meego-linux-gnu/src/qml/iconthemesplugin_qmltyperegistrations.cpp /home/abuild/rpmbuild/BUILD/kf6-kiconthemes-6.6.0+main.20241004220339.b70f889/upstream/aarch64-meego-linux-gnu/src/qml/meta_types/qt6iconthemesplugin_release_metatypes.json && /usr/bin/cmake -E make_directory /home/abuild/rpmbuild/BUILD/kf6-kiconthemes-6.6.0+main.20241004220339.b70f889/upstream/aarch64-meego-linux-gnu/src/qml/.qt/qmltypes && /usr/bin/cmake -E touch /home/abuild/rpmbuild/BUILD/kf6-kiconthemes-6.6.0+main.20241004220339.b70f889/upstream/aarch64-meego-linux-gnu/src/qml/.qt/qmltypes/iconthemesplugin.qmltypes

  • later, in install phase:
    [ 83s] CMake Error at aarch64-meego-linux-gnu/src/qml/cmake_install.cmake:94 (file):
    [ 83s] file INSTALL cannot find
    [ 83s] “/home/abuild/rpmbuild/BUILD/kf6-kiconthemes-6.6.0+main.20241004220339.b70f889/upstream/aarch64-meego-linux-gnu/bin/org/kde/iconthemes/iconthemesplugin.qmltypes”:
    [ 83s] Permission denied.
    [ 83s] Call Stack (most recent call first):
    [ 83s] aarch64-meego-linux-gnu/src/cmake_install.cmake:52 (include)
    [ 83s] aarch64-meego-linux-gnu/cmake_install.cmake:51 (include)

At OBS logs, you also get at the end

[   85s]  (WARNING)	qmltyperegistrar[3856/-143435968]	Path not found for FD 4, for __fxstatat64()
[   85s]  (WARNING)	qmltyperegistrar[3856/-143435968]	Path not found for FD 4, for __fxstatat64()
[   85s]  (WARNING)	qmltyperegistrar[3856/-143435968]	Path not found for FD 6, for __fxstatat64()
...

In general, these warnings with __fxstatat64 are rather frequent in the logs for all aarch64 packages of Qt6 - even if it manages to build them. Offenders are moc and others. Curiously, that’s not the case for regular SFOS packages (checked couple).

1 Like

see SB2 Bug using std::filesystem

1 Like