This is not a permanent remedy, but it works for a blockage or compaction. My cat is 19 years old, and has trouble with constipation. Her stools are often dry and come out in small pieces, and she strains when she needs to eliminate.
Once I had someone else look after her while I went on a trip for a month, and during that time she got compacted to the point that she lost her appetite and stopped eating. When I got back she was very weak and had lost a lot of weight, and she was no longer cleaning herself. Her caretaker thought she was failing because of her age -- in fact, he was scared that she was about to die -- and he had started to forcefeed her with a liquid diet. She wasn't pooping, but she did dribble a little liquid poop. It occurred to me that the small amount of liquidy poop might not be the result of her liquid diet, but instead be coming from a compaction in her colon.
I mixed powdered magnesium citrate in some water and force fed her that with a syringe. Lo and behold, she pooped a lot the very next day, and started to show some interest in eating again. Little by little she started to eat more and poop again, and she became stronger and stronger until she was back to her old self. Occasionally it happens now that she goes a few days without pooping. She usually loses her appetite when that happens. I immediately give her the magnesium citrate, and she is back to normal again. Sometimes I don't give her enough and I have to do it a second time. I wish I could find something to put in her food every day instead -- that would be a lot better, I'm sure, but she is so finicky. Canned pumkin won't do, but I think I will try aloe if it is tasteless. Still, magnesium citrate works when the constipation is so bad that there is a blockage.