Cannot change node shape

(Sorry for the duplicate post, I thought I had fixed the issue but I was running dot on a different file!)

Input file:

digraph Blah {
  rankdir="LR"
  node [shape="box"];
  A -> B -> C;
  B -> D;
}

When I run the command dot -v -Txdot gt.dot > gt.xdot , it fails with “Illegal instruction”.

dot - graphviz version 2.44.0 ()
libdir = "/usr/lib/graphviz"
Activated plugin library: libgvplugin_core.so.6
Using render: xdot:core
Using device: xdot:xdot:core
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
The plugin configuration file:
        /usr/lib/graphviz/config6
                was successfully loaded.
    render      :  cairo dot dot_json fig json json0 map mp pic pov ps svg tk visio vml xdot xdot_json
    layout      :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device      :  canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pdf pic plain plain-ext png pov ps ps2 svg svgz tk vdx vml vmlz x11 xdot xdot1.2 xdot1.4 xdot_json xlib
    loadimage   :  (lib) eps gif jpe jpeg jpg png ps svg
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
fontname: "Times-Roman" resolved to: (ps:pango  FreeSerif,  REGULAR) (PangoCairoFcFont) "FreeSerif, Regular" /root/.fonts/FreeSerif.otf
Illegal instruction

But when I remove the node [shape="box"] line, it works. How do I fix it?

Does it crash if you change the output format - to png or svg?

Yes, the same error.

I tried with Graphviz built with CMake on Windows and it worked fine. If you think this is a bug, you should open an issue at https://gitlab.com/graphviz/graphviz/-/issues/new. If you can’t or don’t want to, please provide the same info here as the issue template asks for.

Here’s my output:

~/graphviz$ env LD_LIBRARY_PATH=build/_CPack_Packages/win64/ZIP/Graphviz-2.49.1~dev.20210831.1547-win64/bin build/_CPack_Packages/win64/ZIP/Graphviz-2.49.1~dev.20210831.1547-win64/bin/dot.exe -V
dot - graphviz version 2.49.1~dev.20210831.1547 (20210831.1547)
~/graphviz$ env LD_LIBRARY_PATH=build/_CPack_Packages/win64/ZIP/Graphviz-2.49.1~dev.20210831.1547-win64/bin build/_CPack_Packages/win64/ZIP/Graphviz-2.49.1~dev.20210831.1547-win64/bin/dot.exe -v -Txdot ~/Documents/help-797.dot
dot - graphviz version 2.49.1~dev.20210831.1547 (20210831.1547)
libdir = "C:\Users\magja\graphviz\build\_CPack_Packages\win64\ZIP\Graphviz-2.49.1~dev.20210831.1547-win64\bin"
Activated plugin library: gvplugin_core.dll
Using render: xdot:core
Using device: xdot:xdot:core
Activated plugin library: gvplugin_dot_layout.dll
Using layout: dot:dot_layout
The plugin configuration file:
        C:\Users\magja\graphviz\build\_CPack_Packages\win64\ZIP\Graphviz-2.49.1~dev.20210831.1547-win64\bin\config6
                was successfully loaded.
    render      :  cairo dot dot_json fig gdiplus json json0 map mp pic pov ps svg tk vml xdot xdot_json
    layout      :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device      :  bmp canon cmap cmapx cmapx_np dot dot_json emf emfplus eps fig gif gv imap imap_np ismap jpe jpeg jpg json json0 metafile mp pdf pic plain plain-ext png pov ps ps2 svg tif tiff tk vml xdot xdot1.2 xdot1.4 xdot_json
    loadimage   :  (lib) bmp eps gif jpe jpeg jpg png ps svg
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
fontname: "Times-Roman" resolved to: (ps:pango  Times New Roman, ) (PangoCairoWin32Font) "Times New Roman, 13.9990234375"
network simplex:  4 nodes 3 edges maxiter=2147483647 balance=1
network simplex: 4 nodes 3 edges 0 iter 0.00 sec
Maxrank = 2, minrank = 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross Blah: 0 crossings, 0.00 secs.
network simplex:  7 nodes 7 edges maxiter=2147483647 balance=2
network simplex: 7 nodes 7 edges 0 iter 0.00 sec
routesplines: 3 edges, 9 boxes 0.00 sec
Using render: xdot:core
Using device: xdot:xdot:core
digraph Blah {
        graph [_draw_="c 9 -#fffffe00 C 7 -#ffffff P 4 0 0 0 90 234 90 234 0 ",
                bb="0,0,234,90",
                rankdir=LR,
                xdotversion=1.7
        ];
        node [label="\N",
                shape=box
        ];
        A       [_draw_="c 7 -#000000 p 4 54 63 0 63 0 27 54 27 ",
                _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 27 41.3 0 10 1 -A ",
                height=0.5,
                pos="27,45",
                width=0.75];
        B       [_draw_="c 7 -#000000 p 4 144 63 90 63 90 27 144 27 ",
                _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 117 41.3 0 10 1 -B ",
                height=0.5,
                pos="117,45",
                width=0.75];
        A -> B  [_draw_="c 7 -#000000 B 4 54.4 45 62.39 45 71.31 45 79.82 45 ",
                _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 79.92 48.5 89.92 45 79.92 41.5 ",
                pos="e,89.919,45 54.403,45 62.393,45 71.311,45 79.824,45"];
        C       [_draw_="c 7 -#000000 p 4 234 90 180 90 180 54 234 54 ",
                _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 207 68.3 0 10 1 -C ",
                height=0.5,
                pos="207,72",
                width=0.75];
        B -> C  [_draw_="c 7 -#000000 B 4 144.4 53.1 152.48 55.58 161.51 58.35 170.1 60.99 ",
                _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 169.33 64.41 179.92 64 171.39 57.72 ",
                pos="e,179.92,63.998 144.4,53.101 152.48,55.579 161.51,58.349 170.1,60.987"];
        D       [_draw_="c 7 -#000000 p 4 234 36 180 36 180 0 234 0 ",
                _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 207 14.3 0 10 1 -D ",
                height=0.5,
                pos="207,18",
                width=0.75];
        B -> D  [_draw_="c 7 -#000000 B 4 144.4 36.9 152.48 34.42 161.51 31.65 170.1 29.01 ",
                _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 171.39 32.28 179.92 26 169.33 25.59 ",
                pos="e,179.92,26.002 144.4,36.899 152.48,34.421 161.51,31.651 170.1,29.013"];
}
gvRenderJobs Blah: 0.00 secs.

After testing it out some more it seems to be an OS issue. I was using iSH (https://www.ish.app), which is an emulated Alpine Linux that runs on iOS. Since the same file works on ordinary Alpine Linux and Windows, it seems to be an issue there. I have filed an issue with iSH.

1 Like