build/linux: Build flatpak with GCC to avoid LLVM/freedesktop branch hell

Despite building GIMP with Clang helped a lot to make our deps builds robust,
it is very hard to maintain, not because of LLVM but because of freedesktop.
We needed to ensure that the branch of LLVM matched the one of freedesktop on
which GNOME SDK is based. That stopped to work resulting on bad inconsistency:
1) flathub never had a problem; 2) GNOME runners sometimes worked, others not;
3) locally it stopped to work completely, so the .json right now is unportable.

Some annoying bugs were:
- "error: Requested extension *llvm* not installed"
- "Similar refs found for *llvm*"

So, let's end this not using any extension anymore while keeping only the nice
improvements in the custom builds.
This commit is contained in:
Bruno 2024-11-01 19:22:40 -03:00
parent 5284b5258f
commit 9d8e20f432
No known key found for this signature in database
2 changed files with 5 additions and 15 deletions

View File

@ -30,8 +30,6 @@ if [ -z "$GITLAB_CI" ]; then
flatpak remote-add --if-not-exists --user --from gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo
flatpak install --user gnome-nightly org.gnome.Platform/$(uname -m)/master org.gnome.Sdk/$(uname -m)/master -y
fi
flatpak remote-add --if-not-exists --user --from flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install --user flathub org.freedesktop.Sdk.Extension.llvm18 -y
# Prepare env (only GIMP_PREFIX is needed for flatpak)

View File

@ -4,22 +4,15 @@
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.llvm18"
],
"command": "gimp",
"build-options": {
"append-path": "/usr/lib/sdk/llvm18/bin",
"prepend-ld-library-path": "/usr/lib/sdk/llvm18/lib",
"env": {
"CC": "ccache clang",
"CXX": "ccache clang++",
"CC_LD": "lld",
"CXX_LD": "lld",
"CC": "ccache cc",
"CXX": "ccache c++",
"CLICOLOR_FORCE": "1"
},
"cflags": "-fcolor-diagnostics",
"cxxflags": "-fcolor-diagnostics"
"cflags": "-fdiagnostics-color=always",
"cxxflags": "-fdiagnostics-color=always"
},
"separate-locales": false,
"rename-desktop-file": "gimp.desktop",
@ -569,8 +562,7 @@
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",
"-DCMAKE_CXX_COMPILER=clang++",
"-DCMAKE_CXX_FLAGS=-fuse-ld=lld",
"-DCMAKE_CXX_COMPILER=c++",
"-DCMAKE_INSTALL_PREFIX=/app/lib/libheif",
"-DEXTRA_LIB='libx265-10.a;libx265-12.a'",
"-DEXTRA_LINK_FLAGS=-L/app/lib/libheif/lib",