Bug 4534 - linux_getgrouplist_ok should be cached so that cross compiles can set with site config.
Summary: linux_getgrouplist_ok should be cached so that cross compiles can set with si...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.24
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-23 12:02 UTC by Rick Foos
Modified: 2022-02-14 00:09 UTC (History)
1 user (show)

See Also:


Attachments
override (35 bytes, text/plain)
2007-04-27 05:45 UTC, Volker Lendecke
no flags Details
samba-cached-getgrouplist.patch (868 bytes, patch)
2009-10-26 20:23 UTC, Mike Frysinger
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Foos 2007-04-23 12:02:29 UTC
Configure fails on cross compile with "error: cannot run test program while cross compiling".

The variable linux_getgrouplist_ok does not have a cache check, so it cannot be defined in site config(config.site) to avoid the error.

Any cross compile host containing linux will have this problem.

The following change to source/configure.in resolves this problem:

*** configure.in.orig   2007-02-04 12:59:28.000000000 -0600
--- configure.in        2007-04-23 11:11:31.000000000 -0500
***************
*** 1403,1408 ****
--- 1403,1409 ----
  case "$host_os" in
      *linux*)
         # glibc <= 2.3.2 has a broken getgrouplist
+        AC_CACHE_CHECK([for broken getgrouplist],linux_getgrouplist_ok,[
         AC_TRY_RUN([
  #include <unistd.h>
  #include <sys/utsname.h>
***************
*** 1419,1425 ****
  #endif
         exit(0);
  }
! ], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
         if test x"$linux_getgrouplist_ok" = x"yes"; then
            AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
         fi
--- 1420,1426 ----
  #endif
         exit(0);
  }
! ], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])])
         if test x"$linux_getgrouplist_ok" = x"yes"; then
            AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
         fi
Comment 1 SPAMMER 2007-04-27 05:41:51 UTC
Created attachment 2449
Comment 2 Volker Lendecke 2007-04-27 05:45:14 UTC
Created attachment 2453 [details]
override

override spam attachement
Comment 3 Mike Frysinger 2009-10-26 20:20:16 UTC
sure would be nice to get this added ...
Comment 4 Mike Frysinger 2009-10-26 20:23:37 UTC
Created attachment 4892 [details]
samba-cached-getgrouplist.patch

this patch is against latest git and uses the name samba_cv_linux_getgrouplist_ok to be consistent with other samba cache variables
Comment 5 Andrew Bartlett 2022-02-14 00:09:36 UTC
The autoconf build system was replace by WAF with Samba 4.0 and has all new and different cross-compilation issues/support.