BASE_DIR should point to, well, the base dir, not the dir containing the compile script.