[lug] building shared libraries

D. Stimits stimits at comcast.net
Sat Jul 16 19:04:07 MDT 2005


Ok, I know my library is being built on FC4 with
-fPIC -shared -Wl,-export-dynamic,-soname

There is absolutely zero possibility it is not.

rpmlint is complaining:
E: libMyLib shlib-with-non-pic-code /usr/lib/libMyLib.so.0.0.0

I've begun disassembling the source to rpmlint, since no documentation 
is available on this. It claims at one point:
'shlib-with-non-pic-code',
'''The listed shared libraries contain object code that was compiled
without -fPIC. All object code in shared libraries should be
recompiled separately from the static libraries with the -fPIC option.


rpmlint is dead wrong, but I don't know of any way to confirm that. Does 
anyone here know of a way to guarantee a library was built -fPIC...or a 
way to test it after it has been built? Is there some other -fPIC that I 
don't know of that rpmlint might be thinking of? Perhaps it's just a bug 
due to gcc 4, but I'm spinning my wheels and getting nowhere, I need 
somewhere to start, and getting very desperate.

D. Stimits, stimits AT comcast DOT net



More information about the LUG mailing list