BibTeX, biblatex and biberSteps to troubleshoot 'undefined references' in Linux

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

Steps to troubleshoot 'undefined references' in Linux

Post by erwann »

Made a copy of the bib file in directory to rule out path problem. I get the message:

Code: Select all

LaTeX Warning: There were undefined references.

 )</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on LaTeX.pdf (1 page, 17326 bytes).
Transcript written on LaTeX.log.

TeX Output finished at Fri Sep  7 15:59:55
I don't recall having such problems under Mac. Now I'm on Linux Mint 18.3

Code: Select all

%Content of en-math.bib:
%@book{golub-96,
%	Author = {Charles H. Golub and Charles F. Van Loan},
%	Date-Added = {2017-05-23 23:29:35 +0000},
%	Date-Modified = {2017-05-23 23:31:30 +0000},
%	Isbn = {0-8018-5414-8},
%	Publisher = {The Johns Hopkins University Press},
%	Title = {Matrix computations},
%	Year = {1996}}

Code: Select all

\documentclass{article}
%\usepackage{natbib}

\begin{document}

\cite{golub-96}

%\bibliography{/home/er/Documents/essential/share/LaTeX/bib/en-math/en-math.bib}
\bibliography{en-math.bib} % local copy
\bibliographystyle{plainnat}

% This works:
%\begin{thebibliography}{}
%\bibitem{golub-96} Charles H. Golub and Charles F. Van Loan, {\em Matrix computations}, 1996
%\end{thebibliography}

\end{document}
Compile message:


Log:

Code: Select all

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex 2018.6.16)  7 SEP 2018 15:59
entering extended mode
 restricted \write18 enabled.
 file:line:error style messages enabled.
 %&-line parsing enabled.
