1 |
On 6/19/22 10:26, listout wrote: |
2 |
> Hi folks, |
3 |
> |
4 |
> The first week of coding period of this years Google Summer of Code has |
5 |
> come to an end, hence I'm sending my weekly report. For the first two |
6 |
> week I had planned to install the gnome-light meta package and patch any |
7 |
> issues that I come across. So I started with that, by installing |
8 |
> gnome-light meta package from gnome-base. This resulted in me coming |
9 |
> across four issues. The first two were rather easy to fix and I've |
10 |
> patched and submitted those patches. The other two have proven to be |
11 |
> rather difficult to debug hence with advice from my mentors I've decided |
12 |
> to come back to them later. |
13 |
|
14 |
|
15 |
1. Feel free to add me to the list of people you bounce questions off |
16 |
of. I did the initial port of musl to gentoo many years ago. |
17 |
|
18 |
> |
19 |
> Coming to the issues itself, the first two were just missing defines |
20 |
> that are present in glibc but not in musl. The issues were in the |
21 |
> gnome-terminal and samba packages, the gnome-terminal was missing was |
22 |
> missing `W_EXITCODE` define while samba was missing `NETDB_INTERNAL` and |
23 |
> `NETDB_INTERNAL` defines. The other two issues are in ppp and lirsvg |
24 |
> package, however they can be avoided for now and I was able to get a |
25 |
> working gnome desktop on musl profile. |
26 |
> |
27 |
|
28 |
2. For the NETDB issue, take a look at the samba ebuild on the musl overlay |
29 |
|
30 |
https://gitweb.gentoo.org/proj/musl.git/tree/net-fs/samba |
31 |
|
32 |
3. W_EXITCODE is defined in <sys/wait.h> The reason its working in |
33 |
glibc and not musl is because the .h files stack differently So on a |
34 |
glibc system <sys/wait.h> is getting included through some other .h |
35 |
while on musl it is not. Just add it to gnome-terminal. |
36 |
|
37 |
I wrote some python script back in the day which parses out how the .h |
38 |
files stack. I'll see if I can find it and mail it. |
39 |
|
40 |
|
41 |
> The issue with ppp was, ppp has been using `<net/ppp_defs.h>` however |
42 |
> this header file in not present in musl but glibc seems to provide it. |
43 |
> Hence I decided to use the `<linux/ppp_defs.h>` as this would be |
44 |
> available for both musl and glibc users and everyone could benefit from |
45 |
> from the patch. This however didn't seem to work and introduced a |
46 |
> different error. I've filed an issue upstream [1] and got a reply from |
47 |
> maintainer. The maintainer in their reply agrees that we should use be |
48 |
> using headers from Linux or whatever libc system uses, the maintainer |
49 |
> also has idea of including purely linux headers. There is already an |
50 |
> pull request for this particular issue and it's under review. To avoid |
51 |
> using ppp one can generally disable it using `-ppp` USE flag in |
52 |
> `make.conf`. |
53 |
|
54 |
4. <net/ppp_defs.h> and <linux/ppp_defs.h> are not the same and you |
55 |
can't replace one with the other. I don't know ppp well, but if glibc |
56 |
provides it and musl doesn't, you can "break it out" of glibc as a |
57 |
standalone library the way I did with these following packages in |
58 |
|
59 |
sys-libs/argp-standalone |
60 |
sys-libs/fts-standalone |
61 |
sys-libs/obstack-standalone |
62 |
sys-libs/queue-standalone |
63 |
sys-libs/rpmatch-standalone |
64 |
|
65 |
If you do break it out and need to add the package, try to follow those |
66 |
models, ie call the pacakge ppp_standaone. |
67 |
|
68 |
But I could be totally wrong about ppp, since I don't know what provides |
69 |
what. |
70 |
|
71 |
Also, try to figure out what <net/ppp_defs.h> and <linux/ppp_defs.h> are |
72 |
for so you understand the difference ;) |
73 |
|
74 |
> |
75 |
> Comming to the librsvg issue, the problem with librsvg has proven rather |
76 |
> hard to debug, though I've tried my best to debug it. The issues seems |
77 |
> to be that, librsvg is crashing when trying to render a svg and this is |
78 |
> needed to get a gnome shell running. Hence when trying to run |
79 |
> gnome-shell or gdm we get a fail whale screen ( White screen with |
80 |
> message "Oh no! Something has gone wrong" with a sad face ). I, with |
81 |
> help from my mentors and leio, tried to debug it and found out the issue |
82 |
> happens the function `g_file_get_uri` tried to load a svg. Hence we |
83 |
> tried to find out which svg in particular was causing the issue by |
84 |
> selecting the frame in gdb and trying to print |
85 |
> `g_file_get_uri(data->gfile)`, which didn't help either, it just |
86 |
> resulted in a segmentation fault. After that I decided to file a bug |
87 |
> upstream [2], meanwhile we other various things like increasing the |
88 |
> stack size as there has been issues with musl's default stack size, |
89 |
> which happens to be small. I've got a reply on this issue from librsvg |
90 |
> developer, they have suggested to increase the stack size and try it, |
91 |
> but we've already tried it before but I'll give it another shot just to |
92 |
> any eliminate human errors. Coming week, we'll try further debugging |
93 |
> librsvg. For now, to get a running gnome desktop one can use a older |
94 |
> librsvg from ::gentoo (librsvg-2.40.21 from ::gentoo worked). |
95 |
|
96 |
Sorry I don't have enough context here to help right now. BTW, I did |
97 |
get xfce4 working in musl many years ago, I don't know if what I did |
98 |
there might help with this project but I mention it in passing just so |
99 |
you know what's out there. I do remember having to do some magic with |
100 |
the xorg.conf file because of the way linking works in musl compared to |
101 |
glibc, ie. there is no lazy linking. |
102 |
|
103 |
> |
104 |
> This should be comprehensive enough report for the first week, learned |
105 |
> new things about debugging, looking forward to learning and contributing |
106 |
> more. Thanks to my mentors ( sam and dilfridge ), leio ( Gentoo's GNOME |
107 |
> project lead ) for his time in helping me debug gnome-shell and Catcream |
108 |
> ( fellow GSoC student ) for testing my the librsvg issue and confirming |
109 |
> it on his end. |
110 |
> |
111 |
> [1]: https://github.com/ppp-project/ppp/issues/351 |
112 |
> [2]: https://gitlab.gnome.org/GNOME/librsvg/-/issues/874 |
113 |
> -- |
114 |
> Regards, |
115 |
> listout |
116 |
> |
117 |
|
118 |
|
119 |
-- |
120 |
Anthony G. Basile, Ph.D. |
121 |
Gentoo Linux Developer [Hardened] |
122 |
E-Mail : blueness@g.o |
123 |
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA |
124 |
GnuPG ID : F52D4BBA |