From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jelle Licht Subject: bug#40558: Modular TexLive "Insufficient extension fonts" and duplicate fonts Date: Sat, 11 Apr 2020 18:15:08 +0200 Message-ID: <874ktqxalv.fsf@jlicht.xyz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49820) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNInb-00007S-Sr for bug-guix@gnu.org; Sat, 11 Apr 2020 12:16:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNIna-0005dR-JA for bug-guix@gnu.org; Sat, 11 Apr 2020 12:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45472) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNIna-0005dN-Fp for bug-guix@gnu.org; Sat, 11 Apr 2020 12:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNIna-0006DD-Ab for bug-guix@gnu.org; Sat, 11 Apr 2020 12:16:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:49735) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNImo-0008P7-OF for bug-guix@gnu.org; Sat, 11 Apr 2020 12:15:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNImn-0005PY-C2 for bug-guix@gnu.org; Sat, 11 Apr 2020 12:15:14 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:43048) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jNImn-0005LQ-0W for bug-guix@gnu.org; Sat, 11 Apr 2020 12:15:13 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 40558@debbugs.gnu.org --=-=-= Content-Type: text/plain I think I found a bug in our amsfonts texlive package. I will describe my journey in finding this bug, as I still do not have clear picture on the why/when/what is going on. I think I also saw several other people running into this issue the last few months, so either way I am happy to have found something reproducible that at least demonstrates that I am sane :). The eror message is: " ! Math formula deleted: Insufficient extension fonts." If you, like me, want to use Emacs' org-mode capabilities and export to pdf using latex, by default you will generate an intermediate .tex file that uses the ulem package. Using this package leads to the aforementioned error message. (Skip everything after this if you do not care about my descent into madness) I used a profile containing the following (relevant) texlive packages: --8<---------------cut here---------------start------------->8--- texlive-base texlive-latex-preview texlive-latex-base texlive-latexconfig texlive-fonts-ec texlive-latex-oberdiek texlive-latex-wrapfig texlive-generic-ulem texlive-latex-capt-of texlive-latex-hyperref texlive-amsfonts texlive-fontinst texlive-metafont-base texlive-unicode-data texlive-pstool texlive-cm texlive-cm-super texlive-latex-amscls texlive-fonts-latex texlive-latex-amsmath --8<---------------cut here---------------end--------------->8--- I ran both `strace pdflatex working 2> working-strace.log' and `strace pdflatex broken 2> broken-strace.log' See the attached `working.tex' and `broken.tex' for tiny examples that demonstrate this. The relevant part of the diff between straces: * Working: --8<---------------cut here---------------start------------->8--- access("/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.tfm", R_OK) = 0 stat("/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.tfm", {st_mode=S_IFREG|0444, st_size=940, ...}) = 0 openat(AT_FDCWD, "/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.tfm", O_RDONLY) = 6 fstat(6, {st_mode=S_IFREG|0444, st_size=940, ...}) = 0 read(6, "\0\353\0\2\0\0\0\177\0#\0\6\0\16\0\3\0\0\0\0\0\34\0\r\27#\260\255\0p\0\0"..., 4096) = 940 close(6) = 0 openat(AT_FDCWD, "working.pdf", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 6 write(1, " [1", 3) = 3 --8<---------------cut here---------------end--------------->8--- * Broken: --8<---------------cut here---------------start------------->8--- access("/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/euler/cmex7.tfm", R_OK) = 0 stat("/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/euler/cmex7.tfm", {st_mode=S_IFREG|0444, st_size=1312, ...}) = 0 openat(AT_FDCWD, "/home/jlicht/.guix-profile/share/texmf-dist/fonts/tfm/public/amsfonts/euler/cmex7.tfm", O_RDONLY) = 6 fstat(6, {st_mode=S_IFREG|0444, st_size=1312, ...}) = 0 read(6, "\1H\0\21\0\0\0\332\0*\0\20\0\20\0\6\0\0\0\0\0\0\0\6d\235jM\0\240\0\0"..., 4096) = 1312 close(6) = 0 write(1, "\n", 1) = 1 write(1, "! Math formula deleted: Insuffic"..., 54) = 54 --8<---------------cut here---------------end--------------->8--- We see that a different file is used when resolving the same font! Furthermore, one of these fonts is a totally different size than the other. If we run: `guix build --check texlive-amsfonts | grep cmex7', we see: --8<---------------cut here---------------start------------->8--- Font metrics written on /tmp/guix-build-texlive-amsfonts-49435.drv-0/source/build-fonts/cmex7.tfm. Output written on /tmp/guix-build-texlive-amsfonts-49435.drv-0/source/build-fonts/cmex7.600gf (128 characters, 30684 bytes). Transcript written on /tmp/guix-build-texlive-amsfonts-49435.drv-0/source/build-fonts/cmex7.log. converting afm font cmex7 cmex7 CMEX7 `build-fonts/cmex7.600gf' -> `/gnu/store/hrxlw7s1d8q0z5kipizjr7ib49bw4hjp-texlive-amsfonts-49435/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.600gf' `build-fonts/cmex7.tfm' -> `/gnu/store/hrxlw7s1d8q0z5kipizjr7ib49bw4hjp-texlive-amsfonts-49435/share/texmf-dist/fonts/tfm/public/amsfonts/cmex7.tfm' `build-fonts/euler/cmex7.tfm' -> `/gnu/store/hrxlw7s1d8q0z5kipizjr7ib49bw4hjp-texlive-amsfonts-49435/share/texmf-dist/fonts/tfm/public/amsfonts/euler/cmex7.tfm' --8<---------------cut here---------------end--------------->8--- AFAIK, and from looking at the full (and correctly working) texlive-texmf build, the cmex7.tfm in `euler' is not correctly build. My best guess is that this happens because cmex has both a mf file and a afm file in `guix build --source texlive-amsfonts'. The one 'built' using afm2tfm seems to be broken and/or not matching other metadata generated, as given by this example. Thanks for reading along, I hope we will find a solution to this, as non-modular texlive is simply the worst :). --=-=-= Content-Type: application/x-tex Content-Disposition: attachment; filename=working.tex Content-Transfer-Encoding: base64 XGRvY3VtZW50Y2xhc3NbMTFwdF17YXJ0aWNsZX0KXHVzZXBhY2thZ2V7YW1zbWF0aH0KXGJlZ2lu e2RvY3VtZW50fQpIZWxsbyEgXCh5ID0geF4yXCkKXGVuZHtkb2N1bWVudH0K --=-=-= Content-Type: application/x-tex Content-Disposition: attachment; filename=broken.tex Content-Transfer-Encoding: base64 XGRvY3VtZW50Y2xhc3NbMTFwdF17YXJ0aWNsZX0KXHVzZXBhY2thZ2V7YW1zbWF0aH0KXHVzZXBh Y2thZ2V7dWxlbX0KXGJlZ2lue2RvY3VtZW50fQpIZWxsbyEgXCh5ID0geF4yXCkKXGVuZHtkb2N1 bWVudH0K --=-=-= Content-Type: text/plain - Jelle --=-=-=--