Turkish President Recep Tayyip Erdogan left the BRICS summit early to address a terrorist attack in Ankara, warmly bidding farewell to Russian President Vladimir Putin.