In Prefix $ kpsewhich -var-value=TEXMFROOT returns an empty string. It should return EPREFIX/usr/share In EPREFIX/etc/texmf/texmf.d/05searchpaths.cnf we have TEXMFROOT = $SELFAUTODIR/share Now SELFAUTODIR is defined $ kpsewhich -var-value=SELFAUTODIR /storage/strogdon/gentoo-rap/usr My texlive install: app-text/texlive-2019-r1 app-text/texlive-core-2019-r10 dev-texlive/texlive-basic-2019-r1 dev-texlive/texlive-bibtexextra-2019 dev-texlive/texlive-fontsextra-2019 dev-texlive/texlive-fontsrecommended-2019 dev-texlive/texlive-fontutils-2019 dev-texlive/texlive-formatsextra-2019 dev-texlive/texlive-langenglish-2019 dev-texlive/texlive-langgerman-2019 dev-texlive/texlive-latex-2019 dev-texlive/texlive-latexextra-2019-r2 dev-texlive/texlive-latexrecommended-2019-r2 dev-texlive/texlive-luatex-2019 dev-texlive/texlive-mathscience-2019 dev-texlive/texlive-pictures-2019 dev-texlive/texlive-plaingeneric-2019 dev-texlive/texlive-pstricks-2019 dev-texlive/texlive-xetex-2019 This affects the building of certain pdf docs as in kpathsea: Running mktexfmt pdflatex.fmt /storage/strogdon/gentoo-rap/usr/bin/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early. BEGIN failed--compilation aborted at /storage/strogdon/gentoo-rap/usr/bin/mktexfmt line 25. I can't find the format file `pdflatex.fmt'! Latexmk: fls file doesn't appear to have been made. Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 1
The problem is that in both of the above kpathsea ebuilds the created symlinks kpathsea-6.3.1_p20190410.ebuild: dosym /etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf dosym /etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf and kpathsea-6.3.2_p20200406.ebuild dosym /../../../../etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf dosym /../../../../etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf do not point to locations in the Prefix. The former creates symlinks to locations on the host and I believe the latter does the same. This results in a broken kpathsea install. The following works here (in Prefix): dosym ${EPREFIX}/etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf dosym ${EPREFIX}/etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf
I am guessing the following would work if you want to keep things relative dosym /../../../../etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH#${EPREFIX}}/web2c/fmtutil.cnf dosym /../../../../etc/texmf/web2c/texmf.cnf ${TEXMF_PATH#${EPREFIX}}/web2c/texmf.cnf
dev-libs/kpathsea-6.3.1_p20190410 is no longer in the portage tree and something has changed relative to dev-libs/kpathsea-6.3.2_p20200406. First, TEXMFROOT is now set?? $ kpsewhich -var-value=TEXMFROOT /storage/strogdon/gentoo-rap/usr/share Second, the dosym statements (I believe these may have changed - possibly a silent bump?) dosym ../../../../etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf dosym ../../../../etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf now install symlinks correctly. However, thirdly the installed symlinks ${EPREFIX}/usr/share/texmf-dist/web2c/updmap-hdr.cfg ${EPREFIX}/usr/share/texmf-dist/web2c/fmtutil-hdr.cfg are incorrect $ ls -al ~/usr/share/texmf-dist/web2c/updmap-hdr.cfg lrwxrwxrwx 1 terry terry 33 Dec 5 16:38 /storage/strogdon/gentoo-rap/usr/share/texmf-dist/web2c/updmap-hdr.cfg -> /etc/texmf/web2c.d/updmap-hdr.cfg $ ls -al ~/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf lrwxrwxrwx 1 terry terry 34 Dec 5 16:38 /storage/strogdon/gentoo-rap/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf -> /etc/texmf/web2c.d/fmtutil-hdr.cnf They do not point to locations in the Prefix. Perhaps this bug should be closed and a new one opened?
Actually, the incorrect symlinks $ ls -al ~/usr/share/texmf-dist/web2c/updmap-hdr.cfg lrwxrwxrwx 1 terry terry 33 Dec 5 16:38 /storage/strogdon/gentoo-rap/usr/share/texmf-dist/web2c/updmap-hdr.cfg -> /etc/texmf/web2c.d/updmap-hdr.cfg $ ls -al ~/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf lrwxrwxrwx 1 terry terry 34 Dec 5 16:38 /storage/strogdon/gentoo-rap/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf -> /etc/texmf/web2c.d/fmtutil-hdr.cnf are installed by app-text/texlive-core-2020-r12 not by dev-libs/kpathsea-6.3.2_p20200406. So this bug should be closed and a new one opened. See bug https://bugs.gentoo.org/show_bug.cgi?id=752189 for a related symlink problem.
ok, so I hope I'm not reading this wrong, but it seems the current version in the tree fixes the original issue, so now we continue on bug 752189