-
Notifications
You must be signed in to change notification settings - Fork 27
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: workarounds for gitlab instability and librsvg search path bug #300
Conversation
snap/snapcraft.yaml
Outdated
source-tag: GEGL_0_4_50 | ||
plugin: meson | ||
meson-parameters: | ||
- --prefix=/usr | ||
- --buildtype=release | ||
- -Ddocs=false | ||
- -Dworkshop=true | ||
build-environment: | ||
- C_INCLUDE_PATH: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/librsvg-2.0:${C_INCLUDE_PATH:+:$C_INCLUDE_PATH} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- C_INCLUDE_PATH: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/librsvg-2.0:${C_INCLUDE_PATH:+:$C_INCLUDE_PATH} | |
- C_INCLUDE_PATH: /snap/gnome-46-2404-sdk/current/usr/include/librsvg-2.0:${C_INCLUDE_PATH:+:$C_INCLUDE_PATH} |
Is this not equivalent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I was just preserving the form of the path used in librsvg
's pkgconfig file, but not a big deal for me. I just committed your suggested change.
snap/snapcraft.yaml
Outdated
@@ -147,6 +149,7 @@ parts: | |||
- GEGL_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gegl-0.4 | |||
- GI_TYPELIB_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/girepository-1.0:$GI_TYPELIB_PATH | |||
- LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR | |||
- C_INCLUDE_PATH: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/pkgconfig/../../../include/librsvg-2.0:${C_INCLUDE_PATH:+:$C_INCLUDE_PATH} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, would be good to remove the ../../../
as it seems unnecessary in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (see comment above).
Hmm, seems we still need some work on this - the submodules are still fetched from Gitlab, and fail when the infra is down! https://github.com/snapcrafters/gimp/actions/runs/12144600942/job/33869024313 |
Oof - I missed that. I think I can just run a |
The current build is failing for a few different reasons outlined below. I spent quite a bit of time fighting these issues so wanted to share as it may help unblock others. Since these are workarounds, I leave it to @jnsgruk and others to decide whether to actually merge this into
preview
, to simply leave this PR open for reference, or something else. :)Issues and their workarounds
librsvg
introduced a variable${pcfiledir}
inlibrsvg-2.0.pc
it distributes forpkgconfig
. Thegnome-46-2404-sdk
snap now ships version 2.59.1 oflibrsvg
and snapcraft is unable to correctly process${pcfiledir}
as reported recently in Snapcraft doesn't honor ${pcfiledir} in pkgconfig files canonical/snapcraft#5158. This results in the following error during thegimp
build:The build logs also show the failing command with the incorrect path to the
librsvg
headers:To workaround this second issue I hard-coded the correct path to the
librsvg
headers in thebuild-environment
section in the parts where it is required.