flatpak / flatpak-builder

Tool to build flatpaks from source
GNU Lesser General Public License v2.1
139 stars 91 forks source link

Failed to find installed gnome Sdk when building a package #383

Open easilok opened 3 years ago

easilok commented 3 years ago

Linux distribution and version

GNU Guix System 1.2.0

Flatpak-builder version

1.0.11 (flatpak install)

Flatpak version

1.10.2

Description of the problem

I don't know if this is the right place, but I didn't found another one. Also, this is my first issue, so I'm sorry in advance for any mistake. I'm trying to build an application package of my own (the Atollic TrueStudio, and I took as an example the flathub package STM32CubeIDE, because they are similar. Whith the focus on building this last one (because the problem is the same on both), whenever I run the build command flatpak run org.flatpak.Builder build-dir com.st.STM32CubeIDE.yaml I get the error:

Failed to init: Unable to find sdk org.gnome.Sdk version 3.38

The output of my flatpak list comand is:

2021-03-23-114601_

Which proves the Sdk is installed. I can build these package on an arch linux install, the same way I'm trying to build on guix, which shows me that there's something missing on my guix configuration for these to work.

Steps to reproduce

  1. Have a Gnu Guix System installation
  2. Install flatpak
  3. Install flatpak builder with flatpak --user install org.flatpak.Builder
  4. Install gnome sdk with flatpak --user install org.gnome.Platform//3.38 org.gnome.Sdk//3.38
  5. Clone the STM32CubeIDE flatpak package from the github
  6. Build the package with flatpak run org.flatpak.Builder build-dir com.st.STM32CubeIDE.yaml on the cloned repository folder
olof-nord commented 2 years ago

I do not have a Gnu Guix System installation, but with my Arch Linux install, I got a successful build using the following command. Note that 4) and 6) is done in the same go here.

flatpak-builder build --verbose --force-clean --install-deps-from=flathub --ccache com.st.STM32CubeIDE.yaml
olof-nord commented 2 years ago

Actually, just for fun we can combine step 4), 5) and 6) for a build with this command (its getting long though).

The install-deps-from assumes that the flathub repo is added, see #3 here: https://flatpak.org/setup/Ubuntu

flatpak-builder build --verbose --force-clean --install-deps-from=flathub --ccache --from-git=https://github.com/flathub/com.st.STM32CubeIDE.git com.st.STM32CubeIDE.yaml
HiPhish commented 1 year ago

EDIT: Sorry I misread the title, I missed the "gnome" part. My problem is with a different SDK, so I have opened as new issue #549 instead.

I have the same issue, except I cannot even build the tutorial. I have installed flatpak-builder from Flathub; when I run

flatpak run org.flatpak.Builder --verbose --repo=repo --force-clean build-dir org.flatpak.Hello.yml

I get the following output:

FB: Running: git config --get user.email
FB: Running: git config --get user.name
FB: Running 'flatpak info --arch=x86_64 --show-commit org.freedesktop.Sdk 22.08' on host
Failed to init: Unable to find sdk org.freedesktop.Sdk version 22.08

However, if I run that last command manually, I do get a result:

$ flatpak info --arch=x86_64 --show-commit org.freedesktop.Sdk 22.08
2652112cf6f02f590602d3379a36a0e59d801a120f8ba4bb43170e75e3ab73da

What is going on here? Is it a problem that flatpak-builder is installed from Flathub? The tutorial says that I can install it from Flathub. I am running Void Linux

TingPing commented 1 year ago

This sounds entirely like a bug with flatpak-builder inside of flatpak.

Can you run flatpak info --show-location ...

HiPhish commented 1 year ago

Like this?

$ flatpak info --show-location org.freedesktop.Sdk
/var/lib/flatpak/runtime/org.freedesktop.Sdk/x86_64/22.08/2652112cf6f02f590602d3379a36a0e59d801a120f8ba4bb43170e75e3ab73da
TingPing commented 1 year ago

Hmm. Works fine here installed into the same location.