PIC means Position Independent Code. Shared libraries should always be compiled into PIC object files. This example shows how to do it.