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
Hello, change this in your configure line: --host=i686 --target=arm-linux This fixes your error (remove the --build=...). BTW: I pre-set the following variables: export samba_cv_HAVE_MEMORY_KEYTAB=set export samba_cv_USE_SETEUID=set export samba_cv_HAVE_WRFILE_KEYTAB=set export ac_cv_path_KRB5_CONFIG=${KERBEROS}/tools/krb5-config export ac_cv_path_CUPS_CONFIG=${CUPS}/cups-config And fix the config.h: CFG="include/config.h" if test -f $CFG ; then echo "#define HAVE_GETTIMEOFDAY_TZ 1" >> $CFG echo "#define USE_SETEUID 1" >> $CFG echo "#define HAVE_IFACE_IFCONF 1" >> $CFG fi If you need winbind, you might have to add the nsswitch/winbind_nss_linux.o - object file to the WINBIND_NSS_OBJ in the Makefile. Mitch Trope schrieb:> 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.[...]> Thanks, > > Mitch TropeBye, Martin -- Martin Zielinski mz@seh.de Software Development SEH Computertechnik GmbH www.seh.de