Hi, Kile was working fine just before the latest upgrade related to the latest release 2020.01.
Probably it went wrong with the last KDE Applications upgrade. (Even after a vanilla installation)

Every time I try to compile a document Kile says in the Messages tab:
Cannot open log file; did you run LaTeX?
In the Output tab it says:
I can't find the format filepdflatex.fmt'!`

I run the Kile's System check tool and the output is:

LaTeX(Critical failure, Kile will not function properly)
: Found (latex=>/usr/bin/latex)
simple test: This essential tool does not work; please check your installation.

same for "Tex". For PDFLaTeX and PDFTex, the result is (Failed but not critical).

LaTeX is one of the primary tools for my job. I would like to know how to repair this.

Thanks in advance.

Rebuild coming up, seems that was needed for the texlive packages updates (if you have the 3 previous texlive--core, bin,latexextra-- in your /var/cache/pacman/pkg, then you can downgrade those 3 from there, until rebuild kile fixes the issue.

EDIT:
Please test rebuild kile:

sudo pacman -U http://kaosx.tk/repo/build/kile-2.9.93-2-x86_64.pkg.tar.zst

If that doesn't fix then there is an issue with new texlive-core/texlive-bin.

    demm
    The rebuild you metion did not work. Same issue.
    I will figure out how to do the downgrade.
    Hope the new rebuild comes soon.

    I will need help debugging this, since I'm not a latex/texlive user.
    If the issue is with /usr/bin/latex, then it is texlive-bin. See if this works (meaning that version is in your cache):

    sudo pacman -U /var/cache/pacman/pkg/texlive-bin-2018.47465-10-x86_64.pkg.tar.xz

      demm
      Sorry demm, I said I have a vanilla installation of KaOS 2020.01, so no way I can find the 2018's packages in my cache.
      I will try to look in an old machine with KaOS (not with me at the moment). Perhaps are still there.
      Any other way to get them? Or should I better wait until the new build.
      Sorry not being so helpful in the debugging.

      I've uploaded the file:

      sudo pacman -U https://sourceforge.net/projects/kaosx/files/packages/texlive-bin-2018.47465-10-x86_64.pkg.tar.xz

      Hi demm, It did not work.
      I tried your new package update as well and no luck.
      I was reading forums of other distros (with old issues also pointing to the "cannot open log file" thing in kile), some are misleading, but some say, that as the output is:
      I can't find the format file pdflatex.fmt!
      Means that some files or their symlinks are missing or misplaced. Probably after the last upgrade.
      They suggest create new symlinks for the .fmt packages and place them where Kile can see them. Though no idea in KaOS where these are located and/or how to do this.
      I will try to keep looking at this.

      Hope we can find a fix soon.

      As you say demm, It seems that the problem is directly in texlive not in kile.
      In my last attempt, I uninstall everything and tried to compile a LaTeX file (pdflatex) directly in terminal with a fresh texlive installation (without Kile).

      $ pdflatex file.tex 
      
      This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/KaOS) (preloaded format=pdflatex)
       restricted \write18 enabled.
      
      kpathsea: Running mktexfmt pdflatex.fmt
      mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
      mktexfmt:   /etc/texmf/web2c/fmtutil.cnf
      mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
      mktexfmt:   /home/username/.texlive/texmf-config/web2c/fmtutil.cnf
      mktexfmt [INFO]: writing formats under /home/username/.texlive/texmf-var/web2c
      mktexfmt [INFO]: did not find entry for byfmt=pdflatex, skipped
      mktexfmt [INFO]: Total formats: 0
      mktexfmt [INFO]: exiting with status 0
      I can't find the format file `pdflatex.fmt'!

      Same happens if i try to compile the file.tex to DVI using latex instead of PDFLatex.
      Please see my previous post, it seems that the paths for texlive to find the latex format files are misleading.

      demm
      Well, the scripts run without issues, but No, they did not work to fix the problem.

      5 days later

      Do you have ffcall installed, if not, can you try if adding it helps? It is a makedepends now, but seems should be made a depend.

      I installed it and reinstalled tex-live (bin, core, latexextras) and kile, and still the same issue

      16 days later

      This morning I've freshly re-installed Kaos, including all tex and latex packages from the main app list.
      When compiling a test.tex doc, there were problems with latex and pdflatex (wrong /etc/texmf/web2c/fmtutil.cnf file or missing config file?).

      `$ pdflatex test.tex
      This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/KaOS) (preloaded format=pdflatex)
      restricted \write18 enabled.

      kpathsea: Running mktexfmt pdflatex.fmt
      mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
      mktexfmt: /etc/texmf/web2c/fmtutil.cnf
      mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
      mktexfmt: /home/tom/.texlive/texmf-config/web2c/fmtutil.cnf
      mktexfmt [INFO]: writing formats under /home/tom/.texlive/texmf-var/web2c
      mktexfmt [INFO]: did not find entry for byfmt=pdflatex, skipped
      mktexfmt [INFO]: Total formats: 0
      mktexfmt [INFO]: exiting with status 0
      I can't find the format file pdflatex.fmt'!
      `latex test.tex
      This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/KaOS) (preloaded format=latex)
      restricted \write18 enabled.

      kpathsea: Running mktexfmt latex.fmt
      mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
      mktexfmt: /etc/texmf/web2c/fmtutil.cnf
      mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
      mktexfmt: /home/tom/.texlive/texmf-config/web2c/fmtutil.cnf
      mktexfmt [INFO]: writing formats under /home/tom/.texlive/texmf-var/web2c
      mktexfmt [INFO]: did not find entry for byfmt=latex, skipped
      mktexfmt [INFO]: Total formats: 0
      mktexfmt [INFO]: exiting with status 0
      I can't find the format file latex.fmt'!

      • demm replied to this.
        Merged 1 post from latex/pdftex unable to make .fmt files.

        thomaslemmens merged it with existing texlive thread, so far no known fix for this bug.
        All I can do is upload all texlive packages from 2018, see if it is an issue with the 2019 versions only.

        sudo pacman -U https://sourceforge.net/projects/kaosx/files/packages/texlive-bin-2018.47465-10-x86_64.pkg.tar.xz https://sourceforge.net/projects/kaosx/files/packages/texlive-core-2018.47471-2-x86_64.pkg.tar.xz

        man fmutil says:

        Otherwise, fmtutil
        reads all the fmtutil.cnf files found by running `kpsewhich -all fmtutil.cnf', in the order returned by kpsewhich.<

        So, in the shell:

        kpsewhich -all fmtutil.cnf
        /etc/texmf/web2c/fmtutil.cnf
        ``
        The returned config file has only outcommented lines.

        Hope this helps in solving the issue.

        Please try only texlive-core first, looks like the issue should be there.

        After downgrading to the 2018 version pdflatex compiled as expected without errors.

        In the terminal:

        kpsewhich -all fmtutil.cnf
        /etc/texmf/web2c/fmtutil.cnf
        /usr/share/texmf-dist/web2c/fmtutil.cnf

        The first returned config file looked identical as in the 2019-version (only outcommented lines).
        The second is missing in the 2019-version and is the actual config file fmtutil needs in making texformats

        • demm replied to this.