There are two common workarounds for this. First, either you can move further away from the building to reduce the field of view (as distortions or converging lines are caused by wide angle view). You might have noticed that when you shoot close-ups at wide angle, it tends to distort the image. Secondly, you can climb up a bit higher to take the shot.
Also, try to avoid tilting your camera upwards – frame the shot by keeping the camera parallel to the ground.
Well, if you have already taken the shots, you can correct them in Photoshop or Lightroom. In fact it’s easier to do so in Lightroom with Lens correction panel.