This looks like a GEOS bug (#535). As a work around, try fetching a development snapshot that appears to solve this issue:
svn co http://svn.osgeo.org/geos/trunk@3960 geos-svn
cd geos-svn
./autogen.sh
./configure
make
make check
If the last command throws any similar errors, consider contributing feedback to the bug report. But if all is good, then it should be good for shapely. As root:
make install
ldconfig