Get them back on their feet?? Do you think they are homeless because they ran into some temporary setback? What do you think of these people that you think they are perfectly capable of living a normal life, but they hit some speedbump along the way and now they are too, what? How pathetic would they have to be if some accident of life left them permanently on the street? How little you must think of them!
Drug addiction and crippling mental illness effect over 95% of chronically homeless people. These are people struggling with things you and I can't even imagine coping with. I mean that, you and I can't fathom in any meaningful way what it means for our perceptions and judgments about the world to be completely unreliable. It's pretty much not possible to cope with hearing voices or having visual hallucinations or crippling addiction. You can't 'get them back on their feet', because they are not healthy enough to stand on their own, and we don't know (I mean the royal we, all of the medical and psychiatric expertise in the world is more or less helpless in the face of what they are suffering from) any way to make it better. In fact you can't merely offer them help, because they very often aren't mentally stable enough or responsible enough to accept it.
The best thing we can offer them is long term support. We can give them food and warm/clean clothing, offer medical care, and respond when they have an emergency. We can offer them safe shelter and mental health care, that is, when they are in a mental state such that they will accept it.
We can scrape them off the sidewalk when they OD, and we can temporarily put them in a hospital when they are so unstable that they are very likely to cause injury to themselves or others. Of course, there is a fine line in such paternal actions, at some point we are violating their humanity when we give them involuntary help. Sometimes the best systems we can create to do so end up being worse on the whole than doing nothing (institutionalization of the mentally ill for example).
That is the state of the art. Someday we, as a society and civilization, will be able to tend to the least fortunate in more effective ways, but what I described is literally the best we know how to do right now. Of course everyone, even us greedy Silicon Valley types, have a strong desire to make this better, but unfortunately nobody knows how to do it. We are spending HUGE amounts of money, and besides reducing suffering a little, we aren't able to achieve much more.