Without enforcement (which history shows us is more than likely) illegal and legal wouldnt matter. A fence makes even tepid enforcement effective.
Immigration reform has always been the solution, regardless of whose reform wins out. If the US had allowed an adequate number of new citizens, guest workers, or a combination of the two, there would be no illegal problem.
As for the fence, it will be built and it will be a waste of money. But that was the agreement and it is more important to stick with the agreement.