'Running dot -Tpng test.dot -o test.png results in a segfault

I am a bit desperate about what I'm doing wrong. I have installed graphviz 3.0.0 on Mac OS Catalina via homebrew.

test.dot:

graph g {
        a -- b ;
}

running dot -Tpng test.dot -o test.png results in a segfault. What's wrong about my invokation to dot?

The output of dot -vtest.dot is:

dot - graphviz version 3.0.0 (20220226.1711)
libdir = "/usr/local/Cellar/graphviz/3.0.0/lib/graphviz"
Activated plugin library: libgvplugin_dot_layout.6.dylib
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.6.dylib
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
    /usr/local/Cellar/graphviz/3.0.0/lib/graphviz/config6
        was successfully loaded.
    render  :  cairo dot dot_json fig gd json json0 map mp pic pov ps quartz svg tk visio vml vrml xdot xdot_json
    layout  :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device  :  bmp canon cgimage cmap cmapx cmapx_np dot dot_json eps exr fig gd gd2 gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg json json0 mp pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vdx vml vmlz vrml wbmp webp xdot xdot1.2 xdot1.4 xdot_json
    loadimage   :  (lib) bmp eps gd gd2 gif jpe jpeg jpg pdf png ps svg webp xbm
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
zsh: segmentation fault  dot -v test.dot

The output of dot -v test.dot looks the same, at first glance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source