  By definition, the physics of the $d-$dimensional (dim) boundary of a
$(d+1)-$dim symmetry protected topological (SPT) state cannot be realized as
itself on a $d-$dim lattice. If the symmetry of the system is unitary, then a
formal way to determine whether a $d-$dim theory must be a boundary or not, is
to couple this theory to a gauge field (or to "gauge" its symmetry), and check
if there is a gauge anomaly. In this paper we discuss the following question:
can the boundary of a SPT state be driven into a fully gapped topological order
which preserves all the symmetries? We argue that if the gauge anomaly of the
boundary is "perturbative", then the boundary must remain gapless; while if the
boundary only has global gauge anomaly but no perturbative anomaly, then it is
possible to gap out the boundary by driving it into a topological state, when
$d \geq 2$. We will demonstrate this conclusion with two examples: (1) the $3d$
spin-1/2 chiral fermion with the well-known Witten's global anomaly, which is
the boundary of a $4d$ topological superconductor with SU(2) or U(1)$\rtimes
Z_2$ symmetry; and (2) the $4d$ boundary of a $5d$ topological superconductor
with the same symmetry. We show that these boundary systems can be driven into
a fully gapped $\mathbb{Z}_{2N}$ topological order with topological degeneracy,
but this $\mathbb{Z}_{2N}$ topological order cannot be future driven into a
trivial confined phase that preserves all the symmetries due to some special
properties of its topological defects.
