Loris (& the list), did you get this sorted? It seems that I am running into the same problem now.
What seems to be happening is that the LaTeX file is created in /tmp/babel-XXXXXX/latex-YYYYYY.tex but the log, aux, etc. files are being created in the current directory (where the file with the LaTeX src block is). Although the PDF file is created properly, it is not where org would expect it to be (maybe)? The LaTeX file in /tmp/ compiles perfectly fine when I compile it manually. Attached is /tmp/ecm.org and here is a screenshot of my /tmp directory:
Note that latex-iLJhcd.tex is in /tmp/babel-falBv7/ but the {log,pdf,out} files are in /tmp/. The backtrace on error is also attached. This has been done with org from git updated a few minutes ago. Emacs from a few days ago. Thank you, eric -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-179-g5b5c42
title: ECM * black box model This is a graphical representation of \(y=f(x)\): #+header: :exports results #+header: :results raw #+header: :file blackboxmodel.png #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 #+header: :fit yes #+begin_src latex \begin{tikzpicture}[node distance=2cm, shorten >=2pt, shorten <=2pt] \node (x) {$x$}; \node[fill=yellow!10!black,draw=white] (box) [right of=x] {Model} edge [<-] (x); \node (f) [right of=box] {$f(x)$} edge [<-] (box); \end{tikzpicture} #+end_src
Debugger entered--Lisp error: (error "File \"/tmp/babel-falBv7/latex-iLJhcd.pdf\" wasn’t p...") signal(error ("File \"/tmp/babel-falBv7/latex-iLJhcd.pdf\" wasn’t p...")) error("File \"/tmp/babel-falBv7/latex-iLJhcd.pdf\" wasn't p...") org-compile-file("/tmp/babel-falBv7/latex-iLJhcd.tex" ("pdflatex %f" "bibtex %b" "pdflatex %f" "pdflatex %f") "pdf" "See \"*Org PDF LaTeX Output*\" for details" #<buffer *Org PDF LaTeX Output*> ((66 . "bibtex") (76 . "pdflatex"))) org-latex-compile("/tmp/babel-falBv7/latex-iLJhcd.tex") org-babel-latex-tex-to-pdf("/tmp/babel-falBv7/latex-iLJhcd.tex") org-babel-execute:latex("\\begin{tikzpicture}[node distance=2cm, shorten >=2..." ((:colname-names) (:rowname-names) (:result-params "replace" "raw") (:result-type . value) (:results . "replace raw") (:exports . "results") (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:fit . "yes") (:imagemagick . "yes") (:iminoptions . "-density 600") (:imoutoptions . "-geometry 400") (:file . "blackboxmodel.png"))) org-babel-execute-src-block(nil ("latex" "\\begin{tikzpicture}[node distance=2cm, shorten >=2..." ((:colname-names) (:rowname-names) (:result-params "raw" "replace") (:result-type . value) (:results . "raw replace") (:exports . "results") (:file . "blackboxmodel.png") (:imoutoptions . "-geometry 400") (:iminoptions . "-density 600") (:imagemagick . "yes") (:fit . "yes") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "" nil 265 "(ref:%s)")) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c)