[Debian-on-mobile-maintainers] Bug#1107898: xdg-desktop-portal-phosh: FTBFS: error: couldn't read `/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/pfs.gresource`: No such file or directory (os error 2)
Santiago Vila
sanvila at debian.org
Mon Jun 16 20:08:17 BST 2025
Package: src:xdg-desktop-portal-phosh
Version: 0.46.0-1
Severity: serious
Tags: ftbfs trixie sid patch
Dear maintainer:
During a rebuild of all packages in unstable, your package failed to build:
[ Note: The attached patch comes directly from the gitlab repo where you already fixed this ]
--------------------------------------------------------------------------------
[...]
warning: `libadwaita` (lib) generated 85 warnings
Compiling gettext-rs v0.7.0
Running `CARGO=/usr/share/cargo/bin/cargo CARGO_CRATE_NAME=gettextrs CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>>/debian/cargo_registry/gettext-rs-0.7.0 CARGO_MANIFEST_PATH=/<<PKGBUILDDIR>>/debian/cargo_registry/gettext-rs-0.7.0/Cargo.toml CARGO_PKG_AUTHORS='Konstantin Salikhov <koka58 at yandex.ru>:Alexander Batischev <eual.jp at gmail.com>' CARGO_PKG_DESCRIPTION='Safe bindings for gettext' CARGO_PKG_HOMEPAGE='https://github.com/Koka/gettext-rs' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=gettext-rs CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/Koka/gettext-rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.7.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=7 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/debug/deps rustc --crate-name gettextrs --edition=2015 /<<PKGBUILDDIR>>/debian/cargo_registry/gettext-rs-0.7.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="gettext-system"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("gettext-system"))' -C metadata=a0c5b29cbc9d6fac -C extra-filename=-2bed867e93d0be55 --out-dir /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -L dependency=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps -L dependency=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/debug/deps --extern gettext_sys=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps/libgettext_sys-6af3927e90951a4b.rmeta --extern locale_config=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps/liblocale_config-8dc84ef346343f42.rmeta --cap-lints warn -C debuginfo=2 -C strip=none --cap-lints warn -C linker=x86_64-linux-gnu-gcc -C link-arg=-Wl,-z,relro -C link-arg=-Wl,-z,now --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/xdg-desktop-portal-phosh-0.46.0 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry`
Compiling PhoshFileSelector v0.0.2 (/<<PKGBUILDDIR>>/subprojects/pfs)
Running `CARGO=/usr/share/cargo/bin/cargo CARGO_CRATE_NAME=pfs CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>>/subprojects/pfs CARGO_MANIFEST_PATH=/<<PKGBUILDDIR>>/subprojects/pfs/Cargo.toml CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=PhoshFileSelector CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.0.2 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=2 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/debug/deps rustc --crate-name pfs --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type cdylib --crate-type staticlib --crate-type rlib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=f48e59e81c0bcd92 --out-dir /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps -L dependency=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/debug/deps --extern gettextrs=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps/libgettextrs-2bed867e93d0be55.rlib --extern glib_macros=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/debug/deps/libglib_macros-f3371d81aa3db1c0.so --extern gtk=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps/libgtk4-7b0e36e74e42545b.rlib --extern adw=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps/liblibadwaita-fb4e4a7334f8a9e7.rlib -C debuginfo=2 -C strip=none --cap-lints warn -C linker=x86_64-linux-gnu-gcc -C link-arg=-Wl,-z,relro -C link-arg=-Wl,-z,now --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/xdg-desktop-portal-phosh-0.46.0 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry`
error: couldn't read `/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/pfs.gresource`: No such file or directory (os error 2)
--> src/init.rs:26:42
|
26 | gio::resources_register_include_impl(include_bytes!(concat!(
| __________________________________________^
27 | | env!("PFS_RESOURCE_DIR"),
28 | | "/",
29 | | "pfs.gresource"
30 | | )))
| |______^
|
= note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `PhoshFileSelector` (lib) due to 1 previous error
Caused by:
process didn't exit successfully: `CARGO=/usr/share/cargo/bin/cargo CARGO_CRATE_NAME=pfs CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>>/subprojects/pfs CARGO_MANIFEST_PATH=/<<PKGBUILDDIR>>/subprojects/pfs/Cargo.toml CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=PhoshFileSelector CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.0.2 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=2 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/debug/deps rustc --crate-name pfs --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type cdylib --crate-type staticlib --crate-type rlib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=f48e59e81c0bcd92 --out-dir /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps -L dependency=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/debug/deps --extern gettextrs=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps/libgettextrs-2bed867e93d0be55.rlib --extern glib_macros=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/debug/deps/libglib_macros-f3371d81aa3db1c0.so --extern gtk=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps/libgtk4-7b0e36e74e42545b.rlib --extern adw=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/deps/liblibadwaita-fb4e4a7334f8a9e7.rlib -C debuginfo=2 -C strip=none --cap-lints warn -C linker=x86_64-linux-gnu-gcc -C link-arg=-Wl,-z,relro -C link-arg=-Wl,-z,now --remap-path-prefix /<<PKGBUILDDIR>>=/usr/share/cargo/registry/xdg-desktop-portal-phosh-0.46.0 --remap-path-prefix /<<PKGBUILDDIR>>/debian/cargo_registry=/usr/share/cargo/registry` (exit status: 1)
FAILED: subprojects/pfs/src/libpfs.a
/usr/bin/env PFS_RESOURCE_DIR=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src /usr/share/cargo/bin/cargo build --lib --manifest-path /<<PKGBUILDDIR>>/subprojects/pfs/Cargo.toml --target-dir /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src && cp /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/subprojects/pfs/src/x86_64-unknown-linux-gnu/debug/libpfs.a subprojects/pfs/src/libpfs.a
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j1 -v returned exit code 1
make: *** [debian/rules:21: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:
https://people.debian.org/~sanvila/build-logs/202506/
About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.
If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:xdg-desktop-portal-phosh, so that this is still
visible in the BTS web page for this package.
Thanks.
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index 8af5a03..1d5dc39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xdg-desktop-portal-phosh (0.46.0-2) unstable; urgency=medium
+
+ * Ensure resources get compiled before the lib. Closes: #NNNNNNN.
+
+ -- Guido Günther <agx at sigxcpu.org> Mon, 16 Jun 2025 20:40:00 +0200
+
xdg-desktop-portal-phosh (0.46.0-1) unstable; urgency=medium
* New upstream release
diff --git a/debian/patches/ensure-resources-get-compiled-before-the-lib.patch b/debian/patches/ensure-resources-get-compiled-before-the-lib.patch
new file mode 100644
index 0000000..5bda647
--- /dev/null
+++ b/debian/patches/ensure-resources-get-compiled-before-the-lib.patch
@@ -0,0 +1,47 @@
+From e68877ef96e510090d54dfc4b67d332d8992094d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Thu, 3 Apr 2025 08:53:43 +0200
+Subject: [PATCH] build: Ensure resources get compiled before the lib
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Closes: https://gitlab.gnome.org/guidog/xdg-desktop-portal-phosh/-/issues/5
+
+Signed-off-by: Guido Günther <agx at sigxcpu.org>
+---
+ src/meson.build | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/subprojects/pfs/src/meson.build
++++ b/subprojects/pfs/src/meson.build
+@@ -1,7 +1,12 @@
+ pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name()
+ gnome = import('gnome')
+
+-gnome.compile_resources('pfs', 'pfs.gresource.xml', gresource_bundle: true, install_dir: pkgdatadir)
++compiled_resources = gnome.compile_resources(
++ 'pfs',
++ 'pfs.gresource.xml',
++ gresource_bundle: true,
++ install_dir: pkgdatadir,
++)
+
+ conf = configuration_data()
+ conf.set_quoted('VERSION', meson.project_version())
+@@ -54,6 +59,7 @@
+ meson.project_build_root() / 'src' / get_option('deb_triplet') / rust_target / 'libpfs.a',
+ '@OUTPUT@',
+ ],
++ depends: compiled_resources,
+ )
+
+ if get_option('shared-lib')
+@@ -92,6 +98,7 @@
+ 'libpfs-0.so',
+ '@OUTPUT@',
+ ],
++ depends: compiled_resources,
+ )
+
+ pkg = pkgconfig.generate(
diff --git a/debian/patches/series b/debian/patches/series
index 86fc84c..4d58410 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
Don-t-override-CARGO_HOME-dir.patch
build-Add-rust-triplet-to-path.patch
+ensure-resources-get-compiled-before-the-lib.patch
More information about the Debian-on-mobile-maintainers
mailing list