When a system for retiring allowances has been agreed upon by the local legislative body and the library board and formally adopted by the former, then it shall be the duty of said local legislative body to raise by taxation each year, the sum found necessary to produce the retiring allowance fund required by the system adopted.