Error setting up ConTeXt in MacTeX 2020
Hi all, with MacTeX 2020 on a newly installed Mac, I have the problem that ConTeXt doesn't work anymore: $ context file.tex mtx-context | warning: no format found, forcing remake (commandline driven) […] snip lots of lines resolvers | formats | changing to format path '/var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex' resolvers | formats | unable to change to format path '/var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex' mtx-context | error, no format found with name: cont-en, aborting system | total runtime: 5.315 seconds The [ConTeXt docs][1] say that I should run `mtxrun --generate`, which seems to run successfully, and `context --make`, which finishes with the same „unable to change format path“ error (I believe this is what context automatically does when compiling my file, hinted by the „no format found. forcing remake“ message). I tried explicitly running `context --make cont-en` which yields the same result. The given path does exist on my hard drive. I don't even know if the „unable to change format path“ message is actually an error, but I have no other indicator of what goes wrong. The only line that explicitly says „error“ is the one I get when trying to process the file. Interestingly, I have another Mac where I upgraded from MacTeX 2019 to MacTeX 2020 and everything works there. I made sure that everything is up-to-date with the TeX Live Utility. How can I fix this problem? Regards, Felix [1]: https://wiki.contextgarden.net/Running_Mark_IV
Hi Felix, Some time ago I encountered the same problem and we had a thread on this list about this: https://www.mail-archive.com/ntg-context@ntg.nl/msg95355.html The problem on my Mac came from the fact that a directory /opt/local/etc/texmf/ existed (installed by MacPorts, without me knowing it…) where ConTeXt tries to find a format, while there is none. I removed that directory and then I could use ConTeXt from MacTex 2020. Best regards: Otared
On 18 Sep 2020, at 09:41, Felix Krause
wrote: Hi all,
with MacTeX 2020 on a newly installed Mac, I have the problem that ConTeXt doesn't work anymore:
$ context file.tex mtx-context | warning: no format found, forcing remake (commandline driven) […] snip lots of lines resolvers | formats | changing to format path '/var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex' resolvers | formats | unable to change to format path '/var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex' mtx-context | error, no format found with name: cont-en, aborting system | total runtime: 5.315 seconds The ConTeXt docs https://wiki.contextgarden.net/Running_Mark_IV say that I should run mtxrun --generate, which seems to run successfully, and context --make, which finishes with the same „unable to change format path“ error (I believe this is what context automatically does when compiling my file, hinted by the „no format found. forcing remake“ message). I tried explicitly running context --make cont-en which yields the same result. The given path does exist on my hard drive.
I don't even know if the „unable to change format path“ message is actually an error, but I have no other indicator of what goes wrong. The only line that explicitly says „error“ is the one I get when trying to process the file.
Interestingly, I have another Mac where I upgraded from MacTeX 2019 to MacTeX 2020 and everything works there.
I made sure that everything is up-to-date with the TeX Live Utility.
How can I fix this problem?
Regards, Felix
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 18 Sep 2020, at 11:20, Otared Kavian wrote:
Hi Felix,
Some time ago I encountered the same problem and we had a thread on this list about this:
https://www.mail-archive.com/ntg-context@ntg.nl/msg95355.html
The problem on my Mac came from the fact that a directory /opt/local/etc/texmf/ existed (installed by MacPorts, without me knowing it…) where ConTeXt tries to find a format, while there is none. I removed that directory and then I could use ConTeXt from MacTex 2020.
Hm. I don't have this directory (not using MacPorts) and my error seems to be quite different (the scripts to be executed seem to be found). I dug through the thread but for all I can see, nothing there describes my problem or a solution for solving it. Regards, Felix
On 18. Sep 2020, at 11:35, Felix Krause
wrote: Hm. I don't have this directory (not using MacPorts) and my error seems to be quite different (the scripts to be executed seem to be found). I dug through the thread but for all I can see, nothing there describes my problem or a solution for solving it.
Then tell us a bit more about your system. What is the output of which -a context for example? Is /var/folders/ the normal path where mactex would expect a format file? I use a Mac, but I have vanilla texlive installed; I never quite understood where mactex was any better, so I can’t test on my system. Thomas
On 18 Sep 2020, at 11:43, Thomas A. Schmitz wrote:
Then tell us a bit more about your system. What is the output of
which -a context
/Library/TeX/texbin/context which is an alias of /Library/TeX/texbin/context@ -> ../../texmf-dist/scripts/context/stubs/unix/context and texbin is /Library/TeX/texbin@ -> Distributions/Programs/texbin /Library/TeX/Distributions/Programs/texbin@ -> ../.DefaultTeX/Contents/Programs/texbin /Library/TeX/Distributions/.DefaultTeX/Contents@ -> ../TeXLive-2020.texdist/Contents
for example? Is
/var/folders/
the normal path where mactex would expect a format file? I use a Mac, but I have vanilla texlive installed; I never quite understood where mactex was any better, so I can’t test on my system.
The directory name luatex-cache suggests it's used for caching. I interpret the output like „something happens during the generation of the format file and therefore the file never gets generated“. I don't know much about the internals. I don't really have any reason for using MacTeX over texlive; I was once told that this is the thing I want to use on a Mac when I was a student, and have used it ever since. I could switch over and try texlive if nothing else helps, though I think it would be good to pin down the cause of this error and tell the MacTeX folks about it. Regards, Felix
On 18. Sep 2020, at 12:00, Felix Krause
The directory name luatex-cache suggests it's used for caching.
That doesn’t help a lot.
I interpret the output like „something happens during the generation of the format file and therefore the file never gets generated“. I don't know much about the internals.
What does mtxrun --expand-var TEXMFCACHE return? Thomas
Am 18.09.2020 um 09:41 schrieb Felix Krause
: Hi all,
with MacTeX 2020 on a newly installed Mac, I have the problem that ConTeXt doesn't work anymore:
$ context file.tex mtx-context | warning: no format found, forcing remake (commandline driven) […] snip lots of lines resolvers | formats | changing to format path '/var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex' resolvers | formats | unable to change to format path '/var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex' mtx-context | error, no format found with name: cont-en, aborting system | total runtime: 5.315 seconds
Try to delete the luatex cache (i.e. all of /var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache) and try again. HTH Hraban
I think I may have found the origin of the error: On Fri, Sep 18, 2020 at 09:41:23AM +0200, Felix Krause wrote:
resolvers | formats | changing to format path '/var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex' resolvers | formats | unable to change to format path '/var/folders/rj/hfjmjx796q102y4v23vh038c0000gp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex'
These messages come from the middle of the file luat-fmt.lua (lines 180 and 183, respectively, on my system) when ConTeXt tries to change the working directory (that’s what “change” means in this context, just moving to another directory, as in cd or chdir). The relevant extract is report_format("changing to format path %a",validformatpath) lfs.chdir(validformatpath) if dir.current() ~= validformatpath then return fatalerror(startupdir,"unable to change to format path %a",validformatpath) end In your case validformatpath is a subdirectory of $TMPDIR, under /var/folders/. However, if your Mac is anything like mine, /var is actually a symbolic link to /private/var, so that dir.current() reports a path starting with /private and the test fails. You can work around that by setting TMPDIR to some other value, that doesn’t start with /var -- and not /tmp either because that’s also a symbolic link :-) It should work with a temporary directory in your home folder. Can you try that? Best, Arthur
On 18 Sep 2020, at 12:50, Arthur Rosendahl wrote:
I think I may have found the origin of the error:
In your case validformatpath is a subdirectory of $TMPDIR, under /var/folders/. However, if your Mac is anything like mine, /var is actually a symbolic link to /private/var, so that dir.current() reports a path starting with /private and the test fails.
Yes, this is the setup here as well.
You can work around that by setting TMPDIR to some other value, that doesn’t start with /var -- and not /tmp either because that’s also a symbolic link :-) It should work with a temporary directory in your home folder. Can you try that?
This works. Thanks a lot (also to everyone else involved)! Regards, Felix
On Fri, Sep 18, 2020 at 01:48:16PM +0200, Felix Krause wrote:
In your case validformatpath is a subdirectory of $TMPDIR, under /var/folders/. However, if your Mac is anything like mine, /var is actually a symbolic link to /private/var, so that dir.current() reports a path starting with /private and the test fails.
Yes, this is the setup here as well.
That was rhetorical :-) /var and /tmp (as well as /etc) have been symbolic links for at least ten years, probably earlier.
You can work around that by setting TMPDIR to some other value, that doesn’t start with /var -- and not /tmp either because that’s also a symbolic link :-) It should work with a temporary directory in your home folder. Can you try that?
This works. Thanks a lot (also to everyone else involved)!
Glad to hear that, and you’re welcome, but this should also be fixed in ConTeXt -- Hans, can you do something about that? It should be enough to resolve symbolic links on either sides of the test dir.current() ~= validformatpath Best, Arthur
On 9/18/2020 2:49 PM, Arthur Reutenauer wrote:
On Fri, Sep 18, 2020 at 01:48:16PM +0200, Felix Krause wrote:
In your case validformatpath is a subdirectory of $TMPDIR, under /var/folders/. However, if your Mac is anything like mine, /var is actually a symbolic link to /private/var, so that dir.current() reports a path starting with /private and the test fails.
Yes, this is the setup here as well.
That was rhetorical :-) /var and /tmp (as well as /etc) have been symbolic links for at least ten years, probably earlier.
You can work around that by setting TMPDIR to some other value, that doesn’t start with /var -- and not /tmp either because that’s also a symbolic link :-) It should work with a temporary directory in your home folder. Can you try that?
This works. Thanks a lot (also to everyone else involved)!
Glad to hear that, and you’re welcome, but this should also be fixed in ConTeXt -- Hans, can you do something about that? It should be enough to resolve symbolic links on either sides of the test dir.current() ~= validformatpath I need to find a problematic mac ... I remember that Taco did some tests recently so I'll ask him.
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 (7)
-
Arthur Reutenauer
-
Arthur Rosendahl
-
Felix Krause
-
Hans Hagen
-
Henning Hraban Ramm
-
Otared Kavian
-
Thomas A. Schmitz