conda-forge / texlive-core-feedstock

A conda-smithy repository for texlive-core.
BSD 3-Clause "New" or "Revised" License
1 stars 25 forks source link

Can't locate mktexlsr.pl in @INC at .../mktexfmt line 23. #61

Open eschen42 opened 2 years ago

eschen42 commented 2 years ago

Issue:

Can't locate mktexlsr.pl in @INC

In issue 42, @ngam indicated that this is a separate issue from that issue. That issue shows that my efforts to resolve my issue have come to naught.

Context:

Rscript cmd_anova.R

Snippet from cmd_anova.R:

rmarkdown::render(
  input = paste(script.dir, "QuantDataProcessingScript.Rmd", sep="/")
, output_format = rmarkdown::pdf_document()
, output_file = reportFileName
, params = rmarkdown_params
)

Tail of output:

/home/art/miniforge3/envs/step5/bin/pandoc +RTS -K512m -RTS QuantDataProcessingScript.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output cmd_report.tex --lua-filter /home/art/miniforge3/envs/step5/lib/R/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /home/art/miniforge3/envs/step5/lib/R/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --variable 'geometry:margin=1in' 
! kpathsea: Running mktexfmt pdflatex.fmt

! Can't locate mktexlsr.pl in @INC (@INC contains: /home/art/miniforge3/envs/step5/share/tlpkg /home/art/miniforge3/envs/step5/share/texmf-dist/scripts/texlive /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /home/art/miniforge3/envs/step5/bin/mktexfmt line 23.

! BEGIN failed--compilation aborted at /home/art/miniforge3/envs/step5/bin/mktexfmt line 25.

Error: LaTeX failed to compile cmd_report.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See cmd_report.log for more info.
Execution halted

(step5) foo$ conda env export --from-history
name: step5
channels:
  - conda-forge
dependencies:
  - r-stringr=1.4.0
  - r-rmarkdown=2.11
  - r-data.table=1.14.2
  - r-sass=0.4.0
  - r-optparse=1.7.1
  - openblas=0.3.3
  - bioconductor-preprocesscore=1.56.0
  - r-ggplot2=3.3.5
  - texlive-core
prefix: /home/art/miniforge3/envs/step5


Environment (conda list):

