Upgrade to `sys-libs/musl-9999::gentoo` breaks while installing with `default/linux/amd64/23.0/musl/llvm` profile. After installing Gentoo Linux won't boot as there is no `/bin/bash` (only `/usr/bin/bash`) and musl libc is not installed.
Why do you not have a /bin/? It should be a symlink to /usr/bin if you're on a merged-usr system (like 23.0 profiles). Also, please keep in mind, 23.0 profiles *are experimental* and not something people should be using yet unless they know wwhat they're doing.
Yes, this is a bug with `merged-usr`. Emerging sys-libs/musl works with `split-usr`, migrating to `merged-usr` also works but `sys-libs/musl` fails afterwards with `merged-usr`.
Why do you not have a /bin symlink? Please provide full instructions to reproduce from a stage3 (and which).
(In reply to hugegameartgd from comment #2) > Yes, this is a bug with `merged-usr`. > Emerging sys-libs/musl works with `split-usr`, migrating to `merged-usr` > also works but `sys-libs/musl` fails afterwards with `merged-usr`. You're likely not migrating correctly, the script creates symlinks?
Created attachment 859440 [details] build.log
(In reply to Sam James from comment #4) > (In reply to hugegameartgd from comment #2) > > Yes, this is a bug with `merged-usr`. > > Emerging sys-libs/musl works with `split-usr`, migrating to `merged-usr` > > also works but `sys-libs/musl` fails afterwards with `merged-usr`. > > You're likely not migrating correctly, the script creates symlinks? Sorry, I forgot to attach build.log. The symlinks `/bin` and `/lib` still exist after merging sys-libs/musl-9999, bash/sh is also installed but fails to run. I've used the migration guide from https://www.gentoo.org/support/news-items/2022-12-01-systemd-usrmerge.html , additionally running `eselect profile set --force default/linux/amd64/23.0/musl/llvm` and `emerge --oneshot --update --newuse --changed-used --deep --with-bdeps=y --keep-going @installed` for upgrade. Adding `sys-libs/musl **` to `package.accept_keywords` and upgrading to `sys-libs/musl` live ebuild breaks during installation (not reproducible with `musl-1.2.3-r7`).
The process I use from a stage3 is: 1. emerge -va merge-usr 2. merge-usr 3. emerge -va sys-libs/musl-9999 4. Switch to 23.0 profile 5. emerge -vauDU @world This system works for me everytime. From what I'm seeing Sam is correct and your symlinks are wrong. You can unpack a stage3 on top to fix this issue following the steps above.
> You can unpack a stage3 on top to fix this issue following the steps above. Please don't unpack a stage3 over an existing system. You end up with orphaned/conflicting files which shouldn't be there and an inconsistent vdb.
I think the bug is that the musl ebuilds from gentoo tree don't have a split-usr useflag that can be disabled for merged-usr. Therefore symlink loops are installed to /usr/ instead of the actual binaries. Renaming the musl-1.2.3-r7.ebuild from 12101111-overlay to musl-9999.ebuild ( See https://github.com/12101111/overlay/blob/master/sys-libs/musl/musl-1.2.3-r7.ebuild ) fixes the issue.
I don't see any evidence of a bug here. Please start over with a full build log and emerge --info.
Created attachment 859484 [details] build.log
Created attachment 859485 [details] emerge-info
I'm still seeing this: FileNotFoundError: [Errno 2] No such file or directory: b'/bin/bash' If you run /bin/bash from a command line, what happens?
Hmm, I see that /usr/bin/sandbox also fails. I suppose the errno 2 might be coming from ld-musl-x86_64.so.1 when it fails to load some libraries?
(In reply to Mike Gilbert from comment #14) > Hmm, I see that /usr/bin/sandbox also fails. I suppose the errno 2 might be > coming from ld-musl-x86_64.so.1 when it fails to load some libraries? ld-musl-x86_64.so.1 should symlink to libc.so which is not the case when /lib is a symlink to /usr/lib lrwxrwxrwx 1 root root 18 Apr 3 17:40 ld-musl-x86_64.so.1 -> ../usr/lib/libc.so
Hmm, so does your filesystem look like this? /lib -> usr/lib /usr/lib/ld-musl-x86_64.so.1 -> ../usr/lib/libc.so That would indeed be problematic.
I confirmed the broken behavior by running merge-usr and reinstalling sys-libs/musl-1.2.3-r7.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6de834d0aba32a86de1aee8806f8c03a815ad98e commit 6de834d0aba32a86de1aee8806f8c03a815ad98e Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-04-03 18:13:02 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-04-03 19:06:20 +0000 sys-libs/musl: fix ld-musl.so symlink with merged-usr To create a symlink relative to /lib/ld-musl.so, we must know if ${ROOT} will have /lib symlinked to /usr/lib. We rely on the split-usr USE flag to determine this. Closes: https://bugs.gentoo.org/903703 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-libs/musl/musl-1.2.3-r8.ebuild | 212 +++++++++++++++++++++++++++++++++++++ sys-libs/musl/musl-9999.ebuild | 18 ++-- 2 files changed, 223 insertions(+), 7 deletions(-)