>
>----- Original Message ----- 
>From: "Andy Polyakov via RT" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Cc: <openssl-dev@openssl.org>
>Sent: Sunday, May 20, 2007 4:42 PM
>Subject: Re: [openssl.org #1521] bug report
>

>> Title: Failed to link static openssl libraries (or non-PIC x86_64cpuid.s)
>> OS: FC4
>> HARDWARE: AMD x86 64bit
>> OPENSSL VERSION: 0.9.8e
>> OPTIONS:
>> CFLAGS="-fPIC -O2" ./config no-dso no-shared no-threads
>> no-zlib -fPIC -O2 --prefix=/home/dmitri/php/install
>>
>> Details:
>> It worked just fine with all 0.9.7*. Since 0.9.8 an attempt to link 
>> against
>> static openssl like below
>> gcc -shared  dbg.lo dbg_bp.lo dbg_cmd.lo dbg_net.lo dbg_ser.lo 
>> dbg_prof.lo
>> dbg_sec.lo
>> bg_logo.lo  -L/home/dmitri/php/install/lib -lssl -lcrypto  -Wl,-rpath 
>> -Wl,/home/dmitri/php/install/lib
>>  -Wl,-soname -Wl,dbg.so -o .libs/dbg.so
>>
>> returns with error:
>>
>> /usr/bin/ld: /home/dmitri/php/install/lib/libcrypto.a(x86_64cpuid.o):
>> relocation R_X86_64_PC32 against `OPENSSL_cpuid_setup' can not be used 
>> when
>> making a shared object; recompile with -fPIC
>
>Use -Bsymbolic to link your shared object, add -Wl,-Bsymbolic to your
>gcc command line. In the nutshell this means that OpenSSL calls your
>library makes can't be overridden by another copy of OpenSSL mapped into
>application address space. Ideally you should also abstain from
>exporting any OpenSSL symbols from your shared object.
>
>One can argue whether or not this is a bug, as OPENSSL_cpuid_setup is an
>internal interface and another shared object should not be able to
>override it. Well, there is another way to resolve it, but not in the
>context of this ticket. I'm dismissing this. A.
>

Hello Andy,

Thanks for the feedback on the issue.
And no, my library does not export anything that might raise any kind of 
conflicts with OPENSSL. Moreover, it works great under all other platforms, 
including FreeBSD 4.1/x86, Win32, Linux 2.4/x86, Mac OSX 10.4/powerpc. Seems 
that the problem happens under Linux2.6 (FC4)/64bit AMD or with gcc shipped 
with FC4.
Also, I have some doubts. It all worked fine with openssl 0.9.7 under the 
same platform/ditro. Do you have an idea why it did not conflict and why it 
started conflicting with 0.9.8?

I'll try to link my library with -Bsymbolic option soon.

Thanks,
Dmitri.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to