Call for help: one error shared across multiple packages

[   33s] error: Call to unknown function `env`
[   33s]    |
[   33s] 28 | cargo-target-dir := env('CARGO_TARGET_DIR', 'target')
[   33s]    |                     ^^^
[   33s] error: Bad exit status from /var/tmp/rpm-tmp.4MUIxU (%build)

Build logs:

What is the problem here? What can I do?

Just taking a cursory look, it appears that a shell command is being incorrectly called in the install phase of a cargo build/install.

I haven’t compiled any rust apps for a couple of years, so I am a bit “rusty” … wow … that bad pun is unavoidable in this context …

I am busy for the next four or five hours, but if you don’t have a solution by the time I am again free, I’ll gladly look more closely.

1 Like

For Leap 15.4 and Leap 15.5 just does not exist. For Leap 15.6 there seems to be a difference in the available cargo-packaging. Leap 15.6 seems to use an older version/other patch set.

It seems that the devs set the build target for these failing packages intentionelly only for factory.

Branch “just” in your project from Base:System:

see:

Thank you all! After branching just, almost all packages build successfully. All except three:

[   55s] + just build-release
[   55s] cargo build --release 
[   59s] error: package `bitstream-io v2.5.0` cannot be built because it requires rustc 1.79 or newer, while the currently active rustc version is 1.77.0
[   59s] Either upgrade to rustc 1.79 or newer, or use
[   59s] cargo update bitstream-io@2.5.0 --precise ver
[   59s] where `ver` is the latest version of `bitstream-io` supporting rustc 1.77.0
[   59s] error: Recipe `build-debug` failed on line 23 with exit code 101
[   59s] error: Bad exit status from /var/tmp/rpm-tmp.R7hIfd (%build)
[   51s] error: package `bitstream-io v2.4.2` cannot be built because it requires rustc 1.79 or newer, while the currently active rustc version is 1.77.0
[   51s] Either upgrade to rustc 1.79 or newer, or use
[   51s] cargo update bitstream-io@2.4.2 --precise ver
[   51s] where `ver` is the latest version of `bitstream-io` supporting rustc 1.77.0
[   51s] make: *** [Makefile:35: xdg-desktop-portal-cosmic] Error 101
[   51s] error: Bad exit status from /var/tmp/rpm-tmp.dx7G5p (%build)
  • cosmic-greeter cannot find the pam dependency. OpenSUSE Software Search shows nothing for 15.6, so I checked pam in the Linux-PAM repo and here is what it shows for 15.6:
[   64s] + install -m 755 /home/abuild/rpmbuild/BUILD/unix2_chkpwd /home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/usr/sbin
[   64s] + install -D -m 644 /home/abuild/rpmbuild/SOURCES/macros.pam /home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/usr/lib/rpm/macros.d/macros.pam
[   64s] + install -Dm0644 /home/abuild/rpmbuild/SOURCES/pam.tmpfiles /home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/usr/lib/tmpfiles.d/pam.conf
[   64s] + mkdir -p /home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/etc/security/limits.d /home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/etc/security/namespace.d
[   64s] + mv /home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/etc/environment /home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/etc/environment
[   64s] mv: '/home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/etc/environment' and '/home/abuild/rpmbuild/BUILDROOT/pam-1.6.1-150600.1.1.x86_64/etc/environment' are the same file
[   64s] error: Bad exit status from /var/tmp/rpm-tmp.fBSDUj (%install)

Is there anything I can do here?

Change
BuildRequires: pkgconfig(pam)
to
BuildRequires: pam-devel
because pam-devel in Leap has no pkgconfig:

rpm -q --provides pam-devel
pam-devel = 1.3.0-150000.6.66.1
pam-devel(x86-64) = 1.3.0-150000.6.66.1

Edit:

This is in Tumbleweed:

rpm -q --provides pam-devel 
pam-devel = 1.6.1-1.1
pam-devel(x86-64) = 1.6.1-1.1
pkgconfig(pam) = 1.6.1
pkgconfig(pam_misc) = 1.6.1
pkgconfig(pamc) = 1.6.1
rpm_macro(_pam_confdir)
rpm_macro(_pam_libdir)
rpm_macro(_pam_moduledir)
rpm_macro(_pam_secconfdir)
rpm_macro(_pam_secdistconfdir)
rpm_macro(_pam_vendordir)
rpm_macro(_pamdir)

