TITLE: line bundles and universal covers
QUESTION [9 upvotes]: When dealing with some lifting problems, I came across the following problem, which probably has a well-known answer, but anyway:
Suppose I have a (locally contractible) connected topological group $G$, such that $\pi_1(G) \cong \mathbb{Z}$. Let $\tilde{G} \to G$ be its universal covering group. Let $P \to X$ be a principal $G$-bundle over a compact Hausdorff space $X$. The obstruction of lifting $P$ to a principal $\tilde{G}$-bundle lives in $H^2(X, \pi_1(G)) \cong H^2(X, \mathbb{Z})$ and is therefore given by a complex line bundle over $X$.

Is it possible to construct this line bundle directly from $P$ (without going through the classification of line bundles by their Chern classes)?

REPLY [6 votes]: I don't think there is a canonical construction of the associated line bundle, this will be only defined up to homotopy, in some sense.
Here is a slightly more geometric construction. Let $G'$ be the group obtained by substituting $\mathbb Z \subseteq \widetilde G$ with $\mathbb R$; that is, $G' = (\widetilde G \times \mathbb R)/\mathbb Z$, with $\mathbb Z$ embedded anti-diagonally. The natural projection $G' \to \widetilde G/\mathbb Z = G$ has kernel $\mathbb R$, hence $P$ will lift to a $G'$-principal bundle $P'$, in a unique fashion, up to isomorphism (but not canonically). Also, $G'$ contains $\widetilde G$ as a normal subgroup, and $G'/\widetilde G \simeq \mathbb R/\mathbb Z \simeq \mathrm S^1$; so $P'$ gives an $\mathrm S^1$ principal bundle, which is the desired obstruction.