I have a .sh
script that I double-click to have it executed by git for Windows.
Now I need (imagemagick) convert
from cygwin (which I have installed) and I'm calling it with its absolute path – /c/cygwin64/bin/convert.exe
– but I get:
fatal error – cygheap base mismatch detected.
This problem is probably due to using incompatible versions of the cygwin DLL.
Wrapping the actual convert
call in a cygwin bash call, or even in a cmd.exe
call, doesn't help. This is a bit strange because I sometimes use cygwin executables directly in .cmd
scripts, and that always worked.
What can I do? A solution that keeps my program limited to one file would be preferred.
(I know I could probably just install Windows-native imagemagick. But then the next day I need another cygwin tool in a git-for-Win-Shellscript .. also, I'd like to understand what's happening here. And, yes, I will probably make git for Windows obsolete in my workplace, if possible)
Best Answer
fatal error - cygheap base mismatch detected.
This error is caused because the Git for Windows path is incompatible with Cywin.
They both use
/bin
and/usr/bin
but these map to different directories (because they use different mount tables).Cywin expects to find the dll in
/usr/bin/cygwin1.dll
(and is not found in Git for Windows)When you explicitly run any Cygwin command in a Git for Windows
bash
shell Cygwin cannot find its dll and generates the error message above.Notice below that the mount mapping for
/
is different.Git for Windows:
Cygwin:
There is no solution, other than don't mix and match cygwin derived utilities. Pick one and stick with it.