Is it possible to build planet-sized non-spherical structures? Beyond certain size and density the celestial objects tend to admit a spherical size. 
I wonder if is there a fundamental mass, density or specific strength related number which when surpassed a non-spherical structure inevitably collapse to a spherical mass?
Or put in another way: can an advanced civilization build an enormous starship that's as massive as Earth but have disc or a cylindrical shape?
 A: The answer to this question is fairly simple, yet complicated. The reason why planets are planet sized objects form a spherical shape is due to the immense force of gravity. Looking at the force of gravity:
$F_g = G{(\rho v)^2 \over r^2}$
As something obtains more mass it generates a stronger gravitational field. If you decide to build a spacecraft as large as a planet, most likely it won't have the same density as a planet does, and therefore wont generate a strong enough gravitational force to 'flatten' all edges to a fairly spherical shape. Large volume, but small overall density. I assume this planet-sized spacecraft will contain empty space as well for people to go about their business.
So to answer your question you most likely would be able to build a planet sized spacecraft without the force of gravity being a big deal. So have at it, and have fun building. Good luck with funding ha.
A: By definition, an object with the mass of a planet will collapse into a sphere. This is primarily due to the IAU definition of 'planet' specifying that a celestial body must be massive enough to pull itself into a sphere by gravity.
Now, if you were asking about volume instead of mass, I could point out that an occupied spaceship would have to be largely filled with light gasses and so could theoretically be the same size as a small planet while being a lesser mass and thus prevent collapse. There also is a large difference between a large conglomerate object that forms by falling together and a large engineered structure designed to not fall together.
A: Stars are gaz and plasma, planet can be considered as fluid or deformable material (and have pretty liquid early stage), so spherical shape is natural.
The question is, is it physically possible to have materials that keeps rigid (or could make rigidifying structures) up to these orders of mass. I don't know if the answer can even be known, as I'm not sure we can really predict all the mechanical charasteristics of all mix and arrangements of all possible atoms, including unknown alloys and cristal forms.
Plus, beside passive structure, you could have active structures with the help of magnetic fields, coolers, adaptive motion, or even constant rebuilding (as in living cells).
Anyway, I'm curious: how could this question possibly be homework ? :-)
