Re: xindy.pl incorrect bin path? Or incorrect invocation?
Christopher Weedall <[email protected]> Sun, 5 Mar 2017 11:33:08 +1100
| Newsgroups | gmane.comp.tex.miktex |
|---|---|
| Message-ID | <CAMCFPwmVk6vBwVjb7yzud7kPFfNSBhGkKPVam0Gmb1dpyU5T-Q@mail.gmail.com> |
Sorry about this. I accidentally copied and pasted the wrong chunk from
the script. Here is the actual, relevant portion from xindy.pl:
if ( $is_w32 ) {
if ( -d "$cmd_dir/../../../bin/win32" ) { # TeX Live
$cmd_dir = "$cmd_dir/../../../bin/win32";
} elsif ( -d "$cmd_dir/../../miktex/bin/x64/internal" ) { #
MiKTeX 64-bit
$cmd_dir = "$cmd_dir/../../miktex/bin/x64/internal";
} elsif ( -d "$cmd_dir/../../miktex/bin/internal" ) { # MiKTeX
32-bit
$cmd_dir = "$cmd_dir/../../miktex/bin/internal";
} elsif ( -d "$cmd_dir/../../../../bin" ) { # W32TeX
$cmd_dir = "$cmd_dir/../../../../bin";
} else {
die "$cmd: Cannot locate bin directory";
}
} else {
On Sun, Mar 5, 2017 at 11:29 AM, Christopher Weedall <[email protected]>
wrote:
> Hi Ulrike,
>
> Oh yes, sorry I forgot to mention this. Calling it from
> makeglossaries.exe is what tipped me off to the problem. Calling xindy
> directly gives me the same issue. Specifically:
>
> C:\Program Files\MiKTeX 2.9\miktex\bin\x64>xindy
> xindy.pl: Cannot locate bin directory at C:\Users\MYUSERNAME\AppData\
> Roaming\MiKTeX\2.9\scripts\xindy\xindy.pl line 415.
>
> Not that the miktex\bin folder is in my system environment path and
> xindy.pl still cannot find it, because the path seems to be coded
> incorrectly (at least for my system - again, unless I am invoking it
> incorrectly).
>
> When changing the path as mentioned in my previous email, calling xindy
> results in this:
>
> C:\Program Files\MiKTeX 2.9\miktex\bin\x64>xindy
> You need to specify --out-file if the raw index is read from standard
> input.
>
> usage: xindy.pl [-V?h] [-qv] [-d magic] [-o outfile.ind] [-t log] \
> [-L lang] [-C codepage] [-M module] [-I input] \
> [--interactive] [--mem-file xindy.mem] \
> [idx0 idx1 ...]
>
> GNU-STYLE LONG OPTIONS FOR SHORT OPTIONS:
>
> -V / --version
> -? / -h / --help
> -q / --quiet
> -v / --verbose
> -d / --debug (multiple times)
> (supported: script, keep_tmpfiles, markup, level=n)
> -o / --out-file
> -t / --log-file
> -L / --language
> -C / --codepage
> -M / --module (multiple times)
> -I / --input-markup (supported: latex, xelatex, omega, xindy)
>
>
> The relevant Perl code (in the original script):
>
> # library directory
> if ( $ENV{XINDY_LIBDIR} ) {
> $lib_dir = $ENV{XINDY_LIBDIR};
> } elsif ( '@libdir@' ne '@libdir' . '@' ) { # GNU configure at work?
> if ( -d '@libdir@/xindy' ) { # /usr style
> $lib_dir = '@libdir@/xindy';
> } else {
> $lib_dir = '@libdir@'; # /opt style
> }
> } elsif ( -f "$cmd_dir/../lib/xindy.mem" ) { # /opt style
> $lib_dir = "$cmd_dir/../lib";
> } elsif ( -d "$cmd_dir/../lib/xindy" ) { # /usr style
> $lib_dir = "$cmd_dir/../lib/xindy";
> } else {
> die "$cmd: Cannot locate xindy library directory";
> }
>
> Where $cmd_dir is defined as:
>
> our $real_cmd = Cwd::realpath($0);
> our $cmd_dir = dirname($real_cmd);
>
>
> Based on printing $cmd_dir in xindy.pl and running it again via
> xindy.exe, it seems $0 is determining its value from the xindy.pl
> directory (in C:\Users\USERNAME\AppData\) rather than the xindy.exe
> directory (in C:\Program Files\).
>
> I am a bit confused about this because it seems a bit like a bug on my
> system (i.e. the $0 argument should be getting passed on from the .exe file
> to the .pl file). Except, it seems to be working for people by-and-large,
> which seems either like a configuration problem on my end or an incorrect
> call the the script.
>
> Hope this helps a bit!
>
> Best,
> Chris
>
>
>
> On Sun, Mar 5, 2017 at 2:59 AM, Ulrike Fischer <[email protected]> wrote:
>
>> Am Sat, 4 Mar 2017 13:53:04 +1100 schrieb Christopher Weedall:
>>
>>
>> > This path is where the Perl script is run from, but *not* where
>> > makeglossaries.exe is run from (which invokes xindy.pl).
>>
>> Can you run xindy directly without using makeglossaries? (I don't
>> have a 64-bit system, so I can't test).
>>
>>
>> --
>> Ulrike Fischer
>> http://www.troubleshooting-tex.de/
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Q: How can I leave the mailing list?
>> A: See http://docs.miktex.org/faq/support.html#leavingml
>>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml