Subject: bug#30785: Man pages truncated, repeated

From: Pierre Neidhardt <[email-masked]>
Date: Sun, 13 Jan 2019 17:09:51 +0100

Great news, I've (finally) made some progress!

On a suggestion from Christopher Baines, I compared the strace of a
working man and Guix' man.
I noticed that Guix man failed to find "preconv".

If I install groff-minimal into my user profile, the issue disappears
indeed.  So it's just a matter of letting man-db find preconv.

I've tried the following substitution:

--8<---------------cut here---------------start------------->8---
(substitute* "lib/encodings.c"
               (("const char \\*groff_preconv = NULL;")
                (string-append "const char *groff_preconv = \""
                               (assoc-ref inputs "groff-minimal")
                               "/bin/preconv"
                               "\";")))
--8<---------------cut here---------------end--------------->8---

Surprisingly, man only displays this on every call:

--8<---------------cut here---------------start------------->8---
/gnu/store/6dv1q0s8rlf1ndaqx2qhnkiz9x4840ba-man-db-2.8.3/bin/man: /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv: Segmentation fault
--8<---------------cut here---------------end--------------->8---

However, calling

--8<---------------cut here---------------start------------->8---
echo "hêlló"  | /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv -e UTF-8
--8<---------------cut here---------------end--------------->8---

works.

I'm stuck here...  Anyone?

-- 
Pierre Neidhardt
https://ambrevar.xyz/