OpenRC and the hidden segfault

OpenRC and the hidden segfault

Hi! This time we will take a look at a rabbit hole involving debugging segmentation faults caused at the init(8) boot stage.

I first noticed something was wrong when seeing this in my boot messages:

* Caching service dependencies
segmentation fault
segmentation fault

Continue reading

Posted in musl KDE | Leave a comment

Thoughts about musl standalone compatibility packages for Gentoo (controversial!)

Thoughts about musl standalone compatibility packages for Gentoo

Hi! With me and listout having plowed through a lot of build time issues with musl libc we have started to face some larger issues and noticed some patterns.

The issue

One of the issues that constantly pop up is error.h not existing.

fatal error: error.h: No such file or directory

Continue reading

Posted in musl KDE | Leave a comment

Gentoo musl Support Expansion for Qt/KDE Week 4

Hi! This is my weekly report for week 4 of Summer of Code. This week I’ve done some more ebuild development and fixed some more build-time bugs for various packages. We’ve also discussed adding *-standalone compatibility libraries for musl.

Continue reading

Posted in musl KDE | Leave a comment

Musl support expansion for supporting GNOME desktop [part 3]

Now the GNOME desktop can be emerged on musl profile. The installation of the full GNOME desktop on musl was quite
uneventful. I didn’t come across anything that would require patching. However,
one thing I’ve noticed is that GNOME on musl doesn’t seem to work very well with
-wayland flag turned on globally. So if you do plan on running GNOME on musl,
make sure to have +wayland. Other than that I don’t think there’s much to add.

Other than that one can now install the MATE desktop, which comes very close to
GNOME 2, on musl too. It was a part of my proposal, and with a couple of spare
hours at hand, I decided to try to emerge the mate meta-package. I did face two
issues which are patched [1][2] and one of the patches has been submitted
upstream[3]. The two packages that needed patching for getting MATE to install
were mate-power-manager and mate-sensors-applet.

The package mate-power-manager needed two patches, the header file execinfo.h is
not available in musl and hence need to be surrounded in include guards so that
it’s only included in ulibc and glibc systems, secondly there were some debug
backtrace functions that too needed to be run on only ulibc and glibc system
hence similar to the execinfo patch, I surrounded those instances of the
function in include guards. Funnily, the mate-sensors-applet package needed some
include guards to be removed. There were include guards around stdio.h and
local.h, for some reason the `ifdef` condition around local.h was getting
evaluated as false on musl, resulting in local.h not being included which in
turn resulted in the build failing. A similar issue was reported earlier[4] but
was unfortunately never patched.

However, I didn’t get much time to test MATE desktop so some run time bugs can
be expected.

For the next week, I’ll begin testing MATE and maybe set up GRS so that other
people and mentors can reproduce my environment easily (thanks to blueness).

Hope this is a concise report for Week 3. I’ll update the blog as soon as the
blog site comes up again, it’s down for now. Till then, see ya.

[1]: https://github.com/gentoo/gentoo/pull/26198
[2]: https://github.com/gentoo/gentoo/pull/26197
[3]: https://github.com/mate-desktop/mate-sensors-applet/pull/128
[4]: https://github.com/mate-desktop/mate-sensors-applet/issues/123

Posted in musl GNOME | Tagged , , | Leave a comment

Musl support expansion for supporting GNOME desktop [part 2]

I finally have some time to catch up on my blog backlogs.

The second week of the coding period for this year’s Google Summer of Code has come to an end. Nothing interesting happened this week, just the continuation of the previous week’s work, so I’ll keep it short and simple.

As per my previous report, I worked further on debugging the librsvg crash.
Eventually, I was successful in getting gnome-shell to work with latest librsvg
from ::gentoo, unfortunately, I still don’t know what the actual issue is. What
worked was increasing either gnome-shell, gjs or pixman’s stack size, and with
advice from my mentor sam_ I have submitted a patch to increase gjs’s stack size
on musl[1].

I’ve started with using Gentoo’s package testing tools, initially, I went with
pkg-testing-tools, as it was quite easy to set up and get going, unfortunately
I didn’t work quite well on musl due to multilib-strict not working on musl,
hence I had to move with tatt. So, now I’m learning to use tatt.

My patch for samba has been merged and the patch for gnome-terminal is awaiting
review. With that merged, it’ll be possible to using GNOME desktop (gnome-light)
on musl.

I had few extra hours at hand and used to try and compile firefox on musl. As of
now (date), I’m unable to build firefox:rapid::gentoo with “+clang” or “+pgo”.
The bug with clang with firefox has already been reported[2] and is being worked on
however I don’t know why “+pgo” is not working. In brief, to build firefox (as
of date) on musl one must use rust from ::musl, and turn off clang and lto flag,
probably this will be fixed on newer releases.

