From f57693e17c7905d2f11e46d04cb558fe0b0fc39b Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Wed, 16 Jan 2019 15:00:04 +0100 Subject: gnu: groff: Disable relocatability. * gnu/packages/groff.scm (groff)[arguments]<#:phases>[disable-relocatability]: New phase. --- gnu/packages/groff.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/groff.scm') diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 77728a5d78..62e844e1ed 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -62,6 +62,34 @@ `(#:parallel-build? #f ; parallel build fails #:phases (modify-phases %standard-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 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 'unpack 'setenv (lambda _ (setenv "GS_GENERATE_UUIDS" "0") -- cgit v1.2.3 From 96733e941754759d4a1f45ef8fb05dc9ff6db7b3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 16 Jan 2019 18:27:27 +0200 Subject: Revert "gnu: groff: Disable relocatability." This causes more than 3600 packages to be rebuilt. This reverts commit f57693e17c7905d2f11e46d04cb558fe0b0fc39b. --- gnu/packages/groff.scm | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'gnu/packages/groff.scm') diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 62e844e1ed..77728a5d78 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -62,34 +62,6 @@ `(#:parallel-build? #f ; parallel build fails #:phases (modify-phases %standard-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 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 'unpack 'setenv (lambda _ (setenv "GS_GENERATE_UUIDS" "0") -- cgit v1.2.3 From 73b2ce87956b0d9168dcfa234128b91e0e41a4c7 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Wed, 16 Jan 2019 15:00:04 +0100 Subject: gnu: groff-minimal: Disable relocatability. * gnu/packages/groff.scm (groff-minimal)[arguments]<#:phases> [disable-relocatability]: New phase. --- gnu/packages/groff.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'gnu/packages/groff.scm') diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 77728a5d78..cf392f5468 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 + ;; 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, -- cgit v1.2.3