[Python-bugs-list] [ python-Bugs-464423 ] _socket problem on solaris
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 23 Oct 2001 23:30:11 -0700
Bugs item #464423, was opened at 2001-09-24 07:37
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=464423&group_id=5470
Category: Build
Group: Python 2.1.1
>Status: Closed
>Resolution: Works For Me
Priority: 5
Submitted By: Bent Nagstrup Terp (bentterp)
Assigned to: Martin v. Löwis (loewis)
Summary: _socket problem on solaris
Initial Comment:
I can't get the _socket module to build on solaris 8
with gcc 2.95.3
The compilation doesn't produce any errors, only lots
of "warning: function declaration isn't a prototype",
mainly from openssl header files, but also some from
socketmodule.c itself:
/root/Python-2.1.1/Modules/socketmodule.c: In function
`PySocket_socket':
/root/Python-2.1.1/Modules/socketmodule.c:1921:
warning: function declaration isn't a prototype
/root/Python-2.1.1/Modules/socketmodule.c: In function
`PySocket_fromfd':
/root/Python-2.1.1/Modules/socketmodule.c:1959:
warning: function declaration isn't a prototype
But as they are only warnings and not errors,
compilation succeeds:
building '_socket' extension
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -DUSE_SSL=1
-I/usr/local/ssl/include -I.
-I/root/Python-2.1.1/./Include -I/usr/local/include
-IInclude/ -c /root/Python-2.1.1/Modules/socketmodule.c
-o build/temp.solaris-2.8-sun4u-2.1/socketmodule.o
<snip loads of warnings>
gcc -shared
build/temp.solaris-2.8-sun4u-2.1/socketmodule.o
-L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o
build/lib.solaris-2.8-sun4u-2.1/_socket.so
The socket library is being referenced in the toplevel
Makefile:
LIBS= -lpthread -lsocket -lnsl -ldl
-lthread
The errors only start to show up during 'make test':
test_asynchat
Exception in thread Thread-1:
Traceback (most recent call last):
File "/root/Python-2.1.1/Lib/threading.py", line 378,
in __bootstrap
self.run()
File "./Lib/test/test_asynchat.py", line 12, in run
sock = socket.socket(socket.AF_INET,
socket.SOCK_STREAM)
AttributeError: 'socket' module has no attribute
'socket'
test test_asynchat crashed --
exceptions.AttributeError: 'socket' module has no
attribute 'AF_INET'
<snip>
test test_socket crashed -- exceptions.AttributeError:
'socket' module has no attribute 'error'
Is there any other information that I could provide to
help?
with kind regards,
Bent Nagstrup Terp
Systemadministrator
Center for Genomics and Bioinformatics
Karolinska Instituttet
von Eulers Väg 8
171 77 Stockholm, Sweden
----------------------------------------------------------------------
>Comment By: Bent Nagstrup Terp (bentterp)
Date: 2001-10-23 23:30
Message:
Logged In: YES
user_id=329353
Unable to reproduce error after installing libs for gcc3.0.1
I know, that has nothing to do with it, but that's just
Solaris for you ;-)
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2001-09-26 10:44
Message:
Logged In: YES
user_id=21627
Try 'import _socket' and report what that does.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=464423&group_id=5470