With that, I’ll conclude my report for the second week on Musl support expansion to
support the GNOME desktop. I’ll start with gnome extras from Monday and for the next
two weeks, I’ll be working on that. Hope to bring in new exciting findings next
week and I’ll try to update the blog too.

[1]: https://github.com/gentoo/gentoo/pull/26056
[2]: https://bugs.gentoo.org/829033

Posted in musl GNOME | Tagged , , | Leave a comment

Gentoo musl Support Expansion for Qt/KDE Week 3

This is my report for the third week of Gentoo GSoC.
In my proposal it says this week will be dedicated to getting Plasma desktop and core functionality working, but it already seems to run just fine by fixing the dependencies, which was done in week 1 & 2. The topics I’ve learnt about this week has instead been more ebuild development, Rust on musl, low level DBUS C api, GLib, setting up LDAP, Linux namespaces, and some other things.

Generally speaking the first two weeks was moslty me spamming out pretty easy to fix build time patches while this week’s been moslty learning and taking my time to resolve harder ones.

Continue reading

Posted in musl KDE | Leave a comment

Gentoo musl Support Expansion for Qt/KDE Week 2

Hello!
This is my second weekly report for my Google Summer of Code project regarding musl support expansion.
My work this week has been pretty similar to the first, ie. I’ve mostly fixed build time bugs caused by GNU extensions. But I’ve also came across and fixed some runtime bugs here as well. I have successfully finished all work I stated in my proposal for the first 2 weeks, that being getting a lot of Qt/KDE libraries installed. I have also worked on a lot of other things used on a typical KDE Plasma desktop.

Continue reading

Posted in musl KDE | Leave a comment

Week 3 Report for RISC-V Support for Gentoo Prefix

The 3rd week of my GSoC project has come to an end and this is the brief overview of the progress so far.
To start with, most of the week has been spent on testing, we have decided upon a non-Gentoo RISC-V environment for testing and are finally able to get `emerge -u system` working, (128/143) packages have been compiled so far and we can will get it working soon. We also have profiles for risc-v merged in Gentoo. Have also been working on a new profile for lp64d no-multilib and sent the pr for the same [3].
During the week we tried several non-gentoo riscv environments for testing like fedora, ubuntu riscv image and freedom-u-sdk[1]. The environment of freedom-u-sdk seems to be working great and is minimal, also doesn’t give much errors like other images, so we have decided to settle on it.
During stage 2 it was noticed that missing `libfl.so.2` lib on host caused several `sys-libs/attr` to fail and it has been fixed. This didn’t occur in other riscv environments so seems to be a `freedom-u-sdk` specific issue. Similarly, missing `libtinfo.so` lib caused issues for `sys-devel/gettext`.
So far I have been testing the new profile with my custom bootstrap-prefix.sh script [4] and added a new profile in for lp64d risc-v [3]; will push the changes to upstream and get reviews for the same. There are some ambiguities with freedom-u-sdk host libraries, will dig more to check if we can make bootstrap script more independent from host.Talking about the upcoming plans,I plan to do testing on various machines. Currently last 15 packages are bring compiled while writing this, python and glibc might are expected to give some errors, stage 3 we will have a working risc-v profile soon if the compilation gets successful.I am collecting logs and the issues faced during bootstrap [2] which will eventually help in documentation of “Porting Prefix to new Architecture”.
So this is the report of things accomplished in Week 3. Mentors have been immensely helpful, looking forward to next week.
Regards,
wiredhikari
Posted in RISC-V Prefix | Leave a comment

Week 2 Report for RISC-V Support for Gentoo Prefix

The second week of coding period is over, it has been fun and quite some progress on the project has happened. To start with, I tested the new riscv profile for prefix on different riscv machines/images, have updated the changes and rebased the pull request [1]. After adding support to packages as discussed in last week’s blog, I did testing for stage 1 and 2 on various machines and they got compiled without any trouble.
During testing, the major bug it was seen that pkgconf failed due to missing `CHOST`, we which will be fixed by patching it for `riscv` in bootstrap script.

Continue reading

Posted in RISC-V Prefix | Leave a comment

Week 1 Report for RISC-V Support for Gentoo Prefix

Hello all,
    Hope you all are doing great, this is my weekly report for the first week of Google Summer of Code. For the initial weeks I have planned to fix issues which occur during the 3 stages of Prefix.
    During the first week I have made pr’s to fix errors that occur during compilation of stage 1 and 2. I have uploaded all the logs and issues I faced in prefix_on_riscv repository[7].

Continue reading

Posted in RISC-V Prefix | Leave a comment