Hi,

Jack Hill <[email protected]> writes:

> On Thu, 16 Mar 2023, Nicolas Graves via Bug reports for GNU Guix wrote:
>
>> "/gnu/store/1jmlqw987ifnb3abr0s2hvihcg1n2xmx-ungoogled-chromium-wayland-109.0.5414.119-1/bin/chromium":
>> not in executable format: file format not recognized
>
> I've run into this message in the past when my store got corrupted (in
> my case it was a full disk on a computer that has other evil spirits
> living in it as well). Can you check with `guix gc --verify=contents`?
> If it reports anything, you might be able to repair it with `sudo guix
> gc --verify=contents,repair`.

I believe the error is because chromium is a shell script wrapper and
not an ELF binary.

I used the following script for those:

--8<---------------cut here---------------start------------->8---
$ cat ~/.local/bin/run-gdb
#!/usr/bin/env bash

(
        wrapper=$(cat $(which $1))
        shift
        . <(echo "$wrapper" | grep ^export)
        binary=$(echo "$wrapper" | grep ^exec | grep -o -E '/gnu/store[^"]*')
        gdb --args "$binary" "$@"
)
--8<---------------cut here---------------end--------------->8---

Then you can do:

--8<---------------cut here---------------start------------->8---
run-gdb chromium
--8<---------------cut here---------------end--------------->8---

Hope that helps,

-- 
Thanks,
Maxim



Reply via email to