part-cw / lambdanative

LambdaNative is a cross-platform development environment written in Scheme, supporting Android, iOS, BlackBerry 10, OS X, Linux, Windows, OpenBSD, NetBSD, FreeBSD and OpenWrt.
http://www.lambdanative.org
Other
1.4k stars 86 forks source link

xelatex tmp.tex does not generate tmp.pdf #458

Closed zwieblum closed 2 months ago

zwieblum commented 2 months ago

make.sh line 661: the cll to xelatex does not create a pdf file any more --> lambdanative compilation breaks.

$ xelatex -v
XeTeX 3.141592653-2.6-0.999996 (TeX Live 2025/dev/Debian)
kpathsea version 6.4.0/dev
Copyright 2024 SIL International, Jonathan Kew and Khaled Hosny.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 72.1; using 72.1
Compiled with zlib version 1.3.1; using 1.3.1
Compiled with FreeType2 version 2.13.2; using 2.13.2
Compiled with Graphite2 version 1.3.14; using 1.3.14
Compiled with HarfBuzz version 8.3.0; using 9.0.0
Compiled with libpng version 1.6.43; using 1.6.43
Compiled with pplib version v2.2
Compiled with fontconfig version 2.15.0; using 2.15.0
mgorges commented 2 months ago

This sounds like a missing dependency/package in your XeTeX installation rather than a problem in LambdaNative. I did a fresh install of LambdaNative just two weeks ago on MacOS (14.6.1) on a new Macbook Air, and everything worked fine once I had the right dependencies installed (I used BasicTeX and then adding a few things rather than pulling in the full MacTex as it is ginormous). What is the verbose output of the xelatex tmp.tex call you get?

zwieblum commented 2 months ago

I have installed texlive-full, so everything tex is installed. make.sh creates this file tmp.tex:

\batchmode
\documentclass{article}
\makeatletter 
\renewcommand{\Large}{\@setfontsize\Large{14}{14}} 
\makeatother 
\usepackage{fontspec}
\usepackage{xunicode}
%\fontspec [ Path = /home/nik/.lambdanative/tmp.ZSkd2n/ ]{cmss17}
\setmainfont[]{[cmss17.ttf]}
\usepackage[margin=0.1in, paperwidth=40in, paperheight=2in]{geometry}
\begin{document}
\thispagestyle{empty}
\noindent \Large
COPY
\end{document}

Calling xelatex tmp.tex creates this output and returns errorcode 1:

This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2025/dev/Debian) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./tmp.tex
LaTeX2e <2024-06-01> patch level 2
L3 programming layer <2024-08-16>

xelatex log file has this content (tmp.log):

