How do I see that $\mathbb{CP}^2$ is not the boundary of a compact smooth $5$-manifold?

Toward contradiction, assume it is the boundary of a compact 5-manifold $V$. Then the adjunction space $D(V)=V\cup_{\mathbb{C}P^2} V$ is a closed 5-dimensional manifold, so its Euler characteristic vanishes by Poincaré Duality. Thus, by additivity of the Euler characteristic, we have

$$0=\chi(D(V))=2\chi(V)-\chi(\mathbb{C}P^2)=2\chi(V)-3.$$

This gives the desired contradiction.


The middle degree cohomology $H^2(\Bbb C\rm P^2;\Bbb Z)$ is one-dimensional, hence its signature---the signature of the intersection form $H^2(X;\Bbb Z)\times H^2(X;\Bbb Z)\to \Bbb Z$, $(\alpha,\beta)\mapsto (\alpha\smile\beta)(\mu)$ where $\mu$ is the fundamental class---cannot vanish. But the signature of the boundary of a (compact, oriented) 5-manifold must vanish (this is cobordism invariance of the signature).

One caveat is that this argument uses an oriented 5-manifold. However, since the signature of $\Bbb C\rm P^2$ must be $1\mod 2$, we can work with $\Bbb Z_2$-coefficients and drop the orientability assumption. Thanks to Balarka Sen and iwriteonbananas for pointing this out.