Musl or Glibc?
Everest supports 2 different C libraries, musl and glibc. This guide should help you decide which to choose.
1 - musl
1.1 Pros
Musl is extremely lightweight and easy to build, compared to Glibc.
As an added bonus, musl is also more secure than Glibc.
Musl recieves the most support from the Everest development team.
1.2 Cons
Musl may not support all programs, especially proprietary programs, or programs using Glibc-specific APIs.
1.3 Who should use musl
Users running a server, doing simple web browsing, or using programs which do not depend on Glibc should use musl.
1.4 Who shouldn't use musl
Users requiring proprietary software that cannot be patched and recompiled against musl, users who require nvidia graphics drivers, or those who use Steam.
While compatibility layers, such as gcompat, can remedy these issues, there is no 100% perfect solution.
1.5 Solutions
Those wishing to run musl, even with incompatible software and hardware, have a couple of solutions:
1.5.1 gcompat
Gcompat is a shared object file that provides programs with Glibc APIs on a musl system. This can be used for running Glibc programs, but CANNOT be used for compiling them.
Install gcompat by running the following:
(root)# gpkg -f gcompat
1.5.2 Glibc chroot
A minimal chroot containing Glibc can be set up very quickly.
First, ensure you have the everest-devtools and everest-buildtools packages installed:
(root)# gpkg -f everest-devtools everest-buildtools
Next, create a directory for the chroot:
(user)$ mkdir your-chroot
Create a filesystem skeleton in the new directory:
(user)$ mkskel -d your-chroot
Install the necessary packages to the chroot:
The following command costs a fair amount of disk space. Ensure you have enough free space before proceeding.
Check disk space with the following command:
(root)# df /
(user)$ mkchroot-glibc -d your-chroot
Finally, use everest-chroot to access the chroot:
(root)# everest-chroot your-chroot
Or, you can manually mount the required filesystems and run:
(root)# chroot --userspec=0:0 your-chroot /bin/sh
2 - Glibc
2.1 Pros
Glibc is the de-facto standard C library in Linux, and as a result supports most programs, including proprietary ones.
2.2 Cons
Glibc is very bloated and heavy on resources for what it does.
2.3 Who should use Glibc
Users who wish to use proprietary programs, play Steam games, or have hardware that is incompatible with musl should use Glibc.
2.4 Who shouldn't use Glibc
Users running an embedded, or otherwise resource-constrained system should not use Glibc.
3 - Migrating
3.1 Prerequisites
Changing the C library on an existing Everest system is known as migrating.
Migration requires rebuilding most, if not all of the system. It may also present other issues. Continue at your own risk.
3.2 Preparations
First, change the system profile, corresponding to the C library you are switching to:
(root)# glacier-mkprofile -u SYSTEM_PROFILE
Next, update the local package database:
(root)# glacier-update-pkgdb
Finally, change branches on / and pull in the new files:
(user)$ cd /
(root)# git checkout SYSTEM_PROFILE
(root)# git pull
Pulling in a new root filesystem requires a substantial amount of time. Ensure your system continuously stays connected to the network and doesn't loose power.
Your system may become corrupted if something interrupts this process.