Gamecube was a great console, but, in terms of 3rd party support it paid the overdue price for nintendo's poor treatment of 3rd party developers during the nes/snes era (and to an extent the n64 did too). Which led to many gamer's abandoning a console that was less expensive and arguably more powerful than the winning competition: the ps2. And coming in 3rd, in the eyes of gamers, in the 6th gen console wars.
However, commercially, the story's a bit different.
While the media likes to prop gamecube up as a failure to contrast it to Wii's success, commercially it was a success due to strong 1st party sales and Nintendo's common sense business model aka "let's make a profit on the actual console we sell (not just the games), and lets do that as soon as it hits the market, not several years down the road."
You could say xbox won by about 3 miliion units. But commercially, gamecube ranked far higher. Gamecube's profits may have been FAR below PS2 numbers, but, unlike xbox, the system didn't incur millions in losses.
For nintendo, gamecube was a success. A modest success, but successful nontheless.