Summary: | eltpatch fails on many - if not all - packages that have patches (seen on MacBookAir 3.1 running 5.4.97-gentoo) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | jplx <jlambrec> |
Component: | Current packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED NEEDINFO | ||
Severity: | normal | CC: | ionen, jlambrec, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
emerge --info emerge -pqv environment elibtool.log ps aux env ls /usr/local/bin emerge world test |
Description
jplx
2021-03-20 03:08:08 UTC
Created attachment 692487 [details]
emerge --info
Created attachment 692490 [details]
emerge -pqv
Created attachment 692493 [details]
environment
Created attachment 692496 [details]
elibtool.log
I assumed this was Prefix first, but it's not (libtool weirdness happens there sometimes).
So, this is really weird:
> ERROR: ld.so: object 'libsandbox.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
>Error: too many environment variables, please use --rmenv
>END OF CODE
>sys-apps/sandbox (containing libsandbox.so) was emerged again to make sure but the >same error still comes up.
1) Are you using something like Firejail? It's incompatible with sandbox. You don't want to be running emerge or any build systems through Firejail. I think by default it may automatically sandbox/shadow binaries, and we don't want that.
2) Can you tell me anything else that's "interesting" about your system?
3) Could you share 'env' and also tell me if this is reproducible with 'env -i' then running emerge or ebuild?
Created attachment 692637 [details]
ps aux
Created attachment 692640 [details]
env
Thank you for your help. Here is the info: 1) Firejail was installed on this system following these instructions: https://wiki.gentoo.org/wiki/User:Sakaki/Sakaki%27s_EFI_Install_Guide/Sandboxing_the_Firefox_Browser_with_Firejail#setup_clipboard_sharing My understanding is that Firejail runs as user (jplx) under gnome-wayland when using firefox. This issue arrises when gnome-wayland is not running and as root. So, it looks unrelated to Firejail (at least this is my understanding). Attached file 'ps-aux' shows all processes running before invoking the ebuild command. 2) this system runs gnome-wayland with systemd and had no problem for a while. This issue happened in the last two months. It has only two cpu's and less than 2GB of memory: CODE jplx-airgn2 ~ # free -m total used free shared buff/cache available Mem: 1727 81 1397 1 248 1495 Swap: 3071 0 3071 END OF CODE Therefore, I usually perform updates with gnome not running, just under the kernel to save on resources. When updates require lots of compile space, I use an external disk or flash memory with USB connection and mount it as /var/tmp/portage like: CODE mount /dev/sdb1 /var/tmp/portage END OF CODE and then I run the update. But it is not the case now: CODE jplx-airgn2 ~ # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 56.5G 0 disk ├─sda1 8:1 0 200M 0 part ├─sda2 8:2 0 500M 0 part └─sda3 8:3 0 55.8G 0 part └─root_e2adbe2e-8f39-4208-80fb-24a35996ccc9-vg1-root 253:0 0 55.8G 0 crypt ├─vg1-swap 253:1 0 3G 0 lvm [SWAP] ├─vg1-root 253:2 0 47G 0 lvm / └─vg1-home END OF CODE 3) env is attached. After running 'env -i', the failure occurs exactly the same as before. It seems like an interesting coincidence that I suspected Firejail and it's involved. It's pretty much the only time I've seen these fun sandbox problems. I suspect this is Firejail as, by default, it'll do a lot of wrapping: https://wiki.archlinux.org/index.php/firejail#Using_Firejail_by_default. Please run: 1) ls /usr/local/bin/ and show us then 2) PATH="/usr/lib/portage/python3.8/ebuild-helpers/xattr:/usr/lib/portage/python3.8/ebuild-helpers:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/11/bin" emerge -a -uvDU @world Created attachment 692643 [details]
ls /usr/local/bin
Created attachment 692646 [details]
emerge world test
Here is the emerge world test. Same failure...
You were right and the link you provided in comment #9 (archlinux-Using Firejail by Default) was key to understand the problem. Looking through the history, I found out that I had invoked the "firecfg" command (while debugging a different firefox networking issue that is now resolved). That "firecfg" command leads to "use Firejail by default for all applications for which it has profiles". It creates symbolic links in /usr/local/bin pointing to /usr/bin/firejail, for all programs for which firejail has default profiles. In the Troubleshooting section, it mentions that "/usr/bin/patch: **** Can't open patch file" could occur. Because I never really intended to use Firejail by default for many applications, I ran: CODE firecfg --clean END OF CODE All the links in /usr/local/bin were deleted. I had to restore the xephyr-helper file that was part of the initial installation of sandboxing Firefox. The emerge process now runs fine. So, problem solved. Because this issue appears to be very confusing, you may - or may not - want to make a change to allow patches to proceed after invoking the firecfg command. Anyway, thank you for your help. |