One way to support a spherical dome is a cantilever construction. The angle od a cube are cut to form an octogon that fits rather well the circular form the spherical dome.
In Islamic art as well as in romanesque art you can find several ways of a stepwise transition from square to octogon. Here a view of the dome of the St-Etienne church in Nevers (late 11th century France).