Manual Compilation
Hello. I'm trying to compile Context to use it on NetBSD. For now, I'm using FreeBSD to try to compile. I use information from https://wiki.contextgarden.net/Manual_Compilation Just a different git link because the wiki link is old. I also saw that fonts are in the context of the depository. mkdir -p ~/tex cd ~/tex git clone https://github.com/contextgarden/context.git texmf-context cp texmf-context/web2c/contextcnf.lua texmf-context/web2c/texmfcnf.lua cd texmf-context/source/luametatex sh build.sh --native cd - mkdir -p texmf-freebsd-amd64/bin cp texmf-context/source/luametatex/build/native/luametatex texmf-freebsd-amd64/bin cd tex/texmf-freebsd-amd64/bin ln -s luametatex mtxrun ln -s luametatex context cd - cp texmf-context/scripts/context/lua/mtxrun.lua texmf-freebsd-amd64/bin cp texmf-context/scripts/context/lua/context.lua texmf-freebsd-amd64/bin setenv PATH $HOME/tex/texmf-freebsd-amd64/bin:$PATH mtxrun --generate ls -1 tex/ texmf-cache texmf-context texmf-freebsd-amd64 When I compile a test document, I see errors fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'lmroman10-regular' is not found using lookup 'file' fonts > defining > unable to define 'lmroman10-regular' as 'modern-12pt-rm-tf-' fonts > defining > forced type 'otf' of 'latinmodern-math' not found fonts > defining > unable to define 'latinmodern-math.otf' as 'modern-12pt-mm-mr-' fonts > defining > unable to define 'latinmodern-math.otf' as 'modern-12pt-mm-mb-' fonts > 'fallback modern rm 12pt' is loaded fonts > checking > char H (U+00048) in font '' with id 0: missing fonts > checking > char e (U+00065) in font '' with id 0: missing fonts > checking > char l (U+0006C) in font '' with id 0: missing fonts > checking > char o (U+0006F) in font '' with id 0: missing pages > flushing realpage 1, userpage 1, subpage 1 Please tell me what else needs to be done. Thanks.
Am 30.12.2025 um 10:03 schrieb Kostirya:
Hello.
I'm trying to compile Context to use it on NetBSD. For now, I'm using FreeBSD to try to compile.
You can use the installer from the pragma site which downloads all required files, afterwards you can compile the binaries yourself because the download includes the source files. https://www.pragma-ade.nl/install.htm Wolfgang
But the installer is not available for NetBSD...
вт, 30 груд. 2025 р. о 11:19 Wolfgang Schuster
Am 30.12.2025 um 10:03 schrieb Kostirya:
Hello.
I'm trying to compile Context to use it on NetBSD. For now, I'm using FreeBSD to try to compile.
You can use the installer from the pragma site which downloads all required files, afterwards you can compile the binaries yourself because the download includes the source files.
https://www.pragma-ade.nl/install.htm
Wolfgang
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
On 12/30/2025 12:38 PM, Kostirya wrote:
But the installer is not available for NetBSD...
you can create a tex tree using:
wget lmtx.pragma-ade.nl/install-lmtx/texmf.zip wget lmtx.pragma-ade.nl/install-lmtx/texmf-context.zip
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Kostirya, On Tue, 2025-12-30 at 11:03 +0200, Kostirya wrote:
I'm trying to compile Context to use it on NetBSD.
Marc Baudoin has been recompiling the NetBSD x86_64 binaries in TeX Live for every new ConTeXt release, so installing TeX Live might be easier than trying to recompile the binaries yourself: https://tug.org/texlive/quickinstall.html If you install "scheme-context" instead of the default "scheme-full", you should get more or less exactly the same result as you'd get by installing the Standalone Distribution---installing via TeX Live will also give you Plain LuaTeX, but not pdfTeX or LaTeX, so the install size should be at most 10% larger. There are a couple other minor differences, but nothing that is likely to cause any problems: https://github.com/gucci-on-fleek/context-packaging#goals
Just a different git link because the wiki link is old.
If you want just the binary (C + cmake) source, you can download it from CTAN: https://mirrors.ctan.org/macros/context/base/archives/luametatex-20251213.sr... You can also download the entire texmf source using the same link that the official installer does http://lmtx.pragma-ade.com/install-lmtx/texmf-context.zip This should be identical to the GitHub link that you used, so it doesn't matter which one you use.
When I compile a test document, I see errors
fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'lmroman10-regular' is not found using lookup 'file' fonts > defining > unable to define 'lmroman10-regular' as 'modern-12pt-rm-tf-' fonts > defining > forced type 'otf' of 'latinmodern-math' not found fonts > defining > unable to define 'latinmodern-math.otf' as 'modern-12pt-mm-mr-' fonts > defining > unable to define 'latinmodern-math.otf' as 'modern-12pt-mm-mb-'
The fonts are available in the separate (and rather poorly-named) "texmf.zip" file http://lmtx.pragma-ade.com/install-lmtx/texmf.zip Or if you prefer to use a Git repository: https://codeberg.org/contextgarden/context-distribution-fonts On Tue, 2025-12-30 at 13:38 +0200, Kostirya wrote:
But the installer is not available for NetBSD...
вт, 30 груд. 2025 р. о 11:19 Wolfgang Schuster
пише: Am 30.12.2025 um 10:03 schrieb Kostirya: You can use the installer from the pragma site which downloads all required files, afterwards you can compile the binaries yourself because the download includes the source files.
I think that the installer might just be a shell script, so the exact platform shouldn't matter as long as it's Unix-ish. But if the installer _does_ depend on the binaries, you should just need to place a compiled "luametatex" in the "bin/" folder beside the installer shell script. I've written some semi-related documentation at https://github.com/gucci-on-fleek/context-packaging/blob/master/files/INSTAL... https://github.com/gucci-on-fleek/context-packaging/blob/master/files/README... Thanks, -- Max
On 12/30/2025 1:16 PM, Max Chernoff via ntg-context wrote:
If you install "scheme-context" instead of the default "scheme-full", you should get more or less exactly the same result as you'd get by installing the Standalone Distribution---installing via TeX Live will also give you Plain LuaTeX, but not pdfTeX or LaTeX, so the install size
fwiw, i'm not sure what you mean with plain luatex but context has it's own plain luatex which is what is used when we test it (always has been so)
should be at most 10% larger. There are a couple other minor differences, but nothing that is likely to cause any problems:
As long as one keeps in mind that it's not the official distribution because some files are removed. So if something fails due to that one should explicitly mention that texlive is used. (I don't have TL installed so can't check.)
If you want just the binary (C + cmake) source, you can download it from CTAN:
https://mirrors.ctan.org/macros/context/base/archives/luametatex-20251213.sr...
But is should anyway be possible to compile locally. It's not that hard. Just to get the reference installation. It's not a bad exercise if one really want to be independent or see how independent one can be.
The fonts are available in the separate (and rather poorly-named) "texmf.zip" file
What is poorly named about it? It contains some public stuff. If that should go to e.g. texmf-fonts we could as well remove texmf alltogether and forget about it, so also notthing generic. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, On Tue, 2025-12-30 at 14:22 +0100, Hans Hagen via ntg-context wrote:
On 12/30/2025 1:16 PM, Max Chernoff via ntg-context wrote:
If you install "scheme-context" instead of the default "scheme-full", you should get more or less exactly the same result as you'd get by installing the Standalone Distribution---installing via TeX Live will also give you Plain LuaTeX, but not pdfTeX or LaTeX, so the install size
fwiw, i'm not sure what you mean with plain luatex but context has it's own plain luatex which is what is used when we test it (always has been so)
If I try and run the LuaTeX provided by ConTeXt, I just get an error message (and have for as long as I remember): $ luatex warning: /opt/context/tex/texmf/web2c/texmf.cnf:49: (kpathsea) No cnf value on line: OSFONTDIR =. This is LuaTeX, Version 1.24.0 (TeX Live 2026/dev) system commands enabled. **\relax kpathsea: Running mktexfmt luatex.fmt mktexfmt: No such file or directory I can't find the format file `luatex.fmt'! (And I was wrong earlier---"scheme-context" also includes MkII, so you do get pdfTeX as well, but still not LaTeX or any of the other large formats/packages.)
should be at most 10% larger. There are a couple other minor differences, but nothing that is likely to cause any problems:
As long as one keeps in mind that it's not the official distribution because some files are removed. So if something fails due to that one should explicitly mention that texlive is used.
Right, and in normal cases, it's good to install the Standalone Distribution, but for NetBSD specifically, TL probably makes more sense, since it provides LMTX binaries while Standalone doesn't. (This is also the only platform where TL has better binary support than Standalone.)
The fonts are available in the separate (and rather poorly-named) "texmf.zip" file
What is poorly named about it? It contains some public stuff. If that should go to e.g. texmf-fonts we could as well remove texmf alltogether and forget about it, so also notthing generic.
Well "texmf-context.zip" contains the base ConTeXt files, and "texmf-linux-64.zip" contains Linux binaries, so I'd expect the fonts to come from "texmf-fonts.zip". Thanks, -- Max
On 12/31/2025 1:43 PM, Max Chernoff via ntg-context wrote:
Well "texmf-context.zip" contains the base ConTeXt files, and "texmf-linux-64.zip" contains Linux binaries, so I'd expect the fonts to come from "texmf-fonts.zip".
The idea has always been that texmf-fonts tenmf-projects are never touched by updates so users can put their (bought, downlaoded, long term system) fonts and styles there. They are part of the file database lookup strategy i.e. speedy lookup. (texmf-local policies and names have changed over time, also depending in distribution and operating system) so i consider that useless and unreliable; texmf-home is not hashed so can slow down a run due to runtime analysis so again not something i'd ever use or recommend) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 12/31/2025 1:43 PM, Max Chernoff via ntg-context wrote:
If I try and run the LuaTeX provided by ConTeXt, I just get an error message (and have for as long as I remember):
$ luatex warning: /opt/context/tex/texmf/web2c/texmf.cnf:49: (kpathsea) No cnf value on line: OSFONTDIR =. This is LuaTeX, Version 1.24.0 (TeX Live 2026/dev) system commands enabled. **\relax
kpathsea: Running mktexfmt luatex.fmt mktexfmt: No such file or directory I can't find the format file `luatex.fmt'!
We started with some generic plain but as luatex plain got hijacked we decided not to rely on whatever is used to make formats. We always had: mtxrun --script plain --make and then mtxrun --script plain foo So when an issue with plain is reported that is what I know and therefore use. In fact, originally we have a bit of (generic) infrastructure for any macro package (initialization etc) but dropped that idea because it's a waste of time. Anyway, it's only for us / curious context users as the only other plain luatex users that I knwow have their own setup. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (6)
-
Hans Hagen -
Hans Hagen -
Henning Hraban Ramm -
Kostirya -
Max Chernoff -
Wolfgang Schuster