  The coefficients of the chain polynomial of a finite poset enumerate chains
in the poset by their number of elements. The chain polynomials of the
partition lattices and their standard type $B$ analogues are shown to have only
real roots. The real-rootedness of the chain polynomial is conjectured for all
geometric lattices and is shown to be preserved by the pyramid and the prism
operations on Cohen--Macaulay posets. As a result, new families of convex
polytopes whose face lattices have real-rooted chain polynomials are presented.
An application to the face enumeration of the second barycentric subdivision of
the boundary complex of the simplex is also included.
