Revert "ant check: fix buildtools ldlibs flag, and python encoding."

This reverts commit b3a5b5549fc5b78fbc68e483ca2ffe47afdf546a.
Revert "build: fix ant check errors in build and ipc."

This reverts commit 0bf9ff6cf09c9f900be4c4fe1d3d8e4bb610afaa.