overleaf / overleaf/toolkit

Overleaf fails to compile project while latexmk by itself works

Open
#237 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Install a custom package under /usr/local/texlive/texmf-local/
  2. Ensure it is installed properly by manually compiling a file inside the docker container using latexmk
  3. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.