Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build command ends up using the wrong rustc version #238

Open
matzipan opened this issue Jul 24, 2024 · 3 comments
Open

Build command ends up using the wrong rustc version #238

matzipan opened this issue Jul 24, 2024 · 3 comments

Comments

@matzipan
Copy link

matzipan commented Jul 24, 2024

Rustup installed rustc:

$ rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)

flatpak:

$ flatpak info org.freedesktop.Sdk.Extension.rust-stable

Rust stable - Rust stable compiler and tools extension for the flatpak
Freedesktop SDK

          ID: org.freedesktop.Sdk.Extension.rust-stable
         Ref: runtime/org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08
        Arch: x86_64
      Branch: 23.08
     Version: 1.79.0
     License: Apache-2.0 AND MIT
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 1,6 GB

      Commit: afdbd61093875f6da84e29ca349d6d46251bbfa5d5ca731f0777fe518380c1ef
      Parent: a36fd3a685f376686bfd7613619ea22c54ed3b9ae0a476677cc745ad9b94942c
     Subject: rust-analyzer: Update rust-analyzer-linux.gz to 2024-07-22 (338bfc60)
        Date: 2024-07-22 07:10:43 +0000

Trying to enter the same build setup that is used by the build command to check the version:

$ flatpak build --share=network --filesystem=/home/matzipan/Workspace/envelope --filesystem=/home/matzipan/Workspace/envelope/.flatpak/repo --env=PATH=/home/matzipan/.cargo/bin:/home/matzipan/.local/bin:/home/matzipan/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/app/bin:/usr/bin:/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm14/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --filesystem=/home/matzipan/Workspace/envelope/_build /home/matzipan/Workspace/envelope/.flatpak/repo bash
bash-5.2$ rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)

Doing the same thing after a rustup update to 1.79.0:

$ flatpak build --share=network --filesystem=/home/matzipan/Workspace/envelope --filesystem=/home/matzipan/Workspace/envelope/.flatpak/repo --env=PATH=/home/matzipan/.local/bin:/home/matzipan/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/app/bin:/usr/bin:/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm14/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --filesystem=/home/matzipan/Workspace/envelope/_build /home/matzipan/Workspace/envelope/.flatpak/repo bash
bash-5.2$ rustc --version
rustc 1.79.0 (129f3b996 2024-06-10)
@SeaDve
Copy link
Collaborator

SeaDve commented Jul 25, 2024

Does opening a Flatpak build terminal yield the same results?

Also, can you show the manifest used to build it?

@matzipan
Copy link
Author

Does opening a Flatpak build terminal yield the same results?

Interestingly, no.

Also, can you show the manifest used to build it?

Manifest: https://gitlab.gnome.org/felinira/envelope/-/blob/main/build-aux/app.drey.Envelope.Devel.json?ref_type=heads

With one diff:

diff --git a/build-aux/app.drey.Envelope.Devel.json b/build-aux/app.drey.Envelope.Devel.json
index d0983c9..8d0f88d 100644
--- a/build-aux/app.drey.Envelope.Devel.json
+++ b/build-aux/app.drey.Envelope.Devel.json
@@ -1,7 +1,7 @@
 {
     "id": "app.drey.Envelope.Devel",
     "runtime": "org.gnome.Platform",
-    "runtime-version": "master",
+    "runtime-version": "45",
     "sdk": "org.gnome.Sdk",
     "sdk-extensions": [
         "org.freedesktop.Sdk.Extension.rust-stable"

@bilelmoussaoui
Copy link
Owner

does it also happen if you use prepend-path instead of append-path in your manifest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants