The bug that allowed visitors to walk off with books and goblets was fixed for 42.05.
BOOKS don't teach dwarves skills- discussions, pondering, and learning from a master will (all scholar stuff). Reading just increases reader and maybe student skills. So a text on bandaging won't train "wound dressing" but it will improve student.
Practically, libraries are just there to help with stress and satisfy intellectual needs (Urist McMiller felt SATISFIED after learning about Source Reliability!). So you generally won't set up a library util the first caravan arrives and you buy a couple books off them. They can be expensive, but its seriously a good idea to buy at least a single book from the first caravan. Then you set up a library and just about everyone will take their turn with the book. Scholars (especially untrained ones) take forever to right nothing, so you don't want your weaponsmith "unfocused" from lack of reading when hes trying to make steel masterwork axes.
The next use is for your medical staff. The skill gains from scholarly discourse might as well be non-existant. I'm talking about scholars that spend years without getting past NOVICE critica thinking. However, all these "nickels and dimes" to experience will prevent skill rust on lesser used labors, like medicine. If you embark with a doctor in case of emergencies, you can assign him as your sole scholar after you've gotten enough migrants to retire him from hauler duty. He'll argue with visiting scholars, and might even write some books. When you need him to actually start doctorin', you have to unassign him as a scholar though.
Last, its a population dump. The military is a more effective one, but you don't need 150 soldiers. 100 is usually more than plenty. Better yet, military training improves student/teacher levels that help with increased learning from mentorships. So you can 'retire" military squads into your library. They should all gain masters from more skilled scholars, and receive faster training this way. Then, if some major !FUN! eats up the rest of your military, you can redraft the "student-warriors" back into military service. Bonus points if you only do this with naked "wrestlers" for that ancient Greek philosopher vibe :p
So in a typical fort, don't bother even carving out a library until the first caravan. Then buy a few books (at least one). This is a fairly important step, as dwarves can gain crafting debuffs equal to hungry/tired/thirsty from not satisfying a need... like for learning. You don't want your weaponsmith "unfocused/distracted" from not getting to read while trying to forge steel axes. You can't count on untrained scholars or visiting sages to just write books for you either. You can usually get a cheap 200-300 buck copy to last you for now. Then you either assign any medical dwarfs as scholars, or retire high-level mechanics and furnace operators when you can spare replacements. Finally, once you have at least 3-5 squads training, you can start diverting new recruits to the library over more soldiers. In particular, don't send dwarves that hate abstract thinking to the library nor send dwarves that find military training disrespectful to the military.