GNU bug report logs -
#65366
texlive-scheme-basic: chktex: Could not find global resource file.
Previous Next
Reported by: Chloe Brown <chloe <at> yellowsquid.uk>
Date: Fri, 18 Aug 2023 15:22:02 UTC
Severity: normal
Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65366 in the body.
You can then email your comments to 65366 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#65366
; Package
guix
.
(Fri, 18 Aug 2023 15:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Chloe Brown <chloe <at> yellowsquid.uk>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Fri, 18 Aug 2023 15:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* Description
Trying to run the chktex binary results in a permanent warning. When trying to
run ~chktex -v~ (as done by Emacs) it escalates to an error. It appears the
binary cannot find a necessary configuration file.
* Expected Behaviour
Running ~chktex -v~ would not give an error.
* Actual Behaviour
The following error message is produced and the program exits.
WARNING -- Could not find global resource file.
ERROR -- Illegal verbosity level.
* Steps to Reproduce
- Run the following command:
guix shell -C texlive-bin -- chktex -v
- Observe the error
* Guix Details
Observed on commit 78f080e25bfc02abd9a8fa88c8ad8d5854f54743
* Other Notes
- Also including the texlive-chktex package does not resolve the error.
Information forwarded
to
andreas <at> enge.fr, rekado <at> elephly.net, bug-guix <at> gnu.org
:
bug#65366
; Package
guix
.
(Sat, 02 Sep 2023 19:23:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 65366 <at> debbugs.gnu.org (full text, mbox):
This fixes <https://issues.guix.gnu.org/65366>.
* gnu/packages/tex.scm (texlive-source): New variable.
(texlive-chktex)[source]: Build binary from source.
[build-system]: Use GNU-BUILD-SYSTEM.
[arguments]<#:phases>: Make sure the `chktex' executable can locate a global
configuration file.
[native-inputs]: Add PKG-CONFIG and TEXLIVE-LIBKPATHSEA.
---
The following patch should (partly) fix the issue with chktex. Because
both `texlive-bin' and `texlive-chktex' provide the `chktex'
executable, one just has to make sure the binary from `texlive-chktex'
is used.
The next step will be to remove it from `texlive-bin', but this need
to go in a separate branch due to the sheer number of rebuilds this
will entail.
Also, the patch paves the way towards more executables being removed
from `texlive-bin', by defining a common `texlive-source' macro.
gnu/packages/tex.scm | 79 +++++++++++++++++++++++++++++++++++---------
1 file changed, 63 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9ac9105342..af276cfbdc 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -162,6 +162,17 @@ (define-syntax-rule (define-deprecated-package old-name name)
(define-deprecated/public old-name name
(deprecated-package (symbol->string 'old-name) name)))
+(define texlive-source
+ (let ((version "20230313"))
+ (origin
+ (method url-fetch)
+ (uri (string-append "ftp://tug.org/historic/systems/texlive/"
+ (string-take version 4) "/"
+ "texlive-" version "-source.tar.xz"))
+ (sha256
+ (base32
+ "1fbrkv7g9j6ipmwjx27l8l9l974rmply8bhf7c2iqc6h3q7aly1q")))))
+
(define-public texlive-libkpathsea
(package
(name "texlive-libkpathsea")
@@ -33358,22 +33369,58 @@ (define-public texlive-chktex
(package
(name "texlive-chktex")
(version (number->string %texlive-revision))
- (source (texlive-origin
- name version
- (list "chktex/"
- "doc/chktex/"
- "doc/man/man1/chktex.1"
- "doc/man/man1/chktex.man1.pdf"
- "doc/man/man1/chkweb.1"
- "doc/man/man1/chkweb.man1.pdf"
- "doc/man/man1/deweb.1"
- "doc/man/man1/deweb.man1.pdf"
- "scripts/chktex/")
- (base32
- "0qyrllxvcymmr1a4sq9c88fw5zchcx0n6yac69s61fg6xypk18bq")))
- (outputs '("out" "doc"))
- (build-system texlive-build-system)
- (arguments (list #:link-scripts #~(list "chkweb.sh" "deweb.pl")))
+ (source
+ (origin
+ (inherit texlive-source)
+ (modules '((guix build utils)
+ (ice-9 ftw)))
+ (snippet
+ #~(begin
+ (with-directory-excursion "libs"
+ (for-each
+ delete-file-recursively
+ (scandir "."
+ (lambda (file)
+ (and (not (member file '("." "..")))
+ (eq? 'directory (stat:type (stat file))))))))
+ (with-directory-excursion "texk"
+ (let ((preserved-directories '("." ".." "chktex")))
+ (for-each
+ delete-file-recursively
+ (scandir "."
+ (lambda (file)
+ (and (not (member file preserved-directories))
+ (eq? 'directory
+ (stat:type (stat file)))))))))))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:out-of-source? #true
+ #:configure-flags
+ #~(list "--disable-native-texlive-build"
+ "--disable-all-pkgs"
+ "--enable-chktex")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'locate-global-configuration-file
+ ;; `chktex' needs to know where its global configuration file is.
+ ;; However, it cannot understand our convoluted TEXMFMAIN value.
+ ;; This phase forces configuration file name.
+ (lambda _
+ (substitute* "texk/chktex/chktex-src/OpSys.c"
+ (("kpse_var_value\\(\"TEXMFMAIN\"\\)")
+ (string-append "strdup(\"" #$output "/share/texmf-dist\")")))))
+ (add-after 'install 'post-install
+ (lambda _
+ (with-directory-excursion "texk/chktex"
+ (invoke "make" "install"))))
+ ;; Compilation forces a "/usr/bin/env perl" shebang. Change it.
+ (add-after 'post-install 'patch-shebang
+ (lambda _
+ (patch-shebang
+ (string-append #$output
+ "/share/texmf-dist/scripts/chktex/deweb.pl")))))))
+ (native-inputs (list pkg-config texlive-libkpathsea))
(inputs (list perl))
(home-page "https://ctan.org/pkg/chktex")
(synopsis "Check for errors in LaTeX documents")
base-commit: f6cf746938d29ab3d0888a5e58cad97ce634766a
--
2.41.0
Information forwarded
to
bug-guix <at> gnu.org
:
bug#65366
; Package
guix
.
(Sat, 31 Aug 2024 23:17:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
Chloe Brown via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:
> * Description
>
> Trying to run the chktex binary results in a permanent warning. When trying to
> run ~chktex -v~ (as done by Emacs) it escalates to an error. It appears the
> binary cannot find a necessary configuration file.
>
> * Expected Behaviour
>
> Running ~chktex -v~ would not give an error.
>
> * Actual Behaviour
>
> The following error message is produced and the program exits.
>
> WARNING -- Could not find global resource file.
> ERROR -- Illegal verbosity level.
>
> * Steps to Reproduce
>
> - Run the following command:
>
> guix shell -C texlive-bin -- chktex -v
>
> - Observe the error
>
> * Guix Details
>
> Observed on commit 78f080e25bfc02abd9a8fa88c8ad8d5854f54743
>
> * Other Notes
>
> - Also including the texlive-chktex package does not resolve the
> error.
This issue is fixed since last core-updates merge:
guix shell texlive-chktex -- chktex -v
does not give any error.
Regards,
--
Nicolas Goaziou
Reply sent
to
Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
:
You have taken responsibility.
(Sat, 31 Aug 2024 23:17:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Chloe Brown <chloe <at> yellowsquid.uk>
:
bug acknowledged by developer.
(Sat, 31 Aug 2024 23:17:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 29 Sep 2024 11:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 142 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.