Make fails due to file not found (relative path issues)
fedetask opened this issue · comments
Referring to our code in PR #5.
When trying to run the command make
from the journal
folder, we get errors due to pdflatex not being able to find the included files. For example, the line \input{intro.tex}
in the file openreview/content.tex
will not work:
Latexmk: This is Latexmk, John Collins, 1 January 2015, version: 4.41.
Rule 'pdflatex': Rules & subrules not known to be previously run:
pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'xelatex -interaction=nonstopmode -recorder "article.tex"'
------------
Latexmk: References changed.
Latexmk: Non-existent bbl file 'article.bbl'
No file article.bbl.
Latexmk: Missing input file: 'intro.tex' from line
'! LaTeX Error: File `intro.tex' not found.'
Latexmk: Log file says output to 'article.pdf'
Latexmk: List of undefined refs and citations:
Citation `beta-vae' on page 2 undefined on input line 34
Citation `geco' on page 2 undefined on input line 33
Citation `pytorch' on page 1 undefined on input line 10
------------
Running 'make "article.bbl"'
------------
make[1]: *** No rule to make target 'article.bbl'. Stop.
------------
Running 'make "intro.tex"'
------------
make[1]: *** No rule to make target 'intro.tex'. Stop.
Latexmk: Summary of warnings:
Latex failed to resolve 3 citation(s)
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 256
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
make: *** [article.pdf] Error 12
The compiler cannot find the intro.tex
file.
However, if we modify the include statement as \input{../openreview/content.tex}
it will work, and return an error to the next \input
statement whose path is not relative to the journal
folder. This happens also for included images, so to fix it we would need to add ../openreview
to all the figures and inputs.
Here is the link to the full output of make
.
I opened the issue because to me this looks related to some issue in the makefiles and it might be helpful to others.
Thanks for the detailed description and the logs! I have made some comments in the PR, summarizing it here too:
- No need to import neurips_2019 package, as we will be using the ReScience style files
- No need to import fontenc, as it breaks ReScience fonts
Can you check if the relative import issues exists after fixing the above?
We fixed the issues you mentioned but the problem persists. From the automatic build triggered by the commit on the PR, I read the following output, so I ruled out that it might be an issue of my local installation/configuration:
Building rodas2021rehamiltonian
/github/workspace/rodas2021rehamiltonian/journal
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
Rule 'pdflatex': The following rules & subrules became out-of-date:
'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'xelatex -interaction=nonstopmode -recorder "article.tex"'
------------
Latexmk: References changed.
Latexmk: Non-existent bbl file 'article.bbl in line'
No file article.bbl.
Latexmk: Missing input file: 'intro.tex' from line
'! LaTeX Error: File `intro.tex' not found.'
Latexmk: List of undefined refs and citations:
Citation 'beta-vae' on page 1 undefined on input line 34
Citation 'geco' on page 1 undefined on input line 33
Citation 'pytorch' on page 1 undefined on input line 10
------------
Running 'make "article.bbl"'
------------
make[1]: *** No rule to make target 'article.bbl'. Stop.
------------
Running 'make "intro.tex"'
------------
make[1]: *** No rule to make target 'intro.tex'. Stop.
Latexmk: Summary of warnings from last run of *latex:
Latex failed to resolve 3 citation(s)
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 1
Refer to 'article.log' for details
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
make: *** [Makefile:30: article.pdf] Error 12
Build complete
Solution for anyone encountering the same problem: any \include{path}
in files in the openreview
folder must include as \include{../openreview/path}
since the latex compilation is run from the journal
folder. This is also valid for figures.
Closing the issue, thanks for your help!