[Samba] Cross-compiling for ARM with 3.0.24

Mitch Trope msteecs at gmail.com
Mon Feb 26 16:21:54 GMT 2007


Hello all,
    I am attempting to cross-compile Samba 3.0.24 for the ARM
platform using on an Ubuntu Dapper box using arm-linux-gcc 3.4.0.  I
am using the following script to call configure:
#!/bin/bash
ac_cv_func_prctl=no
linux_getgrouplist_ok=no
./configure --without-krb5 --without-ldap --without-ads --disable-cups
--without-swat --prefix=/home/tropem/samba-build --host=arm-linux
--build=i386-linux

The console error is:
 checking for __open64... yes
checking for creat64... yes
checking for prctl... yes
configure: error: cannot run test program while cross compiling
See `config.log' for more details.

The config.log shows:
configure:23753: checking for prctl
configure:23809: arm-linux-gcc -o conftest -O -D_SAMBA_BUILD_
conftest.c -lnsl -ldl  >&5
configure:23815: $? = 0
configure:23822: test -z "$ac_c_werror_flag" || test ! -s  conftest.err
configure:23825: $? = 0
configure:23832: test -s conftest
configure:23835: $? = 0
configure:23849: result: yes
configure:23885: arm-linux-gcc -c -O -D_SAMBA_BUILD_  conftest.c >&5
configure:23891: $? = 0
configure:23898: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:23901: $? = 0
configure:23908: test -s conftest.o
configure:23911: $? = 0
configure:23935: error: cannot run test program while cross compiling
See `config.log' for more details.

ac_cv_func_prctl and linux_getgrouplist_ok are the variables that
appear immediately before and after the section of the configure
script that fails.  I tried all four combinations of these variables
without success.  The section of the configure script that fails seems
to be looking for breakage in getgrouplist:

#
#
#
case "$host_os" in
   *linux*)
      # glibc <= 2.3.2 has a broken getgrouplist
      if test "$cross_compiling" = yes; then
 { { echo "$as_me:$LINENO: error: cannot run test program while cross
compiling
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
  { (exit 1); exit 1; }; }
else
 cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

Is there a way to simply remove this check?  Is there a better way to
get around this than hacking the configure script?

There are a few other posts on the list that seem to relate to this
issue, but most did not have replies.

Thanks,

Mitch Trope


More information about the samba mailing list