Skip to content

extensions/gnome: Add sdk include directories to C_INCLUDE_PATH#5514

Open
3v1n0 wants to merge 1 commit intocanonical:mainfrom
3v1n0:c-include-gnome
Open

extensions/gnome: Add sdk include directories to C_INCLUDE_PATH#5514
3v1n0 wants to merge 1 commit intocanonical:mainfrom
3v1n0:c-include-gnome

Conversation

@3v1n0
Copy link
Contributor

@3v1n0 3v1n0 commented May 27, 2025

The sdk provides a base /usr/include path that should be checked when an including from the default paths.

Without this, when a file is including something such as

  #include <xkbcommon/xkbcommon.h>

that is provided by /snap/gnome-46-2404-sdk/current/usr/include, the compiler won't look for such path at all.

There's no need to fallback to default /usr/include because such path is always included anyways by gcc (at least when that's compiled with such prefix).

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint?
  • Have you successfully run make test?

@3v1n0 3v1n0 force-pushed the c-include-gnome branch 5 times, most recently from 01a2c43 to b535fb0 Compare May 27, 2025 17:51
The sdk provides a base /usr/include path that should be checked when an
including from the default paths.

Without this, when a file is including something such as
  #include <xkbcommon/xkbcommon.h>

that is provided by /snap/gnome-46-2404-sdk/current/usr/include, the
compiler won't look for such path at all.

However do this only for core24, because in core22 the clang version does
not handle it properly, breaking flutter builds
@3v1n0 3v1n0 force-pushed the c-include-gnome branch from b535fb0 to 5ca354b Compare May 27, 2025 17:56
Copy link
Collaborator

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any risk of this breaking existing core24 snaps using the gnome extension?

Copy link
Contributor

@medubelko medubelko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc changes LGTM.

@jahn-junior jahn-junior removed their request for review May 28, 2025 21:38
@mr-cal mr-cal added the Status: Needs information This issue needs more information. label Jun 3, 2025
@3v1n0
Copy link
Contributor Author

3v1n0 commented Oct 1, 2025

Is there any risk of this breaking existing core24 snaps using the gnome extension?

The snaps no, builds it may... But well at rebuild time adjustments can be done.

However we're using it already in the sdk

@lengau
Copy link
Contributor

lengau commented Oct 7, 2025

The snaps no, builds it may... But well at rebuild time adjustments can be done.

This seems risky then. Our user contract is that an unchanged file should continue to build (as much as is in our control). There's an exception for stuff that's marked as experimental, but this extension is already marked as stable for core24.

The final call right now is @bepri's, but I think I'd rather add this for core26+

@lengau lengau requested a review from bepri October 7, 2025 20:48
@bepri
Copy link
Member

bepri commented Oct 8, 2025

I think I agree with @lengau - I don't think it matters if it's an easy fix, needing a fix to a project file without a major version bump to Snapcraft is bad behavior. Another exception I've seen is for bugfixes, but this doesn't seem like a bug to me either.

I say this should be delayed until Snapcraft 9/core26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Needs information This issue needs more information.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants