[ python-Bugs-1178510 ] configure: refuses setgroups
SourceForge.net
noreply at sourceforge.net
Mon Apr 11 23:21:48 CEST 2005
Bugs item #1178510, was opened at 2005-04-07 14:53
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1178510&group_id=5470
Category: Build
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: zosh (zosh)
Assigned to: Nobody/Anonymous (nobody)
Summary: configure: refuses setgroups
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2005-04-11 23:21
Message:
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?
----------------------------------------------------------------------
Comment By: zosh (zosh)
Date: 2005-04-11 14:29
Message:
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;
^
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2005-04-09 12:33
Message:
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
----------------------------------------------------------------------
Comment By: zosh (zosh)
Date: 2005-04-08 09:51
Message:
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.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2005-04-08 00:50
Message:
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.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1178510&group_id=5470
More information about the Python-bugs-list
mailing list