This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2025/dev/Debian) (preloaded format=xelatex 2024.9.1)  1 SEP 2024 13:41
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**tmp.tex
(./tmp.tex
LaTeX2e <2024-06-01> patch level 2
L3 programming layer <2024-08-16>

(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2024/02/08 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2024/02/08 v1.4n Standard LaTeX file (size option)
)
\c@part=\count190
\c@section=\count191
\c@subsection=\count192
\c@subsubsection=\count193
\c@paragraph=\count194
\c@subparagraph=\count195
\c@figure=\count196
\c@table=\count197
\abovecaptionskip=\skip49
\belowcaptionskip=\skip50
\bibindent=\dimen141
) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/share/te
xlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/share/texlive/tex
mf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2024-08-16 L3 programming layer (loader) 
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
File: l3backend-xetex.def 2024-05-08 L3 backend support: XeTeX
\g__graphics_track_int=\count198
\l__pdf_internal_box=\box52
\g__pdf_backend_annotation_int=\count199
\g__pdf_backend_link_int=\count266
))
Package: xparse 2024-08-16 L3 Experimental document command parser
)
Package: fontspec 2024/05/11 v2.9e Font selection for XeLaTeX and LuaLaTeX
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
Package: fontspec-xetex 2024/05/11 v2.9e Font selection for XeLaTeX and LuaLaTe
X
\l__fontspec_script_int=\count267
\l__fontspec_language_int=\count268
\l__fontspec_strnum_int=\count269
\l__fontspec_tmp_int=\count270
\l__fontspec_tmpa_int=\count271
\l__fontspec_tmpb_int=\count272
\l__fontspec_tmpc_int=\count273
\l__fontspec_em_int=\count274
\l__fontspec_emdef_int=\count275
\l__fontspec_strong_int=\count276
\l__fontspec_strongdef_int=\count277
\l__fontspec_tmpa_dim=\dimen142
\l__fontspec_tmpb_dim=\dimen143
\l__fontspec_tmpc_dim=\dimen144
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (/usr/share
/texlive/texmf-dist/tex/xelatex/xunicode/xunicode.sty
File: xunicode.sty 2011/09/09 v0.981 provides access to latin accents and many 
other characters in Unicode lower plane
(/usr/share/texmf/tex/latex/tipa/t3enc.def
File: t3enc.def 2001/12/31 T3 encoding
)
\tipaTiiicode=\count278
\tipasavetokens=\toks17
\tipachecktokens=\toks18
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks19
) (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2024/05/23 v1.4g Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2023/12/02 v1.11 sin cos tan (DPC)
) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 106.
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/xetex.def
File: xetex.def 2022/09/22 v5.0n Graphics/color driver for xetex
))
\Gin@req@height=\dimen145
\Gin@req@width=\dimen146
))

! Package fontspec Error: 
(fontspec)                The font "[cmss17]" cannot be found; this may be
(fontspec)                but usually is not a fontspec bug. Either there is
(fontspec)                a typo in the font name/file, the font is not
(fontspec)                installed (correctly), or there is a bug in the
(fontspec)                underlying font loading engine (XeTeX/luaotfload).

For immediate help type H <return>.
 ...                                              

l.10 \usepackage
                [margin=0.1in, paperwidth=40in, paperheight=2in]{geometry}

A font might not be found for many reasons.
 Check the spelling, where the font is installed etc. etc.

 When in doubt, ask someone for help!

! Package fontspec Error: 
(fontspec)                The font "[cmss17]" cannot be found; this may be
(fontspec)                but usually is not a fontspec bug. Either there is
(fontspec)                a typo in the font name/file, the font is not
(fontspec)                installed (correctly), or there is a bug in the
(fontspec)                underlying font loading engine (XeTeX/luaotfload).

For immediate help type H <return>.
 ...                                              

l.10 \usepackage
                [margin=0.1in, paperwidth=40in, paperheight=2in]{geometry}

A font might not be found for many reasons.
 Check the spelling, where the font is installed etc. etc.

 When in doubt, ask someone for help!

! Package fontspec Error: 
(fontspec)                The font "[cmss17]" cannot be found; this may be
(fontspec)                but usually is not a fontspec bug. Either there is
(fontspec)                a typo in the font name/file, the font is not
(fontspec)                installed (correctly), or there is a bug in the
(fontspec)                underlying font loading engine (XeTeX/luaotfload).

For immediate help type H <return>.
 ...                                              

l.10 \usepackage
                [margin=0.1in, paperwidth=40in, paperheight=2in]{geometry}

A font might not be found for many reasons.
 Check the spelling, where the font is installed etc. etc.

 When in doubt, ask someone for help!

Package fontspec Info: 
(fontspec)             Font family '[cmss17.ttf](0)' created for font
(fontspec)             '[cmss17.ttf]' with options [Ligatures=TeX].
(fontspec)              
(fontspec)              This font family consists of the following NFSS
(fontspec)             series/shapes:
(fontspec)              
(fontspec)             - 'normal' (m/n) with NFSS spec.: <->"[[cmss17].ttf]"
(fontspec)             - 'small caps'  (m/sc) with NFSS spec.:
(fontspec)             <->"[[cmss17].ttf]"