``` # packages in environment at /home/art/miniforge3/envs/step5: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_llvm conda-forge _r-mutex 1.0.1 anacondar_1 conda-forge binutils_impl_linux-64 2.36.1 h193b22a_2 conda-forge binutils_linux-64 2.36 hf3e587d_2 conda-forge bioconductor-preprocesscore 1.56.0 r41hd029910_0 bioconda bwidget 1.9.14 ha770c72_1 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.18.1 h7f98852_0 conda-forge ca-certificates 2021.10.8 ha878542_0 conda-forge cairo 1.16.0 ha00ac49_1009 conda-forge curl 7.80.0 h494985f_1 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.13.1 hba837de_1005 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freetype 2.10.4 h0708190_1 conda-forge fribidi 1.0.10 h36c2ea0_0 conda-forge gcc_impl_linux-64 9.4.0 h03d3576_11 conda-forge gcc_linux-64 9.4.0 h391b98a_2 conda-forge gettext 0.19.8.1 h73d1719_1008 conda-forge gfortran_impl_linux-64 9.4.0 h0003116_11 conda-forge gfortran_linux-64 9.4.0 hf0ab688_2 conda-forge gmp 6.2.1 h58526e2_0 conda-forge graphite2 1.3.13 h58526e2_1001 conda-forge gsl 2.7 he838d99_0 conda-forge gxx_impl_linux-64 9.4.0 h03d3576_11 conda-forge gxx_linux-64 9.4.0 h0316aca_2 conda-forge harfbuzz 3.1.2 hb4a5f5f_0 conda-forge icu 69.1 h9c3ff4c_0 conda-forge jbig 2.1 h7f98852_2003 conda-forge jpeg 9d h36c2ea0_0 conda-forge kernel-headers_linux-64 2.6.32 he073ed8_15 conda-forge krb5 1.19.2 h48eae69_3 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge lerc 3.0 h9c3ff4c_0 conda-forge libblas 3.9.0 12_linux64_mkl conda-forge libcblas 3.9.0 12_linux64_mkl conda-forge libcurl 7.80.0 h494985f_1 conda-forge libdeflate 1.8 h7f98852_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-devel_linux-64 9.4.0 hd854feb_11 conda-forge libgcc-ng 11.2.0 h1d223b6_11 conda-forge libgfortran 3.0.0 1 conda-forge libgfortran-ng 11.2.0 h69a702a_11 conda-forge libgfortran5 11.2.0 h5c6108e_11 conda-forge libglib 2.70.2 h174f98d_0 conda-forge libgomp 11.2.0 h1d223b6_11 conda-forge libiconv 1.16 h516909a_0 conda-forge liblapack 3.9.0 12_linux64_mkl conda-forge libnghttp2 1.43.0 ha19adfc_1 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libsanitizer 9.4.0 h79bfe98_11 conda-forge libssh2 1.10.0 ha35d2d1_2 conda-forge libstdcxx-devel_linux-64 9.4.0 hd854feb_11 conda-forge libstdcxx-ng 11.2.0 he4da1e4_11 conda-forge libtiff 4.3.0 h6f004c6_2 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libwebp-base 1.2.1 h7f98852_0 conda-forge libxcb 1.13 h7f98852_1004 conda-forge libxml2 2.9.12 h885dcf4_1 conda-forge libzlib 1.2.11 h36c2ea0_1013 conda-forge llvm-openmp 12.0.1 h4bd325d_1 conda-forge lz4-c 1.9.3 h9c3ff4c_1 conda-forge make 4.3 hd18ef5c_1 conda-forge mkl 2021.4.0 h8d4b97c_729 conda-forge mpfr 4.1.0 h9202a9a_1 conda-forge ncurses 6.2 h58526e2_4 conda-forge openblas 0.3.3 ha44fe06_1 conda-forge openssl 3.0.0 h7f98852_2 conda-forge pandoc 2.16.2 h7f98852_0 conda-forge pango 1.48.10 h54213e6_2 conda-forge pcre 8.45 h9c3ff4c_0 conda-forge pcre2 10.37 h032f7d1_0 conda-forge pixman 0.40.0 h36c2ea0_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge r-assertthat 0.2.1 r41hc72bb7e_2 conda-forge r-backports 1.4.0 r41hcfec24a_0 conda-forge r-base 4.1.1 hde4fec0_2 conda-forge r-base64enc 0.1_3 r41hcfec24a_1004 conda-forge r-brio 1.1.3 r41hcfec24a_0 conda-forge r-callr 3.7.0 r41hc72bb7e_0 conda-forge r-cli 3.1.0 r41h03ef668_0 conda-forge r-colorspace 2.0_2 r41hcfec24a_0 conda-forge r-crayon 1.4.2 r41hc72bb7e_0 conda-forge r-data.table 1.14.2 r41hcfec24a_0 conda-forge r-desc 1.4.0 r41hc72bb7e_0 conda-forge r-diffobj 0.3.5 r41hcfec24a_0 conda-forge r-digest 0.6.29 r41h03ef668_0 conda-forge r-ellipsis 0.3.2 r41hcfec24a_0 conda-forge r-evaluate 0.14 r41hc72bb7e_2 conda-forge r-fansi 0.4.2 r41hcfec24a_0 conda-forge r-farver 2.1.0 r41h03ef668_0 conda-forge r-fastmap 1.1.0 r41h03ef668_0 conda-forge r-fs 1.5.2 r41h03ef668_0 conda-forge r-getopt 1.20.3 r41ha770c72_2 conda-forge r-ggplot2 3.3.5 r41hc72bb7e_0 conda-forge r-glue 1.5.1 r41hcfec24a_0 conda-forge r-gtable 0.3.0 r41hc72bb7e_3 conda-forge r-highr 0.9 r41hc72bb7e_0 conda-forge r-htmltools 0.5.2 r41h03ef668_0 conda-forge r-isoband 0.2.5 r41h03ef668_0 conda-forge r-jquerylib 0.1.4 r41hc72bb7e_0 conda-forge r-jsonlite 1.7.2 r41hcfec24a_0 conda-forge r-knitr 1.35 r41hc72bb7e_0 conda-forge r-labeling 0.4.2 r41hc72bb7e_0 conda-forge r-lattice 0.20_45 r41hcfec24a_0 conda-forge r-lifecycle 1.0.1 r41hc72bb7e_0 conda-forge r-magrittr 2.0.1 r41hcfec24a_1 conda-forge r-markdown 1.1 r41hcfec24a_1 conda-forge r-mass 7.3_54 r41hcfec24a_0 conda-forge r-matrix 1.4_0 r41he454529_0 conda-forge r-mgcv 1.8_38 r41he454529_0 conda-forge r-mime 0.12 r41hcfec24a_0 conda-forge r-munsell 0.5.0 r41hc72bb7e_1003 conda-forge r-nlme 3.1_153 r41h859d828_0 conda-forge r-optparse 1.7.1 r41hc72bb7e_0 conda-forge r-pillar 1.6.4 r41hc72bb7e_0 conda-forge r-pkgconfig 2.0.3 r41hc72bb7e_1 conda-forge r-pkgload 1.2.4 r41h03ef668_0 conda-forge r-praise 1.0.0 r41hc72bb7e_1004 conda-forge r-processx 3.5.2 r41hcfec24a_0 conda-forge r-ps 1.6.0 r41hcfec24a_0 conda-forge r-r6 2.5.1 r41hc72bb7e_0 conda-forge r-rappdirs 0.3.3 r41hcfec24a_0 conda-forge r-rcolorbrewer 1.1_2 r41h785f33e_1003 conda-forge r-rcpp 1.0.7 r41h03ef668_0 conda-forge r-rematch2 2.1.2 r41hc72bb7e_1 conda-forge r-rlang 0.4.12 r41hcfec24a_0 conda-forge r-rmarkdown 2.11 r41hc72bb7e_0 conda-forge r-rprojroot 2.0.2 r41hc72bb7e_0 conda-forge r-rstudioapi 0.13 r41hc72bb7e_0 conda-forge r-sass 0.4.0 r41h03ef668_0 conda-forge r-scales 1.1.1 r41hc72bb7e_0 conda-forge r-stringi 1.7.6 r41h337692f_1 conda-forge r-stringr 1.4.0 r41hc72bb7e_2 conda-forge r-testthat 3.1.1 r41h03ef668_0 conda-forge r-tibble 3.1.6 r41hcfec24a_0 conda-forge r-tinytex 0.35 r41hc72bb7e_0 conda-forge r-utf8 1.2.2 r41hcfec24a_0 conda-forge r-vctrs 0.3.8 r41hcfec24a_1 conda-forge r-viridislite 0.4.0 r41hc72bb7e_0 conda-forge r-waldo 0.3.1 r41hc72bb7e_0 conda-forge r-withr 2.4.3 r41hc72bb7e_0 conda-forge r-xfun 0.28 r41h03ef668_0 conda-forge r-yaml 2.2.1 r41hcfec24a_1 conda-forge readline 8.1 h46c0cb4_0 conda-forge sed 4.8 he412f7d_0 conda-forge sysroot_linux-64 2.12 he073ed8_15 conda-forge tbb 2021.4.0 h4bd325d_1 conda-forge texlive-core 20210325 h97429d4_0 conda-forge tk 8.6.11 h27826a3_1 conda-forge tktable 2.10 hb7b940f_3 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.0.10 h7f98852_0 conda-forge xorg-libsm 1.2.3 hd9c2040_1000 conda-forge xorg-libx11 1.7.2 h7f98852_0 conda-forge xorg-libxau 1.0.9 h7f98852_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h7f98852_1 conda-forge xorg-libxrender 0.9.10 h7f98852_1003 conda-forge xorg-libxt 1.2.1 h7f98852_2 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h7f98852_1002 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.5 h516909a_1 conda-forge zlib 1.2.11 h36c2ea0_1013 conda-forge zstd 1.5.0 ha95c52a_0 conda-forge ```


