  In the standard asymptotic expansion of four dimensional static
asymptotically flat spacetimes, the coefficient of the first subleading term of
the lapse function can be identified with the mass of the spacetime. Using the
Hamiltonian formalism we show that, in asymptotically locally anti-de Sitter
spacetimes endowed with a scalar field, the mass can read off in the same way
only when the boundary conditions are compatible with the asymptotic
realization of the anti-de Sitter symmetry. In particular, this implies that
some prescriptions for computing the mass of a hairy spacetime are not suitable
when the scalar field breaks the asymptotic anti-de Sitter invariance.
