  We study a set of cohomology classes which emerge in the cohomological
formulations of the calculus of variations as obstructions to the existence of
(global) solutions of the Euler-Lagrange equations of Chern-Simons gauge
theories in higher dimensions $2p+1 > 3$. It seems to be quite commonly assumed
that such obstructions always vanish, at least in the cases of interest in
theoretical physics. This is not so, neither for Chern-Simons theories of
gravity nor for Yang-Mills-Chern-Simons theories. In the case of unitary
Chern-Simons gravity we show that there are non trivial obstructions and that
they are sharp, i.e. there are (global) solutions if and only these obstruction
vanish; the procedure employed can be applied in principle also in the case of
special orthogonal Chern-Simons gravity, at least for constructing specific
solutions. For Yang-Mills-Chern-Simons theories in odd dimensions $> 5$ we find
a quite strong non existence theorem which raises doubts about the mathematical
consistency of the use of solitons/instantons in holographic QCD.
