1

I recently installed Asymptote 2.78 and GhostScript 9.55 (as the MikTeX installation on Windows screws them both). I also deleted the old MikTeX packages. I wanted to compile a LaTeX file with asymptote code in it. When I compile it, MikTeX again downloads the old Asymptote (which I then delete) and produces a *.asy file. I have the asymptote exe here: C:\Program Files\Asymptote\asy.exe. When I run it on my *.asy (on GIT BASH), it produces the follwing error:

  0 [main] asy (5248) C:\Program Files\Asymptote\asy.exe: *** fatal error - cygheap base
  mismatch detected - 0x180349408/0x180346408.
  This problem is probably due to using incompatible versions of the cygwin DLL.
  Search for cygwin1.dll using the Windows Start->Find/Search facility
  and delete all but the most recent version.  The most recent version *should*
  reside in x:\cygwin\bin, where 'x' is the drive on which you have
  installed the cygwin distribution.  Rebooting is also suggested if you
  are unable to find another cygwin DLL.

Now here's the funny bit: I have not installed Cygwin on my Windows machine whatsoever. I even searched my computer using the Everything Search engine. There is no other cygwin1.dll. But there are some other cygwins belonging to Git. When I run the stuff from Windows Command Prompt, it works (even when I do not delete the MikTeX asy)! This is when I do latexmk -pdf *.tex on cmd prompt. I do not understand what is going on. Please help!!

torek
  • 448,244
  • 59
  • 642
  • 775
MATHS MOD
  • 111
  • 3

1 Answers1

0

Check first if a rebase of the msys-2.0.dll, as I suggested before, would work. (Do it in C:\Program Files\Git\usr\bin and C:\Program Files\Git\bin)

Make sure to use the latest Git For Windows.

The alternative would be to use WSL2 and benefit from a full-fledged Linux environment.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I tried to follow the "more complete process". Maybe a zero is missing in the 7600... and 3000... (because earlier they gave error and after adding a zero they were fine). However, the last command gives this error: `cp: cannot create regular file './msys-2.0.dll': Device or resource busy` (when run from Cmd Prompt (Admin) : idk how to open Git in Admin mode) – MATHS MOD Feb 27 '22 at 17:07
  • Also I added `C:\Program Files\Git` etc. folders to $PATH so that I have to do windows key + R ==> type git-bash to open a git terminal at ~ (even when I type git-bash in cmd, it opens). My Git version is latest (checked by doing git --version) – MATHS MOD Feb 27 '22 at 17:14
  • "Device or resource busy": some other process must keep an handle on the file: try just after a reboot. – VonC Feb 27 '22 at 20:42
  • I have tried after restarting many times but it is always busy... Can you tell me what to do manually? – MATHS MOD Feb 28 '22 at 14:26
  • On Windows, you can execute (no installation required) https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer, and search for "`msys-2.0.dll`": that will give you the process with an handle on it. – VonC Feb 28 '22 at 17:03