Score:1

Attempt to build gtk+3.0 from source fails

br flag

I am trying to apply a patch to the gtk+3.0 on Ubuntu 21.10 and failing. But more importantly, even without applying the patches, I am unable to build the package.

Here are the steps:

apt-get source "gtk+3.0"
sudo apt-get build-dep "gtk+3.0"
cd gtk+3.0-3.24.40
dpkg-buildpackage -rfakeroot -b -us -uc

This fails with:

make  check-local
make[6]: Entering directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32/vs15'
make[6]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32/vs15'
make[5]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32/vs15'
Making check in vs16
make[5]: Entering directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32/vs16'
make  check-local
make[6]: Entering directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32/vs16'
make[6]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32/vs16'
make[5]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32/vs16'
make[5]: Entering directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32'
make  check-local
make[6]: Entering directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32'
make[6]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32'
make[5]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32'
make[4]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb/win32'
make[4]: Entering directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb'
make  check-local
make[5]: Entering directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb'
make[5]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb'
make[4]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb'
make[3]: *** [Makefile:749: check-recursive] Error 1
make[3]: Target 'check' not remade because of errors.
make[3]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30/debian/build/deb'
dh_auto_test: error: cd debian/build/deb && make -j4 check VERBOSE=1 -k check -j1 returned exit code 2
make[2]: *** [debian/rules:225: override_dh_auto_test] Error 2
make[2]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30'
make[1]: *** [debian/rules:133: binary] Error 2
make[1]: Leaving directory '/home/gaussian/owninstalls/sway-ubuntu/gtk/gtk+3.0-3.24.30'
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make: *** [Makefile:204: firefox-friendly-gtk] Error 2

This is just the end of the output, after 10+ minutes of compiling. Any ideas what could be wrong?

N0rbert avatar
zw flag
What is your Ubuntu version? What is your final idea?
gaussian avatar
br flag
21.10. I will add to that the original post. As for the final idea: I am trying to apply two patches that should help with pop-menus for Firefox under Sway. This is following the instructions here: https://github.com/luispabon/sway-ubuntu
N0rbert avatar
zw flag
For reproducible build try `apt-get source -b gtk+3.0` first to be sure that your environment is correctly configured.
gaussian avatar
br flag
Thank you for the help. Fails with an identical message. I have build-essential, dpkg-dev and devscripts installed.
N0rbert avatar
zw flag
As regular users it fails, but got compiled as root inside docker container.
gaussian avatar
br flag
Ok, I'll try that. Or I'll probably try an LXC container first, I have zero experience with Docker. I'll report back, this will require some studying. I assume that the Ubuntu/Debian build system runs in a containerized environment as root.
Score:1
br flag

As @N0rbert pointed out below, trying to build GTK+3.0 as a regular user does not seem to work at the moment. Per comments and my testing, there are at least two ways to build it:

  1. In a Docker container
  2. In an LXC container (the approach taken by me)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.