In an apparent appeal to his political opponents who are preparing to impeach him, Musharraf called for political reconciliation in Pakistan.
Musharraf told a function on the eve of independence day that there was a "conspiracy" to weaken the country.
"It's my appeal that we should adopt a reconciliatory approach so that stability should return," he said.
"Because if there is stability we can fight terrorism, if we have a strong economy we can fight terrorism, and we should all put aside our differences and work to make Pakistan strong."
Gilani, in his independence day speech, also said that " the country must defeat extremisim to survive".
"Pakistan is passing through a difficult phase. We have to fight back the challenges of terrorism and extremism," he said.
"The war against terrorism and extremism is the war of our own survival. With the people's co-operation we will fight this war and ensure the government's writ at all costs."
Vote of confidence
Musharraf's appeal came hours after legislators in southern Sindh province became the third of Pakistan's four provincial assemblies to approve a motion calling on Musharraf to face a vote of confidence or else be impeached.
Coalition leaders Asif Ali Zardari, the widower of Benazir Bhutto, the slain former prime minister, and Nawaz Sharif, another former prime minister, said last Thursday that they would seek the president's impeachment.
Al Jazeera's Kamal Hyder, reporting from Islamabad, said that the key question is where the government is headed.
"While there are celebrations ... song and dance is happening ... violence continues in the tribal areas, and the government, despite the Musharraf issue, is under pressure to control and ultimately end the violence," he said.
Syed Mohammed Tarik Pirzada, a political analyst, told Al Jazeera that the coalition has never been more united against Musharraf.
"The army which was his real power base cannot support him anymore because he has become a liability," he said.
"Also among the masses he is unpopular and has no credibility left."
Amid the uncertainty over Musharraf's political future, there has been no let-up in the violence.
A suicide bomber blew himself up outside a police station in Lahore on Wednesday during preparations for the independence-day celebrations, killing at least seven people, police said.
The blast hit a crowd of policemen standing guard at the station on the outskirts of the eastern city, witnesses said.
There was no immediate claim of responsibility but security officials said they believed the blast was probably in revenge for an offensive against pro-Taliban fighters in the tribal areas bordering Afghanistan.