X509_PUBKEY_get 0x7d8
/usr/local/ssl/lib/libcrypto.a(x_pubkey.o)
X509_PUBKEY_get 0x3a8
/usr/local/ssl/lib/libcrypto.a(x509_req.o)
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status
skipping /export/home/sam/src/Python-2.2.2/Modules/socketmodule.c
(build/temp.solaris-2.8-sun4u-2.2/socketmodule.o up-to-date)
gcc -shared build/temp.solaris-2.8-sun4u-2.2/socketmodule.o
-L/usr/local/ssl/lib -L/usr/local/lib -Wl,-R/usr/local/ssl/lib -lssl
-lc
rypto -o build/lib.solaris-2.8-sun4u-2.2/_socket.so
WARNING: building of extension "_socket" failed: command 'gcc' failed
with exit status 1
skipping 'dbm' extension (up-to-date)
There does not seem to be much info here. Is there any way I can get
more info as to solve the problem?
Sam
That is the problem: You are linking a shared library, but some of your
code (the OpenSSL code) is position-dependent, when it should be
position-independent (PIC).
You have the following options:
1. Accept the failure; your Python installation won't support sockets.
2. Build the socket module without SSL support. To do so, edit
Modules/Setup.
3. Rebuilt OpenSSL for position-independent code. To do so, either
a) build openssl with --enable-shared, and link the socket module
with the shared library, or
b) manually add -fPIC/-KPIC when building OpenSSL. This will still
give a static library, but it will be PIC.
4. Work around the failure, by telling the linker that it is ok to
incorporate PIC code to a shared library. To do so, either
a) Use the system compiler (SunPRO/Forte/SunONE)) instead of
gcc, or
b) Use gnu binutils instead of the system linker, or
c) Manually add -mimpure-text to the C compiler flags for linking.
If you want to know why a certain alternative solves this problem, just
ask. There are a few options that also appear to solve the problem but
don't, namely
4 d) Use the system linker instead of gcc for linking
e) Use -G instead of -shared for linking
HTH,
Martin
Andrew
--On Sunday, January 12, 2003 10:30:07 -0800 Sam Carleton
<nos...@miltonstreet.com> wrote: