The first two should be seen as prerequisites for the third. The first one especially.
Is it fair that libraries have inadvertently taken on the role of social care of the homeless? No, it's not. Should, as you put it, libraries be open to everyone to use as libraries? Yes, they should. However, the answer is not to shut the homeless out of yet another place, the answer is to push for cheaper, more comprehensive healthcare (i.e. single payer) so that we can address the problem head on.
I empathize, but this is destructive. Deciding we can't have [basic service that worked fine not long ago] until we have [complete change of heart about philosophical and policy questions at the core of people's political identities] will only run civilization into the ground.
If a homeless encampment appears on a public transit mainline, should we shut down the city's transit system until poverty is eradicated worldwide?
Our civilization is certainly low, but it could fall a lot further.
Societies are a bit like networks, they're only as strong as their weakest link.
I love libraries. If someone is reading a book or a magazine or even surfing Facebook on a computer I don't care what they look like, smell like, or whether or not they go back to an apartment at the end of the day.
My city has a beautiful library. They also have very liberal policies, afaik people aren't turned away.
But those tables you'd like to read a magazine at? Full of people camped out, possessions spread around them, talking, dealing.
Those isles of books? Now they are also beds.
It's really an asshole move to assume that if anyone at any point doesn't want their library turned into a shelter, then they are heartless people who hate the poor and mentally ill.
I want better health care in this country. I want better support for ensuring that everyone had a roof over their head. I also want to read a book in the library without being hassled or smelling excrement.
Libraries should be open to everyone to use as libraries.