Discussion:
[tex-k] cannot call bibtex with absolute path name
Dr. Brian Biswell
2015-10-19 00:07:26 UTC
Permalink
I am trying to use bibtex on a document. I have TeXLive 2015 installed on Mac OS X El Capitan. I am running it from the Terminal. When I call bibtex with either an absolute path name or relative path name with ‘/./‘ in it, I get an error saying it cannot write to the .blg file.

The following examples will work on my machine:

bibtex texfile
bibtex path/to/texfile

the following will not work

bibtex /abs/path/to/texfile
bibtex path/to/./texfile
bibtex ../texfile


I get the same error in TeXLive 2014, but TeXLive 2011 seems to work properly (the absolute and relative paths will work properly).

--
Dr. Brian Biswell
***@gmail.com
Karl Berry
2015-10-19 23:06:35 UTC
Permalink
I get the same error in TeXLive 2014, but TeXLive 2011 seems to work
properly

Thanks for the report. I believe it is related to security, in that we
had to disallow writing to absolute/explicitly-relative paths by default
in bibtex, among other programs. This is partly because bibtex is one
of the (very few) shell_escape_commands allowed to be executed from a
TeX document.

If you want to enable it, you can set the environment variable
openout_any, as in:
$ openout_any=a bibtex /foo/bar.aux

Best,
Karl
Dr. Brian Biswell
2015-10-20 03:14:53 UTC
Permalink
Karl,

Thank you, this fixes the issue I was having. I am using gnu make to generate the documentation for my project and this was failing in the make rule. I wouldn’t normally call bibtex in this manner from the command line, but the make file needs to use either relative or absolute paths without breaking a number of other features in the setup.

-Brian
--
Dr. Brian Biswell
Post by Dr. Brian Biswell
I get the same error in TeXLive 2014, but TeXLive 2011 seems to work
properly
Thanks for the report. I believe it is related to security, in that we
had to disallow writing to absolute/explicitly-relative paths by default
in bibtex, among other programs. This is partly because bibtex is one
of the (very few) shell_escape_commands allowed to be executed from a
TeX document.
If you want to enable it, you can set the environment variable
$ openout_any=a bibtex /foo/bar.aux
Best,
Karl
Akira Kakuto
2015-10-19 23:36:52 UTC
Permalink
Post by Dr. Brian Biswell
bibtex path/to/./texfile
Here
bibtex path/to/./texfile
works with openout_any=p.

bibtex path/to/../to/texfile
does not work, since parent and absolute paths are forbidden.

Best,
Akira Kakuto
Loading...