**\input LaTeX.tex
(./LaTeX.tex (/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (./LaTeX.aux)
\openout1 = `LaTeX.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.


LaTeX Warning: Citation `golub-96' on page 1 undefined on input line 6.

No file LaTeX.bbl.
[1

{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./LaTeX.aux)

LaTeX Warning: There were undefined references.

 ) 
Here is how much of TeX's memory you used:
 203 strings out of 492646
 2170 string characters out of 6129563
 58970 words of memory out of 5000000
 4174 multiletter control sequences out of 15000+600000
 3948 words of font info for 15 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 23i,4n,22p,120b,107s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on LaTeX.pdf (1 page, 17326 bytes).
PDF statistics:
 16 PDF objects out of 1000 (max. 8388607)
 10 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Steps to troubleshoot 'undefined references' in Linux

Post by rais »

erwann wrote:

Code: Select all

%Content of en-math.bib:
%@book{golub-96,
%	Author = {Charles H. Golub and Charles F. Van Loan},
%	Date-Added = {2017-05-23 23:29:35 +0000},
%	Date-Modified = {2017-05-23 23:31:30 +0000},
%	Isbn = {0-8018-5414-8},
%	Publisher = {The Johns Hopkins University Press},
%	Title = {Matrix computations},
%	Year = {1996}}
you need to get rid of the percent signs leading `@book' and all consecutive lines here
erwann wrote: LaTeX Warning: Citation `golub-96' on page 1 undefined on input line 6.
On the first run, that is quite normal. The citations are collected in the .aux file for BibTeX to work with, but BibTeX has not been called, yet.
erwann wrote: No file LaTeX.bbl.
You need to run BibTeX on your LaTeX[.aux] file.
Afterwards, you need to run (pdf)LaTeX again twice to resolve the reference(s).
If this reference is still undefined, have a look at the LaTeX.blg file (which is BibTeX's log file) and check for errors/warnings in there.

KR
Rainer
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

Steps to troubleshoot 'undefined references' in Linux

Post by erwann »

you need to get rid of the percent signs leading `@book' and all consecutive lines here
The reference with % on each line was preceded by

Code: Select all

%Content of en-math.bib:
so no reason to think that there is a leading % in the bib file itself.

*.blg:

Code: Select all

This is BibTeX, Version 0.99d (TeX Live 2015/Debian)
Capacity: max_strings=4000, hash_size=5000, hash_prime=4253
The top-level auxiliary file: LaTeX.aux
I couldn't open database file en-math.bib
---line 3 of file LaTeX.aux
 : \bibdata{en-math
 :                 }
I'm skipping whatever remains of this command
I couldn't open style file plainnat.bst
---line 4 of file LaTeX.aux
 : \bibstyle{plainnat
 :                   }
I'm skipping whatever remains of this command
I found no database files---while reading file LaTeX.aux
I found no style file---while reading file LaTeX.aux
You've used 1 entry,
            0 wiz_defined-function locations,
            86 strings with 507 characters,
and the built_in function-call counts, 0 in all, are:
= -- 0
> -- 0
< -- 0
+ -- 0
- -- 0
* -- 0
:= -- 0
add.period$ -- 0
call.type$ -- 0
change.case$ -- 0
chr.to.int$ -- 0
cite$ -- 0
duplicate$ -- 0
empty$ -- 0
format.name$ -- 0
if$ -- 0
int.to.chr$ -- 0
int.to.str$ -- 0
missing$ -- 0
newline$ -- 0
num.names$ -- 0
pop$ -- 0
preamble$ -- 0
purify$ -- 0
quote$ -- 0
skip$ -- 0
stack$ -- 0
substring$ -- 0
swap$ -- 0
text.length$ -- 0
text.prefix$ -- 0
top$ -- 0
type$ -- 0
warning$ -- 0
while$ -- 0
width$ -- 0
write$ -- 0
(There were 4 error messages)
Screenshot from 2018-09-11 16-58-02.png
Screenshot from 2018-09-11 16-58-02.png (28.53 KiB) Viewed 11093 times
Screenshot from 2018-09-11 16-51-27.png
Screenshot from 2018-09-11 16-51-27.png (35.34 KiB) Viewed 11093 times
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Steps to troubleshoot 'undefined references' in Linux

Post by rais »

erwann wrote: The reference with % on each line was preceded by

Code: Select all

%Content of en-math.bib:
so no reason to think that there is a leading % in the bib file itself.
why did you present it in this way here, then? You could've just copied its contents, a bib file is plain text, after all.
erwann wrote:

Code: Select all

This is BibTeX, Version 0.99d (TeX Live 2015/Debian)
Interesting. Your BibTeX is from TL15, yet according to your previous log file, you're on TL18. Perhaps the TL15 version is found prior to its TL18 counterpart? Mayhap it doesn't look for the pathes set in TL18...
erwann wrote:

Code: Select all

I couldn't open database file en-math.bib
That might explain, why your en-math.bib isn't found (even in same directory as .aux file).
On a console, try

Code: Select all

which bibtex
and check, where your BibTeX really comes from.

KR
Rainer
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

Steps to troubleshoot 'undefined references' in Linux

Post by erwann »

I don't see how the machine thinks it's TeX Live 2015.

Code: Select all

$ tex --version
TeX 3.14159265 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 D.E. Knuth.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the TeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the TeX source.
Primary author of TeX: D.E. Knuth.

Code: Select all

/usr/local/texlive $ ls
2018  texmf-local

Code: Select all

$ which bibtex
/usr/bin/bibtex
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Steps to troubleshoot 'undefined references' in Linux

Post by rais »

perhaps have a look at your own sig: you claim to be on TL15.

Anyway, you seem to have two TL installations on your Linux system, where the older TL15 was prepackaged for your Linux distribution.
Unfortunately, your TL15's binaries are found first...
What I find odd in this regard is: how did you manage to get the TL18's version of pdfLaTeX in the first place? You must've passed the path to it somehow, lest the TL15's version of should be taken instead (if your tex run on the console is any indication).
You could pass the same path along for your bibtex call...
Or, you could try to prepend the TL18's binary path (usually somewhere under /usr/local/texlive/2018/bin/<architecture>/).
Or, you could try to remove bibtex & Co from /usr/bin.

KR
Rainer
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

Steps to troubleshoot 'undefined references' in Linux

Post by erwann »

Code: Select all

you could try to prepend the TL18's binary path
This leaves too much to be guessed.

There is a TL15/TL18 conflict. I need a clean cut approach to remove TL15 and leave out TL18. Thanks.
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)
Post Reply