The use of smaller subapertures on some recent adaptive optics (AO) systems seems to yield difficulties in wavefront reconstruction, known as spider effect or pupil fragmentation: the size of the subapertures is small enough so that some of them are masked by the telescope spider, dividing the pupil into disconnected domains. In particular, this problem will arise on the E-ELT.We have studied pure wavefront reconstruction on a Shack-Hartmann wavefront sensor, for a simplified AO system similar to VLT/SPHERE in size, with and without pupil fragmentation, and compared the performance of various wavefront reconstructors for different signal-to-noise ratios, using priors (minimum variance) or not (least-squares), and with different assumptions for the damaged wavefront measurements. The missing measurements have been either discarded (corresponding subapertures are not active), replaced by zeros, or interpolated by preserving the loop continuity property of the gradients (curl operator). Priors have been introduced using the FrIM (Fractal Iterative Method) algorithm. In our perfect conditions, we show that no method allows the full recovery from the pupil fragmentation, that minimum variance always gives the best performance, especially the one without any interpolation. On the opposite, the performance with least-squares somewhat improves when correcting for the missing measurements. In this latter case, preserving the curl property of the gradient is preferable only for very low measurement noise.