David Kirkby <david.kir...@onetel.net> added the comment:

Hi,

thank you for the patch. 

I hope you can keep Python building the same modules on Solaris as Linux, as 
that would be a real shame if it did not. This module is used in the Sage maths 
software. 

I had some difficulty applying your patch using the 'patch' command. 'patch' 
just kept rejecting the file. Finally I gave up and patched it manually. 

It did not completely solve the problem as PACKET_FASTROUTE and PACKET_LOOPBACK 
were undeclared too

building '_socket' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I. -I/export/home/drkirkby/Python-2.6.5/./Include -I. 
-IInclude -I./Include -I/usr/local/incl
ude -I/export/home/drkirkby/Python-2.6.5/Include 
-I/export/home/drkirkby/Python-2.6.5 -c 
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c -o 
build/temp.solaris-2.11-i
86pc-2.6/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.o
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c: In function 
‘init_socket’:
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4597: error: 
‘PACKET_LOOPBACK’ undeclared (first use in this function)
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4597: error: (Each 
undeclared identifier is reported only once
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4597: error: for each 
function it appears in.)
/export/home/drkirkby/Python-2.6.5/Modules/socketmodule.c:4598: error: 
‘PACKET_FASTROUTE’ undeclared (first use in this function)
building '_ssl' extension

However, I decided to alter the Modules/socketmodule.c further and finally 
_socket built. I don't however know how to test _socket, so I don't know if it 
working or not. (I'm not a python programmer - just about to start learning 
it). But using

drkir...@hawk:~/Python-2.6.5$ ./python
Python 2.6.5 (r265:79063, May 29 2010, 21:17:44) 
[GCC 4.4.4] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import _socket
>>> 

it would appear its not completely broken. 

BTW, for the record, the hardware is a Sun Ultra 27 (quad core Xeon) running 
OpenSolaris 06/2009 which has been updated to build 134. 

drkir...@hawk:~$ cat /etc/release
                       OpenSolaris Development snv_134 X86
           Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                             Assembled 01 March 2010

I've built Sage on Solaris 10 (on SPARC hardware), so I don't think this patch 
is needed on Solaris 10, though I've not checked on Solaris 10 using Intel/AMD 
hardware. 

Dave

----------
Added file: http://bugs.python.org/file17497/socketmodule.c.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8852>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to