One of the main points of legalization is harm reduction.
Ruining people's lives by charging them with crimes, subjecting them to the most dangerous environment in the world (prison), potentially causing them to get blacklisted from employment forever, forcing everyone to pay ever more tax dollars for ever more government police state powers and abuses while the "meth epidemic" and the "violence in Mexico" continues to worsen, etc. are far more harmful to individuals and society as a whole than just letting people buy the damn stuff in a pharmacy.
Sign a waiver so that you can't sue the pharmacist for any consequences of using the drug and that you were provided and understood either written or verbal instructions on how to dose correctly. Pay the piddly little $10/gram that methamphetamine, cocaine, MDMA, or heroin, or whatever the heck you want would actually cost in a minimally regulated open market (basically the only rule needs to be--what's in the bottle must be what's printed on the label), and go your merry way with 10x less incentive to commit the crime of theft to support your habit IF you get addicted, and far better chances of being able to be employed and live a "normal" (responsible) life since you won't be getting hauled off by Mr. Officer.
In fact--you will be less likely to get addicted at all, since more addictive means of administration are actually economic optimizations that people do because of the high price of black market drugs! Ie., taking meth in pill form is far less addictive than smoking or injecting, and users will be more likely to use it in pill form if it is legal and inexpensive.
Additionally, rather than 20000 pages of new laws trying to prevent kids from getting it (with the real intention being to ensure that the police/prison/industrial complex STILL has a continual supply of new arrestees and inmates), let's just keep this really simple: The waiver can include a statement that you may be sued for damages if you transfer or sell the drug to a child (other than an immediate family member--can't have mom and pop getting sent up the river if Jr. cracks the medicine lockbox), and/or criminal charges of misdemeanor (not felony!!!) reckless endangerment if you intentionally transfer or sell the drug to a child who subsequently commits a crime, becomes addicted, or suffers a medically harmful consequence.
The fundamental problem here is that: people want to use drugs.
It's something about how our brains work. It's not that different from why we desire and have sex. No, from the perspective of our brains, reproduction is irrelevant. We want the high--the stimulation of the dopamine reward circuits, and the other chemical responses.
Natural inclinations that do not directly lead to harming others (ie., acts that in and of themselves do not deprive others of life, liberty, or property, ) must never be made crimes!
Also, some "social problems" simply can't be "solved." Declare them solved by simply not defining them as problems anymore. Human society is not perfect.