IRIX MipsPro compiler chokes on Python.h

Discussion in 'Python' started by Bram Stolk, May 24, 2005.

  1. Bram Stolk

    Bram Stolk Guest

    Hi there,

    I just built and installed Python-2.4.1 on my Irix machine.
    My compiler, the MipsPro compiler, chokes on the Python.h include file,
    as demonstrated here:


    $ CC -v
    MIPSpro Compilers: Version 7.41
    $ python -V
    Python 2.4.1
    $ cat l.cxx
    #include <Python.h>

    int main()
    {
    return 0;
    }

    $ CC -I $HOME/include/python2.4 l.cxx
    cc-1311 CC: ERROR File = /usr/include/sys/time.h, Line = 186
    The indicated linkage specification is incompatible with previous "select"
    (declared at line 479 of "/usr/include/unistd.h").

    static int select(
    ^

    1 error detected in the compilation of "l.cxx".

    Has anyone experienced the same?
    How do I solve this?

    Thanks,

    Bram Stolk
     
    Bram Stolk, May 24, 2005
    #1
    1. Advertising

  2. On Tue, 24 May 2005 13:20:01 +0200, Bram Stolk <>
    declaimed the following in comp.lang.python:

    > $ cat l.cxx


    Isn't ".cxx" a "C++" indicator? I think Python is just plain C,
    so you'd have to wrap everything to indicate C style naming in the
    compiler output.

    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.netcom.com/> <
     
    Dennis Lee Bieber, May 24, 2005
    #2
    1. Advertising

  3. Bram Stolk wrote:
    > Hi there,
    >
    > I just built and installed Python-2.4.1 on my Irix machine.
    > My compiler, the MipsPro compiler, chokes on the Python.h include file,
    > as demonstrated here:
    >
    >
    > $ CC -v
    > MIPSpro Compilers: Version 7.41
    > $ python -V
    > Python 2.4.1
    > $ cat l.cxx
    > #include <Python.h>
    >
    > int main()
    > {
    > return 0;
    > }
    >
    > $ CC -I $HOME/include/python2.4 l.cxx
    > cc-1311 CC: ERROR File = /usr/include/sys/time.h, Line = 186
    > The indicated linkage specification is incompatible with previous "select"
    > (declared at line 479 of "/usr/include/unistd.h").
    >
    > static int select(
    > ^
    >
    > 1 error detected in the compilation of "l.cxx".
    >
    > Has anyone experienced the same?
    > How do I solve this?


    My suspicion would be directed to a #define that is incorrect, as the
    snippet above suggests that select() appears in two system headers
    (/usr/include/sys/time.h & /usr/include/unistd.h).

    That is ./configure got something wrong and may need to be modified for
    your platform to sort this out properly, but modifying pyconfig.h to
    correct the incorrect definitions should get you out of trouble.

    -------------------------------------------------------------------------
    Andrew I MacIntyre "These thoughts are mine alone..."
    E-mail: (pref) | Snail: PO Box 370
    (alt) | Belconnen ACT 2616
    Web: http://www.andymac.org/ | Australia
     
    Andrew MacIntyre, May 25, 2005
    #3
  4. Bram Stolk

    Bram Stolk Guest

    Dennis Lee Bieber wrote:
    > On Tue, 24 May 2005 13:20:01 +0200, Bram Stolk <>
    > declaimed the following in comp.lang.python:
    >
    >
    >>$ cat l.cxx

    >
    >
    > Isn't ".cxx" a "C++" indicator? I think Python is just plain C,
    > so you'd have to wrap everything to indicate C style naming in the
    > compiler output.


    extern "C"
    {
    #include <Python.h>
    }

    ....gives the same result.

    Bram

    >
     
    Bram Stolk, May 25, 2005
    #4
  5. Bram Stolk

    Bram Stolk Guest

    Andrew MacIntyre wrote:

    > My suspicion would be directed to a #define that is incorrect, as the
    > snippet above suggests that select() appears in two system headers
    > (/usr/include/sys/time.h & /usr/include/unistd.h).


    thanks for the info.
    I need to undef the following from my pyconfig.h to make it pass the
    compiler:

    HAVE_SYS_TIME_H
    TIME_WITH_SYS_TIME

    Bram


    > That is ./configure got something wrong and may need to be modified for
    > your platform to sort this out properly, but modifying pyconfig.h to
    > correct the incorrect definitions should get you out of trouble.
    >
    > -------------------------------------------------------------------------
    > Andrew I MacIntyre "These thoughts are mine alone..."
    > E-mail: (pref) | Snail: PO Box 370
    > (alt) | Belconnen ACT 2616
    > Web: http://www.andymac.org/ | Australia
     
    Bram Stolk, May 25, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Evan David Light
    Replies:
    6
    Views:
    466
    David Anderson
    Dec 1, 2003
  2. Christopher M. Lusardi
    Replies:
    4
    Views:
    448
    Thomas Matthews
    May 13, 2004
  3. r5
    Replies:
    0
    Views:
    316
  4. William Payne

    New compiler chokes on template class

    William Payne, Aug 21, 2004, in forum: C++
    Replies:
    3
    Views:
    379
    Old Wolf
    Aug 22, 2004
  5. Johannes Bauer

    Python HTML parser chokes on UTF-8 input

    Johannes Bauer, Oct 9, 2008, in forum: Python
    Replies:
    5
    Views:
    770
    John Nagle
    Oct 17, 2008
Loading...

Share This Page