[ python-Bugs-1178510 ] configure: refuses setgroups

SourceForge.net noreply at sourceforge.net
Fri Apr 8 09:51:51 CEST 2005


Bugs item #1178510, was opened at 2005-04-07 14:53
Message generated for change (Comment added) made by zosh
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: 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