Using layerselect to produce a single layer fails for many output formats
The FAQ says:
The graph can have a layerselect attribute, which specifies which layers should be emitted. The value uses the same concrete syntax as the layer attribute.
At present, the output of multiple layers into a single output file is only available in PostScript. However, the layerselect attribute can be used to select a single layer for output in any format.
For most output formats, layerselect=1 succeeds, but results in a Segmentation fault for subsequent layers. For example:
z=png;for x in 1 2 3 4 5 ;do echo $x; /bin/dot -Glayerselect=$x -T$z layer.gv >/tmp/$x.$z;done
1
2
Segmentation fault (core dumped)
3
Segmentation fault (core dumped)
4
Segmentation fault (core dumped)
5
Segmentation fault (core dumped)
Interestingly, things succeed for svg and xdot, but not gif or dot