@asdhio @Sauerland use conditionals so you can submit back… openSUSE:Build Service cross distribution howto - openSUSE Wiki

Thank you!

Oh yes, I almost forgot
Do not worry, I recorded all the changes I made so I will use conditionals once COSMIC compiles on Leap :slightly_smiling_face:

Maybe you have to branch rust 1.79 from SLE-Update Repo, maybe @malcolmlewis can say more to this.

Better would be to switch to the openSUSE:Leap:15.6:Update repo itself. Which you can do in the meta tab of the project.

Just a sidenote, as I am the maintainer. You need to update to the latest revision, before you can push the changes

1 Like

@rrahl0 Hi and welcome to the Forum :wink: :wink: and jumping into this thread :smile:

@malcolmlewis thank you. And we have too many communications platforms ^^

I did think about packaging it for 15.6, but on first build fail, i told myself to do it later at some point. Well here we are ^^.

1 Like

Good morning! Thank you all once more, I applied conditionals and switched to the openSUSE:Leap:15.6:Update repo!
There’s only one package left, xdg-desktop-portal-cosmic:

[  838s] warning: `xdg-desktop-portal-cosmic` (bin "xdg-desktop-portal-cosmic" test) generated 13 warnings (run `cargo fix --bin "xdg-desktop-portal-cosmic" --tests` to apply 4 suggestions)
[  838s]     Finished `test` profile [unoptimized + debuginfo] target(s) in 4m 04s
[  839s]      Running unittests src/main.rs (target/debug/deps/xdg_desktop_portal_cosmic-31fdce8cfc265733)
[  839s] 
[  839s] running 0 tests
[  839s] 
[  839s] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
[  839s] 
[  839s] + exit 0
[  839s] Processing files: xdg-desktop-portal-cosmic-0.1.0+git20240717.813352e-lp156.4.1.x86_64
[  839s] error: File not found: /home/abuild/rpmbuild/BUILDROOT/xdg-desktop-portal-cosmic-0.1.0+git20240717.813352e-lp156.4.1.x86_64/usr/lib/xdg-desktop-portal-cosmic

Is there anything I could do here?

By the way, thank you for the work you’ve done to bring COSMIC to OpenSUSE :smile: :saluting_face:

1 Like

rpm is searching in /usr/lib and not /usr/libexec

I am getting the same error because:

ls -al rpmbuild/BUILDROOT/xdg-desktop-portal-cosmic-0.1.0+git20240717.813352e-0.x86_64/usr/libexec/
insgesamt 691252
drwxr-xr-x 2 stephan users      4096 29. Jul 11:59 .
drwxr-xr-x 4 stephan users      4096 29. Jul 11:59 ..
-rwxr-xr-x 1 stephan users 707827008 29. Jul 11:59 xdg-desktop-portal-cosmic

Shoot… Does this mean a patch is needed?

This is the problem in the files section:
%{_libexecdir}/%{name}

You could change it to
/usr/libexec/%{name}

The directory exists in Leap 15.6, but I do not know, if Leap 15.6 is using it, the other xdg-desktop-portal-(gtk or kde) are using /usr/lib as directory.

@Sauerland @asdhio See https://en.opensuse.org/openSUSE:Specfile_guidelines#Libexecdir

/usr/libexec fails immediately. %{_prefix}/lib shows the following:

[  827s] Processing files: xdg-desktop-portal-cosmic-0.1.0+git20240717.813352e-lp156.11.1.x86_64
[  827s] error: File not found: /home/abuild/rpmbuild/BUILDROOT/xdg-desktop-portal-cosmic-0.1.0+git20240717.813352e-lp156.11.1.x86_64/usr/lib/xdg-desktop-portal-cosmic

TIL %{_libdir} moves it to lib64.
/usr/lib shows the same error:

[  831s] Processing files: xdg-desktop-portal-cosmic-0.1.0+git20240717.813352e-lp156.12.1.x86_64
[  831s] error: File not found: /home/abuild/rpmbuild/BUILDROOT/xdg-desktop-portal-cosmic-0.1.0+git20240717.813352e-lp156.12.1.x86_64/usr/lib/xdg-desktop-portal-cosmic

The file is inside /usr/libexec

You should try to build it on your Computer…

So you can see, where the files are stored after Installation of the rpm…