Gentoo Archives: gentoo-soc

From: listout <brahmajit.xyz@×××××.com>
To: gentoo-soc@l.g.o
Cc: dilfridge@g.o, sam@g.o
Subject: [gentoo-soc] Week 1 Report for Musl support expansion to support GNOME desktop
Date: Sun, 19 Jun 2022 14:26:22
Message-Id: 20220619142616.sa7wnenizdb6vcms@gmail.com
1 Hi folks,
2
3 The first week of coding period of this years Google Summer of Code has
4 come to an end, hence I'm sending my weekly report. For the first two
5 week I had planned to install the gnome-light meta package and patch any
6 issues that I come across. So I started with that, by installing
7 gnome-light meta package from gnome-base. This resulted in me coming
8 across four issues. The first two were rather easy to fix and I've
9 patched and submitted those patches. The other two have proven to be
10 rather difficult to debug hence with advice from my mentors I've decided
11 to come back to them later.
12
13 Coming to the issues itself, the first two were just missing defines
14 that are present in glibc but not in musl. The issues were in the
15 gnome-terminal and samba packages, the gnome-terminal was missing was
16 missing `W_EXITCODE` define while samba was missing `NETDB_INTERNAL` and
17 `NETDB_INTERNAL` defines. The other two issues are in ppp and lirsvg
18 package, however they can be avoided for now and I was able to get a
19 working gnome desktop on musl profile.
20
21 The issue with ppp was, ppp has been using `<net/ppp_defs.h>` however
22 this header file in not present in musl but glibc seems to provide it.
23 Hence I decided to use the `<linux/ppp_defs.h>` as this would be
24 available for both musl and glibc users and everyone could benefit from
25 from the patch. This however didn't seem to work and introduced a
26 different error. I've filed an issue upstream [1] and got a reply from
27 maintainer. The maintainer in their reply agrees that we should use be
28 using headers from Linux or whatever libc system uses, the maintainer
29 also has idea of including purely linux headers. There is already an
30 pull request for this particular issue and it's under review. To avoid
31 using ppp one can generally disable it using `-ppp` USE flag in
32 `make.conf`.
33
34 Comming to the librsvg issue, the problem with librsvg has proven rather
35 hard to debug, though I've tried my best to debug it. The issues seems
36 to be that, librsvg is crashing when trying to render a svg and this is
37 needed to get a gnome shell running. Hence when trying to run
38 gnome-shell or gdm we get a fail whale screen ( White screen with
39 message "Oh no! Something has gone wrong" with a sad face ). I, with
40 help from my mentors and leio, tried to debug it and found out the issue
41 happens the function `g_file_get_uri` tried to load a svg. Hence we
42 tried to find out which svg in particular was causing the issue by
43 selecting the frame in gdb and trying to print
44 `g_file_get_uri(data->gfile)`, which didn't help either, it just
45 resulted in a segmentation fault. After that I decided to file a bug
46 upstream [2], meanwhile we other various things like increasing the
47 stack size as there has been issues with musl's default stack size,
48 which happens to be small. I've got a reply on this issue from librsvg
49 developer, they have suggested to increase the stack size and try it,
50 but we've already tried it before but I'll give it another shot just to
51 any eliminate human errors. Coming week, we'll try further debugging
52 librsvg. For now, to get a running gnome desktop one can use a older
53 librsvg from ::gentoo (librsvg-2.40.21 from ::gentoo worked).
54
55 This should be comprehensive enough report for the first week, learned
56 new things about debugging, looking forward to learning and contributing
57 more. Thanks to my mentors ( sam and dilfridge ), leio ( Gentoo's GNOME
58 project lead ) for his time in helping me debug gnome-shell and Catcream
59 ( fellow GSoC student ) for testing my the librsvg issue and confirming
60 it on his end.
61
62 [1]: https://github.com/ppp-project/ppp/issues/351
63 [2]: https://gitlab.gnome.org/GNOME/librsvg/-/issues/874
64 --
65 Regards,
66 listout

Replies