ccache and some compile fixes