bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with cross-compilation when using qacl module, file m4/acl.m4, s


From: Gabriel Marcano
Subject: Problem with cross-compilation when using qacl module, file m4/acl.m4, specifically with "gl_ACL_GET_FILE" check
Date: Sun, 13 Oct 2013 11:20:00 -0700 (PDT)

Hi,

I'm new to trying to contribute to open source projects, so forgive me if I
leave out pertinent information. I have been trying to cross compile
coreutils and sed from a x86_64 Gentoo Linux installation to an armv6zk
Gentoo Linux installation, and for both the cross compilation fails in the
configure phase with the error message "configure: error: ACLs enabled but
support not detected". I noticed that in the config.log for both programs
this entry appeared:

    "checking for working acl_get_file... cross-compiling"

and while browsing through the generated configure script, I stumbled upon
autogenerated code that I traced back to originate in the m4/acl.m4 file
from the qacl module. The code that checks if acl_get_file works only
runs if the program being configured is being compiled natively (which
makes sense, especially when cross compiling across different
architectures), and when in a cross compiling setting all this code does is
set the internal variable gl_cv_func_working_acl_get_file to
cross-compiling, which essentially makes sure the next check in the process
fails, specifically,

    AS_IF([test $gl_cv_func_working_acl_get_file = yes], [$1], [$2])

This makes sure that when cross-compiling ACL support is disabled even if
there are libraries for ACL for the target architecture.


I've been keeping track of my progress on the Gentoo forums,
http://forums.gentoo.org/viewtopic-p-7416444.html
so there may be more information on what I'm running into.


I believe I have found a slightly better solution to the problem. Attached
is a patch for the m4/acl.m4 file that modifies the final check of the
gl_ACL_GET_FILE function. This check now also passes if the configure is
setting up for a cross compilation and if the executing host is not
Darwin, which means, according to my understanding, that the check for the
acl_get_file bug is not necessary in that case. I tried to format the
white spacing of the changes so it makes sense and conforms to GNU
conventions, but I'm not sure if I did it correctly. This solution is not
optimal because it still does not allow for cross compilation to Darwin 
hosts that are not of version 8.7.0, but I'm not sure if it is possible to
check the version of Darwin from within this context. At the very least,
this seems to be an improvement over the current situation. I have tested
this modified version of m4/acl.m4 with coreutils, and it configures
correctly with target hosts that are not Darwin and fails as expected when
a Darwin host is used as a cross compilation target (--host in configure
nomenclature).

I'm willing to help/fix up what I have submitted if it needs polishing.
Thank you for your time.

Gabriel Marcano

Attachment: acl_get_file_crosscompile_fix.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]