Linear dynamical systems: compactness theorem