ld unpredictable lookup failure building shared library
Ian Lance Taylor
iant@google.com
Sat Apr 21 01:04:00 GMT 2012
"James K. Lowden" <jklowden@schemamania.org> writes:
> I'm attempting to build clang on x86_64. ld fails to look up a symbol
> from std::string, recommending -fPIC, but file(1) reports the object
> file is relocatable.
Relocatable is not the same as -fPIC Relocatable just means relocatable
at link tie. The -fPIC option constructs an object file that is
relocatable at runtime. Have you tried actually using the -fPIC option
when compiling the file?
Ian
More information about the Binutils
mailing list