! Font TU/[cmss17.ttf](0)/m/n/10=[[cmss17].ttf] at 10.0pt not loadable: Metric 
(TFM) file or installed font not found.
<to be read again> 
                   relax 
l.10 \usepackage
                [margin=0.1in, paperwidth=40in, paperheight=2in]{geometry}
I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2020/01/02 v5.9 Page Geometry
(/usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty
Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
))
\Gm@cnth=\count279
\Gm@cntv=\count280
\c@Gm@tempcnt=\count281
\Gm@bindingoffset=\dimen147
\Gm@wd@mp=\dimen148
\Gm@odd@mp=\dimen149
\Gm@even@mp=\dimen150
\Gm@layoutwidth=\dimen151
\Gm@layoutheight=\dimen152
\Gm@layouthoffset=\dimen153
\Gm@layoutvoffset=\dimen154
\Gm@dimlist=\toks20
) (./tmp.aux)
\openout1 = `tmp.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info:    ... okay on input line 11.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info:    ... okay on input line 11.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info:    ... okay on input line 11.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info:    ... okay on input line 11.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 11.
LaTeX Font Info:    Trying to load font information for TS1+cmr on input line 1
1.
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2023/04/13 v2.5m Standard LaTeX font definitions
)
LaTeX Font Info:    ... okay on input line 11.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 11.
LaTeX Font Info:    ... okay on input line 11.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info:    ... okay on input line 11.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info:    ... okay on input line 11.
LaTeX Font Info:    Checking defaults for T3/cmr/m/n on input line 11.
LaTeX Font Info:    Trying to load font information for T3+cmr on input line 11
.
(/usr/share/texmf/tex/latex/tipa/t3cmr.fd
File: t3cmr.fd 2001/12/31 TIPA font definitions
)
LaTeX Font Info:    ... okay on input line 11.

Package fontspec Info: 
(fontspec)             Adjusting the maths setup (use [no-math] to avoid
(fontspec)             this).

\symlegacymaths=\mathgroup4
LaTeX Font Info:    Overwriting symbol font `legacymaths' in version `bold'
(Font)                  OT1/cmr/m/n --> OT1/cmr/bx/n on input line 11.
LaTeX Font Info:    Redeclaring math accent \acute on input line 11.
LaTeX Font Info:    Redeclaring math accent \grave on input line 11.
LaTeX Font Info:    Redeclaring math accent \ddot on input line 11.
LaTeX Font Info:    Redeclaring math accent \tilde on input line 11.
LaTeX Font Info:    Redeclaring math accent \bar on input line 11.
LaTeX Font Info:    Redeclaring math accent \breve on input line 11.
LaTeX Font Info:    Redeclaring math accent \check on input line 11.
LaTeX Font Info:    Redeclaring math accent \hat on input line 11.
LaTeX Font Info:    Redeclaring math accent \dot on input line 11.
LaTeX Font Info:    Redeclaring math accent \mathring on input line 11.
LaTeX Font Info:    Redeclaring math symbol \colon on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Gamma on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Delta on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Theta on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Lambda on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Xi on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Pi on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Sigma on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Upsilon on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Phi on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Psi on input line 11.
LaTeX Font Info:    Redeclaring math symbol \Omega on input line 11.
LaTeX Font Info:    Redeclaring math symbol \mathdollar on input line 11.
LaTeX Font Info:    Redeclaring symbol font `operators' on input line 11.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `normal' on input line 11.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> TU/[cmss17.ttf](0)/m/n on input line 11
.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `bold' on input line 11.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> TU/[cmss17.ttf](0)/m/n on input line 1
1.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  TU/[cmss17.ttf](0)/m/n --> TU/[cmss17.ttf](0)/m/n on in
put line 11.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> TU/[cmss17.ttf](0)/m/it on input line 
11.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> TU/[cmss17.ttf](0)/b/n on input line 1
1.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> TU/lmss/m/n on input line 11.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/m/n on input line 11.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  TU/[cmss17.ttf](0)/m/n --> TU/[cmss17.ttf](0)/b/n on in
put line 11.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> TU/[cmss17.ttf](0)/b/it on input line
 11.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> TU/lmss/b/n on input line 11.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/b/n on input line 11.
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
*geometry* verbose mode - [ preamble ] result:
* driver: xetex
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes: 
* h-part:(L,W,R)=(7.22743pt, 2876.34512pt, 7.22743pt)
* v-part:(T,H,B)=(7.22743pt, 130.08513pt, 7.22743pt)
* \paperwidth=2890.79999pt
* \paperheight=144.54pt
* \textwidth=2876.34512pt
* \textheight=130.08513pt
* \oddsidemargin=-65.04256pt
* \evensidemargin=-65.04256pt
* \topmargin=-102.04256pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=10.0pt
* \footskip=30.0pt
* \marginparwidth=65.0pt
* \marginparsep=11.0pt
* \columnsep=10.0pt
* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)

! Font TU/[cmss17.ttf](0)/m/n/14=[[cmss17].ttf] at 14.0pt not loadable: Metric 
(TFM) file or installed font not found.
<to be read again> 
                   relax 
l.13 \noindent \Large

I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

Missing character: There is no C ("43) in font nullfont!
Missing character: There is no O ("4F) in font nullfont!
Missing character: There is no P ("50) in font nullfont!
Missing character: There is no Y ("59) in font nullfont!
(./tmp.aux)
 ***********
LaTeX2e <2024-06-01> patch level 2
L3 programming layer <2024-08-16>
 ***********
 ) 
Here is how much of TeX's memory you used:
 7132 strings out of 474234
 158087 string characters out of 5744554
 1918609 words of memory out of 5000000
 29832 multiletter control sequences out of 15000+600000
 558109 words of font info for 41 fonts, out of 8000000 for 9000
 1348 hyphenation exceptions out of 8191
 79i,1n,93p,280b,223s stack positions out of 10000i,1000n,20000p,200000b,200000s

No pages of output.

cmss tex fonts are installed: texlive-fonts-extra: /usr/share/texlive/texmf-dist/fonts/type3/mpfonts/cmss17.t3 texlive-base: /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmss17.afm texlive-base: /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmss17.pfm texlive-base: /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmss17.pfb texlive-base: /usr/share/texlive/texmf-dist/fonts/source/public/cm/cmss17.mf texlive-base: /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmss17.tfm

zwieblum commented 2 months ago

Commenting out https://github.com/part-cw/lambdanative/blob/5a73d44a59cf34e46637000dfe095d93015ea418/make.sh#L653 let me build DemoCube. IMO xelatex changed the handling of ttf fonts since I last tried. Maybe the path to the ttf font has to be set explictly?

mgorges commented 2 months ago

The errors mention cmss17 - but the files you listed didn't include a ttf file, though I also only have these:

√ ~ % locate cmss17
/usr/local/texlive/2024basic/texmf-dist/fonts/afm/public/amsfonts/cm/cmss17.afm
/usr/local/texlive/2024basic/texmf-dist/fonts/source/public/cm/cmss17.mf
/usr/local/texlive/2024basic/texmf-dist/fonts/tfm/public/cm/cmss17.tfm
/usr/local/texlive/2024basic/texmf-dist/fonts/type1/public/amsfonts/cm/cmss17.pfb
/usr/local/texlive/2024basic/texmf-dist/fonts/type1/public/amsfonts/cm/cmss17.pfm

The question is if removing that line in 653, which is only part of the test, not the real thing, is sufficient. Could you try with DemoUnicode, please?

zwieblum commented 2 months ago

DemoUnicode fails with the same error.

There is a cmss.ttf in lambdanative, it's fonts/cmss.ttf

zwieblum commented 2 months ago

Ok, the error is the commented line https://github.com/part-cw/lambdanative/blob/8def810a53114d4c1241d3d5e148a8d619a9437b/make.sh#L652

When you remove the % everything works as expected :)