Migrating from glibc to musl on Gentoo
#1
I'm running Gentoo with glibc on PBP.

I'm interested in switching to musl. As I understand it, it should be done via reinstalling, which I want to avoid since it took quite some time to set things up.

Is it possible to just untar the stage3 tarball onto / filesystem from liveusb? Would such OS boot?

I know I would need to rebuild all the installed software, but I just want things to boot now.

Overall, what are the cons of using musl on PBP?
  Reply
#2
Hi,

You cannot switch from glibc to musl, you need to reinstall all using the musl-based toolchain.

If you have a recent powerful PC, you can pre-build the binaries using cross-compilation and a QEMU chroot.
Kind regards,
Xavier Miller.
  Reply
#3
I know I need a musl-based toolchain. This is why I'm considering extracting stage3 built with musl on top of my / partition.

Wouldn't that work?
  Reply
#4
musl and glibc are the central system C library implementations, they are not binary compatible.
Almost everything in your system is using it.

That means that if you overrides /lib/libc*.so with musl version, all binaries compiled with glibc will immediately stop to function.

This is not simply changing a tool by an other one. This is the core of the system, along the Linux kernel.
Kind regards,
Xavier Miller.
  Reply
#5
Well, this is why I want to extract the whole stage3, not just musl itself. Overwriting / partition with musl stage3 would mean all the binaries would get replaced too. The only things that wouldn't be replaced would be everything else installed (X11, Firefox etc.). Those would be the things that I would need to rebuild, but at least the OS should be bootable.

If my analysis is incorrect, please correct me.
  Reply
#6
You can try it, but you will go faster if you create a new sane system in a subfolder, chroot inito it until it is fully ready, then switch the systems by swapping the root folders.
Kind regards,
Xavier Miller.
  Reply
#7
Oh, I actually have a chroot already to play with it, so might as well go with that. Thanks for confirmation.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Gentoo on Pinebook Pro RELEASE jannik2099 54 92,430 12-08-2023, 11:25 PM
Last Post: tllim
  Trouble booting in Gentoo tdiggitydog 11 7,734 07-20-2021, 10:16 PM
Last Post: moonwalkers
  Printer driver lib32-glibc dependency definitiv. 4 5,846 07-05-2020, 08:04 AM
Last Post: wdt
  Gentoo on Pinebook Pro VoxUnius 7 10,406 11-25-2019, 05:48 AM
Last Post: Arwen

Forum Jump:


Users browsing this thread: 1 Guest(s)