Questions about building Gnome 44 from source code (the "old fashioned way")

Hello everyone, hope you’re having a great day. :slight_smile:

I would like to learn a few things about building the Gnome Desktop Environment from the source code on a non-GUI Linux computer; but I couldn’t manage to find clear instructions about the exact procedure on the official documentation…

Thus, could some experienced developer explain me:

  • What exactly are the essential packages to build in order to have a minimal Gnome installation (e.g: mutter, gnome-shell, etc).
  • In what order to build them (a dependency graph or something like that).

Thank you in advance, it would greatly help me. :slight_smile:

If you want to build GNOME from release archives or Git, then you will need a tool like buildstream and the elements defined in the gnome-build-meta repository.

I understand. But the thing is I can’t use Buildstream : I’m limited to the manual building (using git, meson, ninja, etc)…

It shouldn’t be technically different, right ? What is the precise component list you need to build in order to have a minimal installation ?

But… why?

The precise component list and order is specified in the Buildstream recipes. The GNOME release team, which is the team responsible for determining the components of GNOME and releasing the overall project from each component’s release archives, encodes the information into those recipes, so the contents of gnome-build-meta are as official as you can get.

It’s just going to be a lot of software to build, and you’ll be fighting build failures the entire way if you’re not using a controlled environment like the one provided by Buildstream.

If you want to do it manually for educational purposes, I would look at each Buildstream element one-by-one. Good luck.

Ok, I skimmed a bit through the Buildstream elements, and I came up with a list of packages that -presumably- constitute the “core” of the Gnome Desktop.

Normally, if I build all these packages in order, all dependencies will be respected (as long as I have all the SDK & third-parties), am I correct?

  1. gdm
  2. gnome-desktop
  3. gnome-backgrounds
  4. gnome-bluetooth
  5. gnome-color-manager
  6. gnome-keyring
  7. gnome-menus
  8. gnome-session
  9. gnome-remote-desktop
  10. gnome-settings-daemon
  11. gnome-control-center
  12. gvfs-daemon
  13. mutter
  14. gnome-initial-setup
  15. gnome-user-docs
  16. gnome-user-share
  17. gnome-tour
  18. gnome-shell
  19. gnome-shell-extensions
  20. nautilus
  21. orca
  22. rygel
  23. evince
  24. sushi
  25. tecla

Could you please review it, if I missed something?
Thanks again.

It’s your job to figure out required dependencies for each project and the order in which to build them. You can get hints from the buildstream elements (and buildstream would do it in the correct order for you).

You’re missing a lot. For a complete definition of GNOME core, you’ll need to build core.bst and everything that it depends on. It should be something between 200-300 different projects.

Precisely my list came from core.bst

I have to say I am not planning to build the “SDK” (that includes GTK, GLib, etc), I would have installed it earlier from my package manager.

Assuming that, did I miss a core package? If so could you give me an example please?

It sounds like you’re sort of defining your own idea of what “core” is, as an interpretation of “minimal”. You have Nautilus but not Yelp, and Evince but not GNOME Text Editor, for example. You’re also missing some obvious ones like gnome-dekstop-schemas, I guess because you’re drawing your own line between core and the parts of the SDK it depends on.

As Michael said, there should be quite a few more packages there. If you’re defining your own interpretation of “core”, you’ll have a hard time getting an “official” definition.

Yes you’re right in both sentences: I should have defined more precisely what I mean by “core” and I draw a --subjective- line between what I consider to be “SDK” (things I don’t want to build, gsettings-desktop-schemas is among them), and things I want to build myself.

Basically I say “core” as the relative minimal packages/libraries that needs to be present on the system to have GDM and Gnome “boot”…

Notwithstanding the dependencies, if I manage to build the packages from the list above successfully, theorically will Gnome be able to start normally?


The things expressed in the various recipes are not there because people like to add random projects to a build: it’s because GNOME, as defined by the entity responsible, requires all those dependencies. The projects listed in core require the sdk to build, plus the additional dependencies in core-deps and sdk-deps.

I think you misunderstood my quote: of course I wasn’t expecting to be able to omit dependencies, I meant I would not want to build them myself and instead relying on installing them through my package manager.

Given that, when I finished building everything I said above, would Gnome work?

Possibly. Make sure to pick software versions that correspond to the versions of packages shipped by your distro. E.g. if your distro ships GNOME 44, you’re not going to be successful trying to build GNOME 45 using dependencies from GNOME 44 .

There’s no answer to that question: GNOME guarantees only the build according to the buildstream recipes.

If you manage manually to reproduce everything buildstream does, then yes: it should work.

Okay, thanks for your answers.

I will give a try, and get back if I encounter specific problems :slight_smile: