Issue1178510
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2005-04-07 12:53 by zosh, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Files | ||||
---|---|---|---|---|
File name | Uploaded | Description | Edit | |
standards.h | zosh, 2005-04-15 08:21 |
Messages (10) | |||
---|---|---|---|
msg24949 - (view) | Author: zosh (zosh) | Date: 2005-04-07 12:53 | |
On Irix 6.5 with MIPS cc 7.30 configure refuses to recognize the existence of "setgroups". configure:14453: checking for setgroups configure:14477: cc -c -g conftest.c >&5 cc-1020 cc: ERROR File = conftest.c, Line = 159 The identifier "setgroups" is undefined. void* p = setgroups ... 1 error detected in the compilation of "conftest.c". configure:14483: $? = 2 configure: failed program was: | /* confdefs.h. */ ... | #include <unistd.h> | #ifdef HAVE_GRP_H | #include <grp.h> | #endif | | int | main () | { | void* p = setgroups | ; | return 0; | } When I compile a short test program that includes only unistd.h with cc, it reports no errors. So I had to manipulate pyconfig.h by hand to force the desired behaviour. Is this a known issue? Please tell me if I have to perform other test on my box to solve the issue. |
|||
msg24950 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2005-04-07 22:50 | |
Logged In: YES user_id=21627 When you say "I compile a short test program that includes only unistd.h" did you literally mean a program that only includes unistd.h (i.e. has no main function)? If not, what is the short program? In particular, make sure it includes the line void *p = setgroups; Please locate the declaration of setgroups in unistd.h (or whereever it is declared), and report whether this is in a conditional compilation section, and if so, what precisely the condition is. |
|||
msg24951 - (view) | Author: zosh (zosh) | Date: 2005-04-08 07:51 | |
Logged In: YES user_id=1254741 My test program that compiled correctly with "cc -c -g": #include <unistd.h> int main () { void *p = setgroups; return 0; } The definition of setgroups in <unistd.h>: #if _SGIAPI ... #if defined(_BSD_COMPAT) extern int setgroups(int, int *); #else /* !_BSD_COMPAT */ extern int setgroups(int, const gid_t *); #endif /* _BSD_COMPAT */ ... #endif /* _SGIAPI */ So it should catch one of these defines. |
|||
msg24952 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2005-04-09 10:33 | |
Logged In: YES user_id=21627 Why do you believe that _SGIAPI is defined? Please try compiling your program with -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 |
|||
msg24953 - (view) | Author: zosh (zosh) | Date: 2005-04-11 12:29 | |
Logged In: YES user_id=1254741 I believe _SIGAPI is defined beacuse cc should report a non-existent "setgroups" otherwise. Compiling my test program with -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 resulted in a failure: cc-1020 cc: ERROR File = t.c, Line = 5 The identifier "setgroups" is undefined. void *p = setgroups; ^ |
|||
msg24954 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2005-04-11 21:21 | |
Logged In: YES user_id=21627 Hmm. You say "because cc should report a non-existent setgroups otherwise"; then you bring an error message '"setgroups" is undefined". Doesn't this imply that _SGIAPI (not _SIGAPI) is indeed not defined, in the case of Python, as well as the case of the various -D options? |
|||
msg24955 - (view) | Author: zosh (zosh) | Date: 2005-04-14 15:30 | |
Logged In: YES user_id=1254741 I must assume that according to the snippet of unistd.h I provided in an earlier comment. Is it possible that setting one -D option clears another one like _SGIAPI ? Tell me please if you would like me perform more tests on my system. |
|||
msg24956 - (view) | Author: Martin v. Löwis (loewis) * | Date: 2005-04-14 18:16 | |
Logged In: YES user_id=21627 Please try to find out whether _SGIAPI is defined anywhere in /usr/include/* or /usr/include/*/*; most likely, some of the -D defines suppress the definition of _SGIAPI. If so, a solution might be to define _SGIAPI in addition to the other defines; see the definition of _GNU_SOURCE, _BSD_VISIBLE etc in configure.in. However, it would be good to find some definition for _SGIAPI - perhaps we are supposed to define _SGI_SOURCE, or _SGI_GIMME_EVERYTHING :-) |
|||
msg24957 - (view) | Author: zosh (zosh) | Date: 2005-04-15 08:21 | |
Logged In: YES user_id=1254741 _SGIAPI is defined in /usr/include/standards.h: #define _SGIAPI ((defined(_SGI_SOURCE) && \ NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5) || \ (_ANSIMODE && _NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5)) standards.h contains some comments when e. g. _SGI_SOURCE and other symbols are defined. Refer to the attached file. |
|||
msg104546 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2010-04-29 17:51 | |
Closing this pending 2.4 Irix issue as out of date. Martin, reopen if you object. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:10 | admin | set | github: 41824 |
2010-04-29 17:51:59 | terry.reedy | set | status: pending -> closed nosy: + terry.reedy messages: + msg104546 resolution: out of date |
2009-02-16 17:52:04 | ajaksu2 | set | status: open -> pending |
2005-04-07 12:53:45 | zosh | create |