Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#17978 - [texlive-bin] bibtex cannot find .aux file from a different directory

Attached to Project: Arch Linux
Opened by Patrick McCarty (pnorcks) - Sunday, 24 January 2010, 03:04 GMT
Last edited by Francois Charette (Firmicus) - Friday, 05 February 2010, 08:20 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Francois Charette (Firmicus)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



When using LaTeX and BibTeX, BibTeX cannot find the .aux file generated by `latex foo' if the .aux file is moved to a separate directory for processing (such as /tmp). BibTeX then exits with an error.

texlive-bin 2009.4-3 did not exhibit this behavior.

Additional info:
Version: texlive-bin 2009.5-1

Steps to reproduce:
1) Download the two attached files.
2) Move to the directory with the files, and run the following commands:

$ latex test
$ mv test.aux /tmp
$ bibtex /tmp/test.aux

The last command exits with the message

bibtex: Not writing to /tmp/test.blg (openout_any = p).
I couldn't open file name `/tmp/test.blg'
This task depends upon

Closed by  Francois Charette (Firmicus)
Friday, 05 February 2010, 08:20 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See last comment
Comment by Francois Charette (Firmicus) - Monday, 25 January 2010, 15:13 GMT
I can hardly believe this worked with texlive-bin 2000.4, but I can no longer check this. AFAIK, the bibtex sources have not changed, nor have the configure options. I fear I cannot help on this one, sorry... I think bibtex is not supposed to be run in another directory than the one where the aux file is located. But you are welcome to prove me wrong :)
Comment by Patrick McCarty (pnorcks) - Monday, 25 January 2010, 20:40 GMT
Thank you for your response. It does indeed work with texlive-bin 2009.4, so I just wanted to sure this wasn't an obvious regression.

I know the example I posted seems contrived, but it's adapted from a script that was recently re-enabled in LilyPond's build system:;a=blob;f=scripts/build/;h=c16f21cce28c9b91512bf08cf6393172bb96036a;hb=fc7e42590263fb4bf8a66b7d3986d03cd65ddef9

With texlive-bin 2009.5, I am getting an error identical to the one I posted above while compiling LilyPond. And downgrading to texlive-bin 2009.4 fixes it.

Should I take this up on the TeX Live mailing list, or do you think it would be best to fix LilyPond's build script?
Comment by Francois Charette (Firmicus) - Monday, 25 January 2010, 20:51 GMT
Mmh, interesting, but I really have no idea what this can be. The best thing would be to ask on the texlive list, or perhaps better the tl-build list, as the people there are more likely to know what causes this. But it may be indeed much simpler to just rewrite LilyPond build script (do the equivalent of pushd and popd before and after calling bibtex).
Comment by mardi (eeg) - Friday, 29 January 2010, 06:15 GMT
Hi, just ran into the same problem as pnorcks. I'm using gedit (with its latex plug-in) and received the same error he did:

> /usr/bin/bibtex: Not writing to /home/user/test/test.blg (openout_any = p).
> I couldn't open file name `/home/user/test/test.blg'

So, its not restricted to just Lilypond scripts.

Compiling using a bash script in the same directory works. As Firmicus said, its probably something to do with bibtex being invoked and running in a different directory. *sigh*
Comment by Francois Charette (Firmicus) - Friday, 29 January 2010, 08:33 GMT
OK, I have just asked about this on the mailing list.
Comment by Patrick McCarty (pnorcks) - Tuesday, 02 February 2010, 22:56 GMT
Thanks for doing that. I will be fixing LilyPond's build script shortly to comply with the new behavior.
Comment by mardi (eeg) - Friday, 05 February 2010, 03:16 GMT
Hi, this issue is still present in texlive-bin 2009.5-2

Worse still, Its not feasible to downgrade to 2009.4-3. The Latex command requires libpng12, which is upgraded to libpng14 with the latest batch of updates. And you cant downgrade to libpng12 because... you get the idea.

So, my solution has been to write a bash script wrapper around the bibtex binary (to do the pushd and popd). Sigh.

Seems like the bug is with the binary, less to do with the arch package. Thanks firmicus for chasing this up.
Comment by Francois Charette (Firmicus) - Friday, 05 February 2010, 08:20 GMT
@mardi: It's not a bug in fact, but a new security feature. If you don't mind the risk, you can easily overcome this by setting
openout_any = a
in your texmf.cnf as mentioned in this thread
BTW 2009.5-2 is only a recompilation with latest libjpeg/libpng, nothing was changed.
So I'm closing this now.