Details about conda and system ( conda info ):

``` active environment : step5 active env location : /home/art/miniforge3/envs/step5 shell level : 2 user config file : /home/art/.condarc populated config files : /home/art/miniforge3/.condarc /home/art/.condarc conda version : 4.10.3 conda-build version : not installed python version : 3.9.6.final.0 virtual packages : __linux=5.10.16.3=0 __glibc=2.31=0 __unix=0=0 __archspec=1=x86_64 base environment : /home/art/miniforge3 (writable) conda av data dir : /home/art/miniforge3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch package cache : /home/art/miniforge3/pkgs /home/art/.conda/pkgs envs directories : /home/art/miniforge3/envs /home/art/.conda/envs platform : linux-64 user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.6 Linux/5.10.16.3-microsoft-standard-WSL2 ubuntu/20.04.3 glibc/2.31 UID:GID : 1000:1000 netrc file : None offline mode : False ```
ngam commented 2 years ago

Thanks for reopening. I will start looking into this soon. I believe we have a lot of issues that we ought to address in this feedstock, including missing perl files and stuff :(

i may also be tempted to build a fuller version of latex to deal with this...

eschen42 commented 2 years ago

@ngam Thank you for your help! Perhaps this is a duplicate of issue 19 except that I do not get the final line reported there:

I can't find the format file `latex.fmt'!

If it is a duplicate, then I am fine with it being closed.

For the moment I can work around this by knitting to HTML rather than PDF. Not ideal, but sufficient for the interim.

eschen42 commented 2 years ago

My workaround for this was not to use texlive-core but rather use conda-forge/r-tinytex, which requires running:

library(tinytex)
tinytex::install_tinytex()

before calling rmarkdown::render.

That isn't exactly a "fix", but it got me un-blocked vis à vis creating a PDF.

Adamtaranto commented 1 year ago

Hi @ngam, any chance this bug will get a fix soon?

ngam commented 1 year ago

@Adamtaranto unfortunately, no. I tried pretty hard to fix this and I couldn't 😢

I saw your comments in the other issue. What's your use case? It seems the bioconda maintainers removed jcvi's dependency on this https://github.com/bioconda/bioconda-recipes/blob/f36f2790baaa4d895b59b000227c4954b6f1b82b/recipes/jcvi/meta.yaml#LL48-L50C20.

Adamtaranto commented 1 year ago

@ngam - I'm using the jcvi.graphics.synteny module to plot some figures, the issue seems to be that matplotlib insists on calling latex at some point and this can't be turned off. Many people seem to be running into this problem in #19

I've figured out that at least some of the missing scripts that are causing the issue are present in MacTex / other versions of Tex-Live but not the conda version. "TeXLive/TLUtils.pm" is here in tlpkg and mktexlsr.pl is in MacTex at /usr/local/texlive/2022/texmf-dist/scripts/texlive/mktexlsr.pl

Can you please include the missing files in the conda recipe for texlive-core?