I had a similar issue on OS X which I resolved using the the install_name switch instead of soname.
gcc -shared <files> -lc -Wl,-install_name,<libname>.so, -o <libname>.so.1
I had a similar issue on OS X which I resolved using the the install_name switch instead of soname.
gcc -shared <files> -lc -Wl,-install_name,<libname>.so, -o <libname>.so.1