[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Force Heimdal to use it's own libcom_err / Building .a's with -fPICfor x86_64



Hello,

How does one tell Heimdal to use it's own libcom_err and NOT use the
one on the local system?

I don't know very much about autoconf but from glancing at the macros
it doesn't look like there's a --without-com_err. Is that true?

I'm building one big .so from all the .a files like:

gcc -shared -Wl,-soname,libfoo.so.2 [...] -Wl,--start-group,/ioplex/heimdal/lib/libkrb5.a,/usr/lib/libcom_err.a,/ioplex/heimdal/lib/libasn1.a,[...],/ioplex/heimdal/lib/gss/libmech_spnego.a,--end-group -o libfoo.so.2

Technically everything in the .a's should be PIC but it actually works
fine on i386 if it's not. But on x86_64 it *does* matter that everything
be PIC. If it's not you get an error like:

/usr/bin/ld: /usr/lib/libcom_err.a(com_err.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
/usr/lib/libcom_err.a: could not read symbols: Bad value

I added -fPIC to CFLAGS for heimdal and that works fine but if the system
libcom_err.a is used, of course not PIC and I get the above error.

Any ideas?

Mike

-- 
Michael B Allen
PHP Active Directory Kerberos SSO
http://www.ioplex.com/