I wrote my thesis with Sweave (R+LaTeX). Everything went fine until I bought a new computer. I copied the Sweave file (.Rnw) with all figures and tables, as well as with the bibliography (.bib).
When I compile the file on my new computer, everything is fine, text, figures, tables and layout.... BUT:
every in-text reference is a question mark, although the bibliography at the end of the document is 100% (number, title etc).
every cross-reference for the figures and tables is a double question mark, although the figures and tables are 100% (number, title etc).
Any idea of what is wrong?
Thanks, Elsa
\documentclass[a4paper,12pt,twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\usepackage{colortbl}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[english=usenglishmax]{hyphsubst}
\usepackage[nottoc]{tocbibind}
\usepackage{tabularx,array}
\usepackage{enumitem}
\usepackage{changepage}
\usepackage[all]{nowidow}
\usepackage{longtable}
\usepackage{scrextend}
\usepackage{amsmath}
\usepackage{etoolbox}
\usepackage{tikz}
\usepackage{titlecaps}
\usepackage{rotating}
\usepackage{nameref}
\usepackage{pdfpages}
\usepackage{xcolor}
\usepackage{color}
\usepackage{placeins}
\usepackage{pdflscape}
\usepackage{subfigure}
\usepackage{cleveref}
\usepackage{tabularx}
\usepackage[utf8]{inputenc}
\usepackage{floatrow}
\usepackage{float}
\usepackage{titlesec}
\usepackage{arydshln}
\usepackage{amsfonts,amssymb}
\setcounter{secnumdepth}{4}
\bibliographystyle{acm}
\usepackage{alphalph}
\renewcommand*{\thesubfigure}{(\alphalph{\value{subfigure}})}
\renewcommand{\chaptername}{}
\usepackage{graphicx}
\usepackage[justification=justified,format=plain]{caption}
\usepackage{afterpage}
\makeatletter
\renewcommand\@pnumwidth{2cm}
\patchcmd{\l@chapter}{\bfseries}{}{}{}
\makeatother
\begin{document}
%
%
%
\renewcommand\bibname{References}
\bibliography{TemporalPartitioning2}
\end{document}
Additional information:
The error I get when running bibtex is:
> This is BibTeX, Version 0.99d (MiKTeX 2.9.6840 64-bit) The top-level
> auxiliary file: Draft_PhDThesis_dec2017.aux The style file: acm.bst I
> found no \bibdata command---while reading file
> Draft_PhDThesis_dec2017.aux Warning--I didn't find a database entry
> for "Wulf" Warning--I didn't find a database entry for "Haeckel"
> Warning--I didn't find a database entry for "bioce" Warning--I didn't
> find a database entry for "Strauss" ... (There was 1 error message)
When I look at the .aux file I notice that there is no \bibdata{...} which I believe is created by \bibliography{...}. Not sure what is wrong.
I don't think the problem only lies with the bibtex and the bibliography because the cross-referencing of figures and tables is also not working properly. Unless there are two independent problems, but I don't think so.
The problem definitely lies with the installation because it works fine when I run it on my old laptop... I have not managed to find out what was wrong... if someone can someday shed some light, thanks!

bibtex? Also, have you tried to compile twice afterbibtexwithpdflatex? – koleygr Oct 07 '18 at 21:55pdflatex mainFilethenbibtex mainFileand again twicepdflatex mainFile... where "mainFile" is the name of your main file without extensions – koleygr Oct 11 '18 at 09:47sudo apt install texlive-bibtex-extra... in other case I hope someone will see the activity on this question and answer to you... – koleygr Oct 12 '18 at 20:41