compile fix for cpp and ruby