Title: Build failure on IRIX
Type: compile error Stage: resolved
Components: None Versions: Python 2.7
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: kais58, neologix, vstinner
Priority: normal Keywords:

Created on 2011-07-01 21:29 by kais58, last changed 2011-09-01 00:30 by kais58. This issue is now closed.

File name Uploaded Description Edit
error.txt kais58, 2011-07-01 21:29
Messages (8)
msg139609 - (view) Author: (kais58) Date: 2011-07-01 21:29
I'm trying to build Python 2.7.2 on IRIX 6.5.30 and get the attached error in ./Modules/signalmodule.c
msg139613 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-07-01 22:14
That's because struct timeval is not defined by <sys/time.h> on IRIX, or it doesn't get included in Modules/signalmodule.c.

Can you try to compile the following code with the same compiler/options?

#include <sys/time.h>

int main(int argc, char *argv[])
    struct timeval tv;

    return 0;

By the way, is IRIX an officially supported platform?
msg139614 - (view) Author: (kais58) Date: 2011-07-01 22:23
./test.c: In function 'main':
./test.c:5: warning: unused variable 'tv'

is what it gives back.
msg139616 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-07-01 22:30
Ok, what happens if you change, in Modules/signalmodule.c

20 #ifdef HAVE_SYS_TIME_H     
21 #include <sys/time.h>
22 #endif


21 #include <sys/time.h>

and rebuild Python?
msg139617 - (view) Author: (kais58) Date: 2011-07-01 22:36
In file included from ./Modules/signalmodule.c:23:
/usr/include/sys/time.h:186: error: static declaration of 'select' follows non-static declaration
/usr/include/unistd.h:479: error: previous declaration of 'select' was here
make: *** [Modules/signalmodule.o] Error 1
msg139619 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-07-01 23:17
You can't include both <unistd.h> and <sys/time.h> on IRIX...
Nice one!

A couple suggestions (in this order):
1) try putting "#include <sys/time.h>" before "#include "Python.h""

2) try this:
20 #undef select
21 #include <sys/time.h>

3) fix the header yourself (remove the static storage class from select in <sys/time.h>)

4) complain loudly to your vendor...
msg143280 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-08-31 21:11
I'm closing, since IRIX header files seem terminally broken, and we can't do much about it.
Furthermore, I'm 99% sure IRIX isn't officially supported anymore.
msg143289 - (view) Author: (kais58) Date: 2011-09-01 00:30
Apologies for not getting back to you sooner, I discovered some more pressing issues with the machine regarding gcc, I'll try and fix/hack it together as I have found some possible fixes for the headers.
Date User Action Args
2011-09-01 00:30:46kais58setmessages: + msg143289
2011-08-31 21:11:15neologixsetstatus: open -> closed
resolution: wont fix
messages: + msg143280

stage: resolved
2011-07-01 23:17:49neologixsetmessages: + msg139619
2011-07-01 22:36:31kais58setmessages: + msg139617
2011-07-01 22:30:39neologixsetmessages: + msg139616
2011-07-01 22:23:21kais58setmessages: + msg139614
2011-07-01 22:14:12neologixsetnosy: + vstinner, neologix
messages: + msg139613
2011-07-01 21:29:45kais58create