GeneralGlossaries package: error, "can't fork: bad file descriptor

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
danol
Posts: 7
Joined: Mon Sep 27, 2010 5:30 pm

Glossaries package: error, "can't fork: bad file descriptor

Post by danol »

Hi,

First post here. I've failed to get the glossaries package working. I've been through the manual, and through Nicola Talbot's glossaries guide (Glossaries, Nomenclature, Lists of Symbols and Acronyms).

I've tried the sample doc, sample.tex, that comes with the package. Following the above guide, I've tried running makeglossaries from both the command line, and through texniccenter's postprocessing options. I've attempted using both makeindex and xindy.

I have PERL installed and that's working. But as soon as there's an attempt to run either makeindex or xindy, I'm getting the same error: "can't fork: bad file description."

(And, of course, no glossary.)

I'm not sure where to start with this - that error message hardly appears on the interwebs, so I don't know how to interpret it.

Any starting pointers gratefully received. As I say, as well as my own thesis document, I've tested this with the sample.tex in glossaries/samples. I'm not sure what other information I can supply at this point.

Any ideas? Any other info I should supply? (And is this the right forum for this?)

Thanks,

Dan

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Re: Glossaries package: error, "can't fork: bad file descrip

Post by nlct »

Do you have any non-alphanumeric characters in your path name? (e.g. '&', '|' or '>') I can't think off-hand what else it might be. Try using the "-n" option to makeglossaries and copy and paste the output here. (This just prints what command it would do without actually executing it.)

Regards
Nicola Talbot
danol
Posts: 7
Joined: Mon Sep 27, 2010 5:30 pm

Re: Glossaries package: error, "can't fork: bad file descrip

Post by danol »

Thanks for the reply. I've attached output with -n, without, and also without the file argument to show that the script seems to be working otherwise. This is using sample.tex that comes with glossaries. ist and glo files exist, but no .glg or .gls files exist.

Could it be something as simple as me not doing something correctly with makeindex? As I understood it, though, the PERL script should be doing that already...?

Thanks,

Dan
Attachments
glossampleoutputs.txt
(1.39 KiB) Downloaded 273 times
danol
Posts: 7
Joined: Mon Sep 27, 2010 5:30 pm

Re: Glossaries package: error, "can't fork: bad file descrip

Post by danol »

OK, so I've spent some more time trying to work out what's going on. I've re-created the error with as basic a document as possible - see attached tex file. I've also found a way to make it produce the glossaries, but I don't understand why it's working. So -

Makeindex runs fine, and glossary entries can be used in the text. However, I can't directly call the Perl script to build the glossary with "makeglossaries indextest" - I still get the "can't fork: bad file descriptor" error.

However - and this I don't understand - if I copy the command line text that the Perl script was trying to run, manually paste it back in and run it that way - success! Exactly the same text.

So that's good news, in that I now have a glossary. But it'd be good to know why it's doing this. For now I'll just paste in the full command (or commands, if there's more than one glossary, e.g. when using acronyms.)

Any thoughts gratefully received. It doesn't make sense to me: if the Perl script is outputting a command - that works fine when copied, pasted and run - why on Earth would it fail to run by itself?

(Oh: I'd also mention, it look me a little while to realise there's no Xindy for windows. Usually Miktex downloads packages 'on the fly', so I presumed that had happened with xindy - not so. Makeindex is working fine though.)

p.s. you might have guessed, I don't use Perl!

Cheers,

Dan
Attachments
indextest.tex
(2.81 KiB) Downloaded 283 times
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Re: Glossaries package: error, "can't fork: bad file descrip

Post by nlct »

The makeglossaries script tries to capture error messages from makeindex/xindy. I don't know if it's the operating system or the version of Perl you have installed that's causing a problem, but I'll modify the code so that if the redirection doesn't work, it will just call makeindex/xindy without trying to detect if things go wrong. For now you'll just have to call makeindex explicitly, as you mentioned.

Regards
Nicola Talbot
danol
Posts: 7
Joined: Mon Sep 27, 2010 5:30 pm

Re: Glossaries package: error, "can't fork: bad file descrip

Post by danol »

Thanks for that. Yes, I suspect it's probably a windows-related difference in some small element of a filename...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Glossaries package: error, "can't fork: bad file descriptor

Post by localghost »

If the problem is solved with that, please mark the topic accordingly as clearly written in the Board Rules (to be rad before posting). Otherwise tell us what is missing.


Best regards
Thoesten
danol
Posts: 7
Joined: Mon Sep 27, 2010 5:30 pm

Glossaries package: error, "can't fork: bad file descriptor

Post by danol »

localghost wrote:If the problem is solved with that, please mark the topic accordingly as clearly written in the Board Rules (to be rad before posting). Otherwise tell us what is missing.
I presume you mean: "If you find your problem solved, mark the concerning thread accordingly by editing the initial post (which is meant to be chronological the very first in a thread) and simply choosing the green check-mark from the icon list without any modifications to the topic title."

Try as I might, I couldn't see any way of editing my first post to change the green check-mark. Where's the edit option?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Glossaries package: error, "can't fork: bad file descriptor

Post by localghost »

danol wrote:I presume you mean: "If you find your problem solved, mark the concerning thread accordingly by editing the initial post (which is meant to be chronological the very first in a thread) and simply choosing the green check-mark from the icon list without any modifications to the topic title." […]
What else should I mean?
danol wrote:[…] Try as I might, I couldn't see any way of editing my first post to change the green check-mark. Where's the edit option?
Of course you don't if you decide after more than three months(!) to follow the directions. There is a time limit for editing posts. Next time mark the topic immediately after you got the solution. But thanks for responding. For now I will mark the topic accordingly.
Post Reply