I've been parsing through the configure script for coreutils, and I think I've found something...
Code: Select all
# If the acl_get_file bug is detected, don't enable the ACL support.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
$as_echo_n "checking for working acl_get_file... " >&6; }
if ${gl_cv_func_working_acl_get_file+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
gl_cv_func_working_acl_get_file=cross-compiling
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/acl.h>
#include <errno.h>
int
main ()
{
if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
return 1;
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
gl_cv_func_working_acl_get_file=yes
else
gl_cv_func_working_acl_get_file=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
if test $gl_cv_func_working_acl_get_file = yes; then :
use_acl=1
fi
if test $use_acl = 1; then
for ac_header in acl/libacl.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_ACL_LIBACL_H 1
_ACEOF
fi
done
I went ahead and indented the code for my own sanity. I can't guarantee line numbers weren't affected by my tinkering, but I'll see if I can get an unmodified configure script and put it up on pastebin soon. Anyhow, the code above is where I found a probably issue. Since this is a cross-compilation, the variable $cross_compiling is "yes", so gl_cv_func_working_acl_get_file is set to "cross-compiling" (which is reflected by this being printed out later in the config.log). The problem is a few lines down.
Code: Select all
if test $gl_cv_func_working_acl_get_file = yes; then :
use_acl=1
fi
This test is explicitly checking to see if this variable is set to "yes", which is never the case in a cross-compilation. This, in turn, prevents use_acl=1 from being set.
Now, I'm not 100% sure this is the cause of the problem, since there are a lot more if statements involving the setting of use_acl=1, but seemingly every single one on my machine is failing. I am also admitedly not that great with BASH, so please, any input on what I've found would be greatly appreciated!
EDIT:
As an extra, I have also found the above code, practically verbatum, in the sed configure script as well. I have to check my emerge history to see which packages failed and I'll try to match those that failed cross-compilation due to ACL to this code above.
EDIT2:
I think this is the problem. I ran the configure as though I were going to build on my actual machine, and the branch that executes seems to be te else branch of the cross compile branch:
Code: Select all
if test "$cross_compiling" = yes; then :
gl_cv_func_working_acl_get_file=cross-compiling
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/acl.h>
#include <errno.h>
int
main ()
{
if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
return 1;
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
gl_cv_func_working_acl_get_file=yes
else
gl_cv_func_working_acl_get_file=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
I believe this is the case because when I run the configure on my computer natively (no cross compilation), gl_cv_func_working_acl_get_file is set to "yes" , which would then make sure that use_acl is set to 1. This "yes" is reflected on the config.log line "checking for working acl_file_get... yes"