Overleaf fails to compile project while latexmk by itself works
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1.3k
- Forks
- 310
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 1
Description
Steps to Reproduce
- Install a custom package under
/usr/local/texlive/texmf-local/ - Ensure it is installed properly by manually compiling a file inside the docker container using
latexmk - Open that same file using overleaf and hit compile
Expected Behaviour
The compilation finishes successfully and produces the same output as compiling manually.
Observed Behaviour
The compilation fails with a "file not found" error, while using latexmk inside the container produces a correct pdf without issuing any warnings.
Context
I've just updated by overleaf server to 5.0.1 from 4.1 and projects using my custom texlive packages no longer compile.
At first, I assumed that I didn't install the packages properly, but kpsewhich, pdftex, xetex and latexmk seem to have no problem finding and building them.
Technical Info
I've been using a testing file like
\documentclass{mybook}
\usepackage{blindtext}
\begin{document}
\blindtext
\end{document}
where mybook is provided by a custom package.
Weirdly, for one package, the error given by overleaf is about the .cls file itself, while for another, it is about a .tex file included by the .cls file.
The logs show the compiler successfully finds and reads that second .cls file and only fails when it encounters \RequirePackage used to load a .tex file that is also part of the package.
If I observe the exact latexmk command overleaf makes with ps, clean the temporary files and rerun the exact same command that failed for overleaf, it works fine and produces a correct pdf.
If this is a configuration issue, I'm not sure where overleaf could set any options that aren't applied when running latexmk manually. I've dumped the environment variables of overleaf's latexmk processes and they don't seem to contains any suspect configuration options.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in the Overleaf 5.0.1 Docker container with the custom TeX Live package and the sample document, then compare the Overleaf-launched latexmk invocation with the manually successful command. Check the related kpsewhich, pdftex, xetex, and latexmk behavior. Done means Overleaf compiles the project and produces the same PDF as the manual run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, latex
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100