plk/biber

How does Biber finds its files

Closed this issue · 5 comments

I have a small file

\documentclass{book}

\usepackage{biblatex}
\addbibresource{biblio.bib}

\begin{document}
Test!
\nocite{*}
\printbibliography
\end{document}

with no "biblio.bib" file in the current directory. When I process with latex/biber/latex I get what I would expect:

ERROR - Cannot find 'biblio.bib'!
INFO - ERRORS: 1

On a machine of a friend of mine, with almost exactly the same set-up (TeXLive), Biber finds the file:

/usr/local/texlive/2023/texmf-dist/doc/latex/msc/biblio.bib

and process it.

We checked the environment variables and they are completely void of anything related to TeX.

How is it fiding that file?

plk commented

See page 12 of the biber pdf manual (type texdoc biber in a shell). It's finding it for your friend because kpsewhich biblio.bib is presumably finding it, which is what biber tries if all else fails.

But, it does NOT find the file under TeXLive 2023 (it finds under TL 2022). Has this changed recently?

plk commented

Is there any change that the TL index hasn't been update to include the file? Try running mktexlsr?

moewew commented

Can you please check what

kpsewhich biblio.bib

gives on the relevant systems? If there is an issue at all, I'm hoping it is a kpsewhich issue and not a Biber issue.

I checked on my Linux machine with TeX Live 2021, 2022, 2023. In 2022 and 2023 (fully updated) biblio.bib is not found by kpsewhich biblio.bib and the Biber run even though it is present in the doc tree (e.g. /usr/local/texlive/2023/texmf-dist/doc/latex/msc/biblio.bib). With 2021 the file is found, but there it resides in /usr/local/texlive/2021/texmf-dist/bibtex/bib/msc/biblio.bib, where I expect it to be found. (I think this commit in May 2022 changed the location: https://tug.org/pipermail/tex-live-commits/2022-May/021912.html).

I don't think one would want kpsewhich/Biber to find files in the doc subtree by default. Files there probably have fairly generic names.

You may want to check the relevant configurations of kpsewhich on the relevant systems. Maybe someone accidentally added the doc subtree to the paths searched by default on one of the systems. See https://tug.org/texinfohtml/kpathsea.html#Path-sources.

Indeed it is kpsewhich biblio.bib the responsible part for finding the file. It find it in TL 2022 (not updated) and no longer finds it in the updated or 2023, which solves the problem from now on.