9

Today's updates of MiKTeX include Xindy (at last!). This is great news, but unfortunately I can't get it to work. With the following minimal example:

\documentclass{article}
\usepackage[xindy]{glossaries}
\newacronym{AKA}{AKA}{Also Known As}
\makeglossaries
\begin{document}
\glsaddall
\printglossaries
\end{document} 

makeglossaries fails with exit code 25. This is the contents of the .glg file:

;; This logfile was generated automatically by `xindy'
;; at 20.06.2015  07:29:59
;; Indexstyle: "5i3SDna0ed", Rawindex: "Yl65BHMXsP", Output: "test1.gls"

ERROR: "" is not a valid filename !

*** Unable to execute: '"xindy"  -L english  -I xindy -M "test1" -t "test1.glg" -o "test1.gls" "test1.glo"' ***

Failed with error code 1.

Status report:

Opening logfile "test1.glg" (done)
Reading indexstyle...
Loading module "5i3SDna0ed"...

Error in line 1:
(require "")
ERROR: "" is not a valid filename !

and this is the contents of the generated 5i3SDna0ed file

(require "")
(require "test1.xdy")

Do I need to configure something to get Xindy to work?

Sterry
  • 865
  • You might want to add the glossaries tag as well. Then perhaps Nicola will notice the issue (Nicola is the writer of the glossaries package). She is on the site. – daleif Jun 20 '15 at 06:41
  • Also it is a strange error. I don't see anything wrong with the line it is attempting to execute – daleif Jun 20 '15 at 06:42
  • In my case, line 1 of test1.xdy is (require "tex.xdy"). I think (require "") is strange. – Akira Kakuto Jun 20 '15 at 07:55
  • I would like to look at it, but I don't have the update yet and the repositories are down currently so I can't get it. So it will have to wait ... – Ulrike Fischer Jun 20 '15 at 11:17
  • This works fine for me with makeglossaries version 2.15, glossaries.sty version 4.15 and xindy version 2.5.0. Can you directly run the command it's trying to execute? – Nicola Talbot Jun 20 '15 at 15:33
  • @NicolaTalbot Same error: Error in line 1: (require "") ERROR: "" is not a valid filename ! – Sterry Jun 20 '15 at 15:47
  • @UlrikeFischer Have you been able to install the update? – Sterry Jun 21 '15 at 15:32
  • The repositories are still offline, but I installed the miktex xindy from CTAN and a local repository. Your example compiled without error. Do you have a 32bit like me or a 64bit? What is your perl version? – Ulrike Fischer Jun 21 '15 at 16:45
  • @UlrikeFischer 32-bit MiKTeX and Strawberry Perl 5.18 – Sterry Jun 21 '15 at 17:45
  • Since line 1 of your test1.xdy file is a comment, I don't think the error refers to that file. The error message comes after Loading module "5i3SDna0ed"... so I think the error is in that file, but that's a temporary file created by xindy and is deleted at the end of the xindy run. I think the problem may be with your particular version of xindy. It might be worth contacting the xindy mailing list. – Nicola Talbot Jun 22 '15 at 14:30
  • A command xindy -d keep_tmpfiles -L english -I xindy -M test1 -t test1.glg -o test1.gls test1.glo leaves temporary files, probably in the current working directory in the case of Windows. – Akira Kakuto Jun 22 '15 at 21:39
  • The contents of a temporary file in my case were (require "lang/english/latin9-lang.xdy") (require "test1.xdy") – Akira Kakuto Jun 22 '15 at 22:03
  • @AkiraKakuto thanks for the info. In my case the temp file contains (require "") – Sterry Jun 23 '15 at 05:11
  • I can only imagine that it is a perl problem. I have active perl, version 5.16.3. and it works fine, there is no require with empty argument. The code for the temporary style file is in xindy.pl around line 800. – Ulrike Fischer Jun 23 '15 at 08:11
  • @Sterry : By adding -d script option, you obtain more information on your screen: xindy -d script -d keep_tmpfiles -L english -I xindy -M test1 -t test1.glg -o test1.gls test1.glo Please try. – Akira Kakuto Jun 23 '15 at 09:17
  • @UlrikeFischer Tried with latest version of ActivePerl and Strawberry Perl, but same error :-( – Sterry Jun 23 '15 at 11:16
  • 1
    @UlrikeFischer I bet that the error comes from the fact I installed MiKTeX in a directory containing spaces. – Sterry Jun 23 '15 at 14:28
  • @Sterry: This is certainly a difference to my system, but I don't know this would lead to a missing lang/english/latin9-lang.xdy in the style. Did you check if there are updates? Did you try to deinstall and reinstall xindy? – Ulrike Fischer Jun 23 '15 at 14:44
  • @UlrikeFischer See the answer below. Do you mind to send a bug report to Christian Schenk? – Sterry Jun 23 '15 at 19:08
  • Yes, I do mind. It is you who found the bug, so you can handle it. Beside this: the line is also in the xindy.pl of texlive, so imho you should better contact Joachim Schrod. – Ulrike Fischer Jun 23 '15 at 21:43
  • @UlrikeFischer: Thanks a lot. I have updated xindy.pl in TeX Live: r37650. – Akira Kakuto Jun 23 '15 at 22:34
  • @UlrikeFischer Sorry if I asked. I sent a mail to J. Schrod. – Sterry Jun 24 '15 at 05:33
  • @Sterry: As Akira updated the sources it is probably no longer necessary. I will add a message in miktex bug tracker that it is necessary to sync. – Ulrike Fischer Jun 24 '15 at 07:08
  • The bug should be resolved now see https://sourceforge.net/p/miktex/bugs/2372/. But looking at the next question (http://tex.stackexchange.com/questions/252299/xindy-and-miktex-empty-raw-index-file) I bet more "path-with-spaces-errors" will emerge ... – Ulrike Fischer Jun 26 '15 at 07:11

1 Answers1

7

The problem is indeed related to a MiKTeX installation in a path containing spaces. It can be solved by a small edit in C:\Program Files\MiKTeX2.9\scripts\xindy\xindy.pl

replace in line 779

        @styles = glob("$lang_dir/$variant$cp*-lang.xdy");

by

        @styles = glob("'$lang_dir/$variant$cp*-lang.xdy'");
Wolfi
  • 86