If you want to fix (build) issues in the Sage library, the best thing to do is just to go in and fix the changes in $SAGE_ROOT/devel/sage-main and then run$SAGE_ROOT/sage -b. If you want to make a new spkg from $SAGE_ROOT/devel/sage-main, you can always do sage -sdist. When working with the Sage library spkg, it's best to just avoid the$SAGE_ROOT/spkg/build directory since that's not where the actual build occurs.