summaryrefslogtreecommitdiff
path: root/gnu/packages/groff.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-02-06 13:03:26 +0100
committerRicardo Wurmus <rekado@elephly.net>2019-02-06 13:03:26 +0100
commitba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d (patch)
tree75c68e44d3d76440f416552711b1a47ec83e411e /gnu/packages/groff.scm
parentf380f9d55e6757c242acf6c71c4a3ccfcdb066b2 (diff)
parent4aeb7f34c948f32363f2ae29c6942c6328df758c (diff)
downloadpatches-ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d.tar
patches-ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/groff.scm')
-rw-r--r--gnu/packages/groff.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index a8a31337c8..dd679f1582 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -101,6 +101,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 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30785>
+ ;; for details.
+ (substitute* "src/libs/libgroff/Makefile.sub"
+ (("-DENABLE_RELOCATABLE=1") ""))
+ ;; That file contains a crash bug--so make sure that
+ ;; its contents are not there.
+ (call-with-output-file "src/libs/libgroff/relocate.cpp"
+ (lambda (port)
+ #t))
+ #t))
(add-after 'install 'remove-non-essential-programs
(lambda* (#:key outputs #:allow-other-keys)
;; Keep only the programs that man-db needs at run time,