0

Preamble:

I have decided that I would like to build gnome-shell from source (after applying some tweaks).

My system is a stock Ubuntu 20.04.2 with Xorg Server, GDM3, Gnome desktop, and Mutter.

I have cloned the gnome-shell source-code from Launchpad (recursively) with git, and have checked out the gnome-3-36 branch. On the only git submodule, subprojects/gvc, I have checked out the master branch, because studying git branch --all, that seemed to be the only one to make sense.

Then I installed meson (v 0.53.2), and tried running meson builddir in the gnome-shell working tree root, as I have seen from this tutorial.

Challenge:

Through error messages I have learned about missing dependencies.

Then I have installed gcc, and after another failed attempt, cmake.

After this, I still got errors about missing dependencies, which I started to search for and install with Synaptic one by one, after each error message of a new failed build attempt.

In this fashion, I have so far installed such packages as libecal2.0-dev, libgcr-3-dev, libgirepository1.0-dev, and libgjs-dev.

Now I feel stupid, and I think meson could install all these for me in a single process, with some command: like npm does with npm install.

The meson.build file looks somewhat like the npm ecosystem's package.json, so I guess I should be able to have dependencies installed by meson...

Is that right?

Now, to remain with the npm comparison, it strikes me that when I run npm install, I get a self-contained directory, node_modules/, where the (project's) dependencies are added. In contrast, I so far have installed my meson dependencies globally on my system. Does that make sense? Should I do it differently? Is there a better way?


Update 1:

This guide suggests this command: sudo apt install build-essential

I thought it might be a useful shortcut, but for me it returns: "build-essential is already the newest version". Seems like the gnome-shell project's dependencies are beyond of what's considered essential.


Update 2:

I have continued with manually installing dependencies as they came up, while keeping notes of what these were:

libecal2.0-dev
libgcr-3-dev
libgirepository1.0-dev
libgjs-dev
libmutter-6-dev
libpolkit-agent-1-dev
libstartup-notification0-dev
libgnome-desktop-3-dev
libgnome-bluetooth-dev
libnm-dev
xsltproc
sassc
libpulse-dev
asciidoc-base

After installing these with Synaptic, the meson build command proceeded until a successful exit.

Just for a note, this stuff was huge (the dependencies of dependencies), I have the impression that gigabytes of disk space was used for them.


At this point @muru suggested this thread:

# So I ran
sudo apt-get build-dep gnome-shell --dry-run

then

sudo apt-get build-dep gnome-shell

For this to work however, I had to check a checkbox and select a server for "Source code" in the Software & Updates utility — again, thanks to @muru's guidance.

Anyways, sudo apt-get build-dep gnome-shell has installed 36 more packages on top of what already had been installed.

At this point however I feel optimistic that I am well equipped for the actual compilation, not just for the mere meson build.


Update 3:

Considering how helpful this thread may be for any newcomer willing to work with meson in general or on the gnome-shell specifically, I would like to save this question from being deleted.

I would like to move the info in the "Update 2" section into an answer. That would enable us to keep this collection of valuable information together in one place. So I cast a reopen vote.

Levente
  • 3,961
  • 1
    meson is just a build system, not a whole package management system that can get dependencies for you. – muru Feb 24 '21 at 22:31
  • @muru Thank you! sudo apt-get build-dep gnome-shell --dry-run says You must put some 'deb-src' URIs in your sources.list I'm not sure how to handle that. – Levente Feb 24 '21 at 22:33
  • There's a search bar on the top of the page: https://askubuntu.com/q/496549/158442 – muru Feb 24 '21 at 22:35
  • Closing as duplicate =/=> Getting deleted. Duplicates are kept around as sign posts unless negatively scored precisely so that people can find the same solution by searching different things – muru Feb 25 '21 at 00:20
  • @muru but there is this: I have linked this question from this other one: https://askubuntu.com/q/1319108/1157519 And when I open that link in a private window (to simulate a user who is not me), it already redirects to that "canonical" question, not mine. Same thing happens when I clicked this question's link on the frontpage list (open in private window). Also, if in a private window (simulating "not me") I search for this question, it shows up as a result, but clicking it redirects to the "canonical" question again. So it's pretty difficult to access, if at all. – Levente Feb 25 '21 at 00:30
  • And several people who click it might not even realize that the redirect happened; from those, the information will be simply snatched away without them even realizing. | Furthermore: I have created the new meson tag. And searching for anything with the meson tag brings up now 0 results (in a private browsing window). – Levente Feb 25 '21 at 00:32
  • Yes, because your average anonymous user coming in from Google isn't interested in the history of your particular question, but only in the solution, which is in the dupe. A signed-in user would still see your post first. – muru Feb 25 '21 at 00:34
  • It all seem to rely on the noredirect=1 URL get parameter. Only I, the author of the question, and maybe some mods get that noredirect parameter, I expect. – Levente Feb 25 '21 at 00:34
  • Now consider the information piled up, ready to use in this question. Honestly, compare it with the info in the other question that was suggested as duplicate. There is incredibly small overlap, and heaps of useful info is being lost if this question is not accessible. – Levente Feb 25 '21 at 00:35
  • "because your average anonymous user coming in from Google isn't interested in the history" — literally other registered users of this website are deprived of the information I shared, due to the redirect. – Levente Feb 25 '21 at 00:36
  • Repeat: signed-in users aren't automatically redirected. – muru Feb 25 '21 at 00:37
  • Thank you for that clarification. – Levente Feb 25 '21 at 00:38

0 Answers0