Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333887 - gnulib: acl.m4's AC_RUN_IFELSE cross-compile fallback disables acl support
Summary: gnulib: acl.m4's AC_RUN_IFELSE cross-compile fallback disables acl support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://lists.gnu.org/archive/html/bu...
Whiteboard:
Keywords:
: 432058 432126 476084 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-21 23:33 UTC by Luca Barbato
Modified: 2014-01-18 06:13 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
coreutils-8.21.ebuild.patch - generalized check used to override configure variable (coreutils-8.21.ebuild.patch,630 bytes, patch)
2013-10-16 14:30 UTC, Gabriel Marcano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Barbato gentoo-dev 2010-08-21 23:33:28 UTC
gl_ACL_GET_FILE is a runtime check, it is used internally this way:

gl_ACL_GET_FILE([use_acl=1], [])

it is written so it would report failure on cross-compile.

AC_DEFUN([gl_ACL_GET_FILE],
[
  AC_CACHE_CHECK([for working acl_get_file], [gl_cv_func_working_acl_get_file],
    [AC_RUN_IFELSE(
       [AC_LANG_PROGRAM(
          [[#include <sys/types.h>
           #include <sys/acl.h>
           #include <errno.h>
          ]],
          [[return !! (!acl_get_file (".", ACL_TYPE_ACCESS)
                       && errno == ENOENT);]])],
       [gl_cv_func_working_acl_get_file=yes],
       [gl_cv_func_working_acl_get_file=no],
       [gl_cv_func_working_acl_get_file=cross-compiling])])

  AS_IF([test $gl_cv_func_working_acl_get_file = yes], [$1], [$2])
])
Comment 1 SpanKY gentoo-dev 2010-08-22 04:43:33 UTC
you could e-mail bug-gnulib@gnu.org with a suggestion of making the cross-compile code falling back to a link test, but i imagine their answer would be "set gl_cv_func_working_acl_get_file in your environment"

which means we can set gl_cv_func_working_acl_get_file in crossdev's config.site files, but i dont think there's any change we'd make to coreutils or any other package that imports the acl module from gnulib.
Comment 2 SpanKY gentoo-dev 2012-08-21 17:29:43 UTC
*** Bug 432058 has been marked as a duplicate of this bug. ***
Comment 3 SpanKY gentoo-dev 2012-08-21 17:29:56 UTC
*** Bug 432126 has been marked as a duplicate of this bug. ***
Comment 4 Ambroz Bizjak 2012-12-05 23:51:31 UTC
Note that I have attached a patch for sys-apps/sed, which is affected by this, in bug 436256.
Comment 5 SpanKY gentoo-dev 2013-10-16 06:34:08 UTC
*** Bug 476084 has been marked as a duplicate of this bug. ***
Comment 6 Gabriel Marcano 2013-10-16 14:28:19 UTC
It's good to know this was previously reported. I spent the last weekend working on this problem (documented at http://forums.gentoo.org/viewtopic-t-971662.html), and independently found this problem in m4/acl.m4 a few days ago and reported it upstream. They quickly pushed a patch to their repository (see message http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00062.html). I tested their patch manually (with coreutils and doing a manual autoreconf after updating the m4/acl.m4 copy under coreutils), and it works. Should this be marked as solved upstream, then?

In bug 476084 I posted an ebuild with a modification that will let coreutils cross-compile while projects update their copy of the source files from gnulibs. I'll post a patch of it here.
Comment 7 Gabriel Marcano 2013-10-16 14:30:55 UTC
Created attachment 361042 [details, diff]
coreutils-8.21.ebuild.patch - generalized check used to override configure variable

This patch allows for coreutils to cross-compile while still catching for a bug that is found in Darwin 8.7.0 that is being checked by m4/acl.m4.
Comment 8 SpanKY gentoo-dev 2014-01-18 06:04:30 UTC
should be all set now in the tree; thanks for the report!

Commit message: Add hack for gnulib acl check when cross-compiling
http://sources.gentoo.org/sys-apps/sed/sed-4.2.2.ebuild?r1=1.2&r2=1.3