What is the simplest example of a manifold with finitely generated homology groups that is not homotopy equivalent to a compact manifold?

If the finiteness of the homology groups implies the finiteness of the fundamental group, then for 3-manifolds, by Scott's compact kernel theorem, there are no such manifolds: a three-dimensional manifold admits a smooth structure, then it is triangulable, hence homeomorphic to a CW-complex, and CW-complexes with isomorphic homotopy groups are homotopy equivalent by Whithead's theorem.