[Python-bugs-list] [ python-Bugs-526298 ] _socket unimportable

noreply@sourceforge.net noreply@sourceforge.net
Wed, 06 Mar 2002 14:01:25 -0800


Bugs item #526298, was opened at 2002-03-06 09:55
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=526298&group_id=5470

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Crispin Wellington (wongfeihung)
Assigned to: Nobody/Anonymous (nobody)
Summary: _socket unimportable

Initial Comment:
During build get the following a number of times

building '_socket' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC 
-DUSE_SSL=1 -I. -I/bigfree/Python-2.2/./Include 
-I/usr/local/include -IInclude/ -c 
/bigfree/Python-2.2/Modules/socketmodule.c -o 
build/temp.linux-i686-2.2/socketmodule.o
gcc -shared 
build/temp.linux-i686-2.2/socketmodule.o 
-L/usr/local/lib -lssl -lcrypto -o 
build/lib.linux-i686-2.2/_socket.so
WARNING: removing "_socket" since importing it 
failed

_socket.so builds ok. Trying to import it gives...

Python 2.2 (#2, Mar  6 2002, 16:22:26) 
[GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
Type "help", "copyright", "credits" or "license" 
for more information.
>>> import _socket
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: ./_socket.so: undefined symbol: 
RAND_add

System info:

uname -a
Linux water 2.2.18pre21 #1 Thu Mar 8 18:04:07 WST 
2001 i686 unknown

openssl version
OpenSSL 0.9.6 24 Sep 2000

More info email Crispin Wellington 
<crispin@aeonline.net>


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-03-06 23:01

Message:
Logged In: YES 
user_id=21627

I believe this problem does not need fixing for Python 2.2.
Anybody running into can either update the SSL version, use
modify Modules/Setup; that setup.py tries to build all
extensions is merely for convenience.

As MAL says, this is fixed for 2.3.

----------------------------------------------------------------------

Comment By: M.-A. Lemburg (lemburg)
Date: 2002-03-06 10:42

Message:
Logged In: YES 
user_id=38388

In Python 2.3, the socket module setup was made smarter 
and the SSL support is now optional in the sense that if
the module fails to import (e.g. due to version problems with
the installed SSL libs), socket still imports but without SSL
support.

----------------------------------------------------------------------

Comment By: Crispin Wellington (wongfeihung)
Date: 2002-03-06 10:07

Message:
Logged In: YES 
user_id=329215

got it working. Had to uncomment one of the _socket lines 
in setup. Im surprised the default non-SSL one isn't 
uncommented by default. Perhaps it should be.



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=526298&group_id=5470