Barack Obama owes his place in the White House in large part to George W Bush and the war in Iraq. The president's opposition to the 2003 invasion was vital in beating Hillary Clinton to the Democratic nomination and his scathing criticism of Bush's war as "dumb" helped him eventually win the White House.

But Obama failed to mention Iraq once during his speech at the opening of the George W Bush library and museum in Dallas on Thursday. Instead, he opted for kind words about the man he once castigated day after day on the campaign trail, to cheers from Democratic supporters. In Texas, Obama spoke of Bush's "generosity", "strength", "resolve" and "compassion".

His speech contrasted with the regular complaints White House staffers record Obama making during his first term, about the mess he had inherited from Bush, from the Iraq war to the economic collapse. The only possible reference to Iraq was so oblique no-one can be sure whether it was addressed to Bush's war record. Towards the end of his speech, Obama quoted from John F Kennedy about a belief in god and facing up to the storm.

"No-one can be completely ready for this office. But America needs leaders who are willing to face the storm head on, even as they pray for God's strength and wisdom so that they can do what they believe is right," Obama said, from a platform that included all the living presidents: Jimmy Carter, George HW Bush and Bill Clinton. "And that's what the leaders with whom I share this stage have all done. That's what President George W Bush chose to do. That's why I'm honored to be part of today's celebration."

Obama may have decided that it might have appeared churlish to have mentioned Iraq on an occasion that was largely ceremonial, or to have referred, as he did frequently on the campaign trail, to Bush's failure to react quickly to the devastation in New Orleans after Hurricane Katrina, in 2005.

The group of living presidents at the ceremonial dedication of the George W Bush Presidential Library. Photograph: Ralph Lauer/EPA

Bush, in a short speech winding up the ceremony, did not mention Iraq either, making only a passing reference to the war as he listed what he regarded as his successes, such as lowering taxes. Without naming Iraq, he noted that he had freed a country from dictatorship. At the end of his speech, as he expressed confidence in the future of America, Bush began to weep. As he sat down, he wiped tears from his face.

Obama made one political point, seeking to recruit Bush in his push to have immigration reform passed this year, in spite of opposition from a group of Republicans. The president recalled that Bush had reached across the political divide to Senator Ted Kennedy, to work on a joint plan for immigration reform, one that eventually foundered in the face of Republican hostility.

Obama said: "Seven years ago, President Bush restarted an important conversation by speaking with the American people about our history as a nation of laws and a nation of immigrants. And even though comprehensive immigration reform has taken a little longer than any of us expected, I am hopeful that this year, with the help of Speaker [John] Boehner and some of the senators and members of Congress who are here today, that we bring it home – for our families, and our economy, and our security, and for this incredible country that we love.

"And if we do that, it will be in large part thanks to the hard work of President George W Bush."