Python 2.3.2 Compile problems on Solaris 7.

J

Jeremy Fincher

I'm having problems compiling Python with socket support (and support
for several other libraries) on Solaris 7.

When I do the standard ./configure, make, make install dance, I got a
fully compiled Python without an _socket module.

So I uncommented the appropriate socketmodule.c line in Modules/Setup,
and recompiled.

I get this:

gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.
-I./Include -DPy_BUILD_CORE -c ./Modules/socketmodule.c -o
Modules/socketmodule.oIn file included from
Modules/socketmodule.c:293:
Modules/getnameinfo.c: In function `fake_getnameinfo':
Modules/getnameinfo.c:173: warning: implicit declaration of function
`inet_ntop'Modules/getnameinfo.c:174: warning: comparison between
pointer and integer
Modules/getnameinfo.c:206: warning: comparison between pointer and
integer
Modules/socketmodule.c: In function `socket_inet_pton':
Modules/socketmodule.c:2972: error: `AF_INET6' undeclared (first use
in this function)Modules/socketmodule.c:2972: error: (Each undeclared
identifier is reported only onceModules/socketmodule.c:2972: error:
for each function it appears in.)
Modules/socketmodule.c: In function `socket_inet_ntop':
Modules/socketmodule.c:3016: error: `INET_ADDRSTRLEN' undeclared
(first use in this function)Modules/socketmodule.c:3046: warning:
assignment makes pointer from integer without a
castModules/socketmodule.c:3016: warning: unused variable `ip'
*** Error code 1
make: Fatal error: Command failed for target `Modules/socketmodule.o'

I even tried copying the socketmodule.c from the 2.3b1 source code
(which we had been using until now, which supported sockets on our
machine) and recompiling to no avail.

That's the major problem I'm having and need to solve.

Aside from that, I'm also getting hundreds of errors like this:

<unknown> 0x1c60
/usr/common/lib/libncurses.a(lib_tparm.o)

with several libraries, including curses and ssl.

This is the first real compilation error I've ever had with Python,
and I don't know what to do from here. Any help is appreciated :)

Thanks,
Jeremy
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Jeremy said:
This is the first real compilation error I've ever had with Python,
and I don't know what to do from here. Any help is appreciated :)

You should try to analyse the problem, taking one problem at a time.
To do so, you need to read the error message, and try to match it to
the source code you got. Then a solution may become apparent.

Looking at the first non-warning message:

Modules/socketmodule.c: In function `socket_inet_pton':
Modules/socketmodule.c:2972: error: `AF_INET6' undeclared (first use
in this function)Modules/socketmodule.c:2972: error: (Each undeclared
identifier is reported only onceModules/socketmodule.c:2972: error:
for each function it appears in.)

What is line 2972 of socketmodule.c? In my copy, it reads

#ifndef ENABLE_IPV6
if(af == AF_INET6) {
PyErr_SetString(socket_error,
"can't use AF_INET6, IPv6 is disabled");
return NULL;
}
#endif

So the error would go away if ENABLE_IPV6 was not defined. Does this
ring a bell?

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top