Python 2.3.2 Compile problems on Solaris 7.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy Fincher

    Python 2.3.2 Compile problems on Solaris 7.

    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.oI n file included from
    Modules/socketmodule.c: 293:
    Modules/getnameinfo.c: In function `fake_getnamein fo':
    Modules/getnameinfo.c:1 73: warning: implicit declaration of function
    `inet_ntop'Modu les/getnameinfo.c:1 74: warning: comparison between
    pointer and integer
    Modules/getnameinfo.c:2 06: warning: comparison between pointer and
    integer
    Modules/socketmodule.c: In function `socket_inet_pt on':
    Modules/socketmodule.c: 2972: error: `AF_INET6' undeclared (first use
    in this function)Module s/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_nt op':
    Modules/socketmodule.c: 3016: error: `INET_ADDRSTRLE N' undeclared
    (first use in this function)Module s/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(li b_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
  • Martin v. Löwis

    #2
    Re: Python 2.3.2 Compile problems on Solaris 7.

    Jeremy Fincher wrote:
    [color=blue]
    > 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 :)[/color]

    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_pt on':
    Modules/socketmodule.c: 2972: error: `AF_INET6' undeclared (first use
    in this function)Module s/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

    Comment

    Working...