From adc9e7940b54e467732ec923c6a3fcec810dce48 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic
Date: Wed, 16 Jan 2019 15:00:04 +0100 Subject: [PATCH] gnu: groff-minimal: Disable relocatability. Tags: patch * gnu/packages/groff.scm (groff-minimal)[arguments]<#:phases> [disable-relocatability]: New phase. --- gnu/packages/groff.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 77728a5d7..cf392f546 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -96,6 +96,36 @@ is usually the formatter of \"man\" documentation pages.") ,@(substitute-keyword-arguments (package-arguments groff) ((#:phases phases) `(modify-phases ,phases + (add-after 'unpack 'disable-relocatability + (lambda _ + ;; Groff contains a Rube Goldberg-esque relocator for the + ;; file "charset.alias". + ;; It tries to find the current executable using realpath, + ;; a do-it-yourself search in $PATH and so on. + ;; Furthermore, the routine that does the search is buggy + ;; in that it doesn't handle error cases when they arise. + ;; This causes preconv to segfault when trying to look up + ;; the file "charset.alias" in the NULL location. + ;; The "charset.alias" parser is a copy of gnulib's, and a + ;; non-broken version of gnulib's "charset.alias" parser + ;; is part of glibc's libcharset. + ;; However, groff unconditionally uses their own + ;; "charset.alias" parser, but then DOES NOT INSTALL the + ;; file "charset.alias" when glibc is too new. + ;; In Guix, our file "charset.alias" only contains an + ;; obscure alias for ASCII and nothing else. + ;; So just disable relocation and make the entire + ;; "charset.alias" lookup fail. + ;; See