Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failing to cross-compile packages with acl useflag [Solved]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sat Oct 05, 2013 2:44 am    Post subject: Failing to cross-compile packages with acl useflag [Solved] Reply with quote

I am trying to cross emerge packages on my desktop and laptop (both running Gentoo on virtual machines) in order to "speed up" the installation of software onto my Raspberry Pi, but I've run into a roadblock I'd prefer to demolish, so to speak, rather than to walk around it. The issue is that sed and binutils, when compiled on my amd64 virtual machines through a cross compiler made through crossdev (target: armv6zk-hardfloat-linux-gnueabihf), both exhibit the same configure time error:
Code:
configure: error: ACLs enabled but support not detected

To make sure this problem wasn't limited to arm cross compilers, I attempted to run the cross emerge with an i686-pc-linux-gnu crossdev setup, and lo and behold, the same error occurred. I found one mention of this in the Gentoo Bugzilla (https://bugs.gentoo.org/show_bug.cgi?id=476084), to which I also submitted some information. I've tried googling for this issue, and I've found that others have run into it in the past (such as here in the forums) but have solved it by removing the acl use flag. I'd rather figure out why this is happening. Any assistance or tips would be greatly appreciated and thanks in advance!

EDIT: Updated subject header to be more correct. This problem affects a lot more packages that use ACL.

EDIT2: Updated subject header to be more correct according to my recent findings. Any program that uses gnulibs m4/acl.m4 for autoconf since 2006 should be affected.

EDIT3&4: Fixed mistake, binutils is not the source of the problem, gnulib is.


Last edited by gemarcano on Wed Oct 16, 2013 2:39 pm; edited 5 times in total
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8592

PostPosted: Sat Oct 05, 2013 2:28 pm    Post subject: Reply with quote

Please post the section of the config.log where configure determined that ACLs were not supported.
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sat Oct 05, 2013 3:51 pm    Post subject: Reply with quote

Here's the config.log around the area where the config failed. I'm unsure whether the lines for statacl and aclsort matter, but I'm including them just in case. Let me know if you want more of the log. Sadly, the only lines that seem to relate to the error are the last two, and that isn't very helpful.
Code:
...
configure:24864: result: no
configure:24881: checking for statacl
configure:24881: armv6zk-hardfloat-linux-gnueabihf-gcc -std=gnu99 -o conftest -O2 -march=armv6zk -mfpu=vfp -mfloat-abi=hard -pipe  -fomit-frame-pointer  -Wl,-O1 -Wl,--as-needed conftest.c -lacl  >&5
/usr/armv6zk-hardfloat-linux-gnueabihf/tmp/portage/sys-apps/coreutils-8.21/temp/ccVXK2xy.o: In function `main':
conftest.c:(.text.startup+0x4): undefined reference to `statacl'
collect2: error: ld returned 1 exit status
configure:24881: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU coreutils"
| #define PACKAGE_TARNAME "coreutils"
| #define PACKAGE_VERSION "8.21"
| #define PACKAGE_STRING "GNU coreutils 8.21"
| #define PACKAGE_BUGREPORT "bug-coreutils@gnu.org"
| #define PACKAGE_URL "http://www.gnu.org/software/coreutils/"
| #define PACKAGE "coreutils"
| #define VERSION "8.21"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define HAVE_FSEEKO 1
| #define _FILE_OFFSET_BITS 64
| #define _DARWIN_USE_64_BIT_INODE 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_FEATURES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_WCTYPE_H 1
| #define HAVE_STDIO_EXT_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_GRP_H 1
| #define HAVE_ICONV_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_LANGINFO_H 1
| #define HAVE_XLOCALE_H 1
| #define HAVE_MATH_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_UTMP_H 1
| #define HAVE_UTMPX_H 1
| #define HAVE_SCHED_H 1
| #define HAVE_SPAWN_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_PATHS_H 1
| #define HAVE_STROPTS_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_PWD_H 1
| #define D_INO_IN_DIRENT 1
| #define HAVE_LONG_FILE_NAMES 1
| #define HAVE_PATHCONF 1
| #define HAVE_BTOWC 1
| #define HAVE_CANONICALIZE_FILE_NAME 1
| #define HAVE_REALPATH 1
| #define HAVE_READLINKAT 1
| #define HAVE_CHOWN 1
| #define HAVE_FCHOWN 1
| #define HAVE_FCHDIR 1
| #define HAVE_FDOPENDIR 1
| #define HAVE_FACCESSAT 1
| #define HAVE_POSIX_FADVISE 1
| #define HAVE_FCHMODAT 1
| #define HAVE_FCNTL 1
| #define HAVE_SYMLINK 1
| #define HAVE_MEMPCPY 1
| #define HAVE_ISBLANK 1
| #define HAVE_ISWCTYPE 1
| #define HAVE_MBSRTOWCS 1
| #define HAVE_WMEMCHR 1
| #define HAVE_WMEMCPY 1
| #define HAVE_WMEMPCPY 1
| #define HAVE___FPENDING 1
| #define HAVE___FPURGE 1
| #define HAVE___FREADING 1
| #define HAVE_ALARM 1
| #define HAVE_FSTATAT 1
| #define HAVE_FSYNC 1
| #define HAVE_STRTOF 1
| #define HAVE_FTRUNCATE 1
| #define HAVE_OPENAT 1
| #define HAVE_FSTATFS 1
| #define HAVE_FUTIMENS 1
| #define HAVE_GETDELIM 1
| #define HAVE_GETDTABLESIZE 1
| #define HAVE_GETLOGIN 1
| #define HAVE_FLOCKFILE 1
| #define HAVE_FUNLOCKFILE 1
| #define HAVE___FSETLOCKING 1
| #define HAVE_TCGETATTR 1
| #define HAVE_TCSETATTR 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_GETUSERSHELL 1
| #define HAVE_ISWCNTRL 1
| #define HAVE_ISWBLANK 1
| #define HAVE_LINK 1
| #define HAVE_READLINK 1
| #define HAVE_LINKAT 1
| #define HAVE_LSTAT 1
| #define HAVE_MBSINIT 1
| #define HAVE_MBRTOWC 1
| #define HAVE_MBRLEN 1
| #define HAVE_ISASCII 1
| #define HAVE_MPROTECT 1
| #define HAVE_GETGROUPLIST 1
| #define HAVE_FCHMOD 1
| #define HAVE_MKFIFO 1
| #define HAVE_MKNOD 1
| #define HAVE_MKSTEMP 1
| #define HAVE_NL_LANGINFO 1
| #define HAVE_PIPE2 1
| #define HAVE_POSIX_SPAWN 1
| #define HAVE_UTMPNAME 1
| #define HAVE_UTMPXNAME 1
| #define HAVE_WCSCOLL 1
| #define HAVE_SETENV 1
| #define HAVE_SETTIMEOFDAY 1
| #define HAVE_STIME 1
| #define HAVE_SIGACTION 1
| #define HAVE_SIGALTSTACK 1
| #define HAVE_SIGINTERRUPT 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STPNCPY 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR_R 1
| #define HAVE___XPG_STRERROR_R 1
| #define HAVE_TZSET 1
| #define HAVE_STRNDUP 1
| #define HAVE_STRTOIMAX 1
| #define HAVE_STRTOUMAX 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_PIPE 1
| #define HAVE_UNLINKAT 1
| #define HAVE_FUTIMES 1
| #define HAVE_FUTIMESAT 1
| #define HAVE_UTIMENSAT 1
| #define HAVE_LUTIMES 1
| #define HAVE_WCRTOMB 1
| #define HAVE_WCWIDTH 1
| #define HAVE_WCSWIDTH 1
| #define HAVE_GETEGID 1
| #define HAVE_NEWLOCALE 1
| #define HAVE_SLEEP 1
| #define HAVE_CATGETS 1
| #define HAVE_SYMLINKAT 1
| #define HAVE_SHUTDOWN 1
| #define HAVE_USLEEP 1
| #define HAVE_WCTOB 1
| #define HAVE_SETRLIMIT 1
| #define HAVE_PRCTL 1
| #define HAVE_ENDGRENT 1
| #define HAVE_ENDPWENT 1
| #define HAVE_ISWSPACE 1
| #define HAVE_SETGROUPS 1
| #define HAVE_SETHOSTNAME 1
| #define HAVE_SYNC 1
| #define HAVE_SYSCTL 1
| #define HAVE_SYSINFO 1
| #define HAVE_TCGETPGRP 1
| #define restrict __restrict
| #define HAVE_LANGINFO_CODESET 1
| #define HAVE_C99_STRTOLD 1
| #define FUNC_REALPATH_WORKS 1
| #define HAVE_UNISTD_H 1
| #define HAVE_CHOWN 1
| #define HAVE_ENVIRON_DECL 1
| #define HAVE_DECL_STRERROR_R 1
| #define HAVE_STRERROR_R 1
| #define STRERROR_R_CHAR_P 1
| #define GETGROUPS_T gid_t
| #define HAVE_SIG_ATOMIC_T 1
| #define HAVE_DECL_FCHDIR 1
| #define HAVE_WORKING_O_NOATIME 0
| #define HAVE_WORKING_O_NOFOLLOW 0
| #define PROMOTED_MODE_T mode_t
| #define HAVE_DECL_FDATASYNC 1
| #define HAVE_DECL_STRMODE 0
| #define HAVE_MBSTATE_T 1
| #define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1
| #define HAVE_DECL_FSEEKO 1
| #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
| #define HAVE_DECL_FTELLO 1
| #define HAVE_SHUTDOWN 1
| #define HAVE_STRUCT_SOCKADDR_STORAGE 1
| #define HAVE_SA_FAMILY_T 1
| #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
| #define HAVE_GETHOSTBYNAME 1
| #define HAVE_GETSERVBYNAME 1
| #define HAVE_DECL_INET_NTOP 1
| #define HAVE_IPV4 1
| #define HAVE_IPV6 1
| #define HAVE_DECL_GETCWD 1
| #define HAVE_DECL_GETDELIM 1
| #define HAVE_UNSIGNED_LONG_LONG_INT 1
| #define HAVE_LONG_LONG_INT 1
| #define HAVE_DECL_GETLINE 1
| #define HAVE_GETOPT_H 1
| #define HAVE_GETOPT_LONG_ONLY 1
| #define __GETOPT_PREFIX rpl_
| #define HAVE_DECL_GETENV 1
| #define HAVE_DECL_GETPASS 1
| #define HAVE_DECL_FFLUSH_UNLOCKED 1
| #define HAVE_DECL_FLOCKFILE 1
| #define HAVE_DECL_FPUTS_UNLOCKED 1
| #define HAVE_DECL_FUNLOCKFILE 1
| #define HAVE_DECL_PUTC_UNLOCKED 1
| #define HAVE_ICONV 1
| #define ICONV_CONST
| #define HAVE_SYS_BITYPES_H 1
| #define BITSIZEOF_PTRDIFF_T 32
| #define BITSIZEOF_SIZE_T 32
| #define BITSIZEOF_SIG_ATOMIC_T 32
| #define BITSIZEOF_WCHAR_T 32
| #define BITSIZEOF_WINT_T 32
| #define HAVE_SIGNED_SIG_ATOMIC_T 1
| #define PTRDIFF_T_SUFFIX
| #define SIZE_T_SUFFIX u
| #define SIG_ATOMIC_T_SUFFIX
| #define WCHAR_T_SUFFIX u
| #define WINT_T_SUFFIX u
| #define HAVE_INTTYPES_H 1
| #define FLT_EXPBIT0_WORD 0
| #define FLT_EXPBIT0_BIT 23
| #define HAVE_WINT_T 1
| #define HAVE_TOWLOWER 1
| #define HAVE_DECL_GETC_UNLOCKED 1
| #define HAVE_WCHAR_T 1
| #define USE_POSIX_THREADS 1
| #define USE_POSIX_THREADS_WEAK 1
| #define HAVE_STDLIB_H 1
| #define MALLOC_0_IS_NONNULL 1
| #define HAVE_MAP_ANONYMOUS 1
| #define HAVE_DECL_MEMRCHR 1
| #define HAVE__BOOL 1
| #define HAVE_COMPOUND_LITERALS 1
| #define HAVE_TM_GMTOFF 1
| #define HAVE_WORKING_POSIX_SPAWN 1
| #define HAVE_SIGSET_T 1
| #define HAVE_DECL_SETENV 1
| #define HAVE_SEARCH_H 1
| #define HAVE_TSEARCH 1
| #define HAVE_DECL_SNPRINTF 1
| #define HAVE_DECL_STPNCPY 1
| #define HAVE_DECL_STRDUP 1
| #define HAVE_MAP_ANONYMOUS 1
| #define HAVE_DECL_STRNDUP 1
| #define HAVE_DECL_STRNLEN 1
| #define HAVE_DECL_STRSIGNAL 1
| #define HAVE_DECL_SYS_SIGLIST 1
| #define HAVE_DECL_STRTOIMAX 1
| #define HAVE_DECL_STRTOUMAX 1
| #define HAVE_DECL_CLEARERR_UNLOCKED 1
| #define HAVE_DECL_FEOF_UNLOCKED 1
| #define HAVE_DECL_FERROR_UNLOCKED 1
| #define HAVE_DECL_FGETS_UNLOCKED 1
| #define HAVE_DECL_FPUTC_UNLOCKED 1
| #define HAVE_DECL_FREAD_UNLOCKED 1
| #define HAVE_DECL_FWRITE_UNLOCKED 1
| #define HAVE_DECL_GETCHAR_UNLOCKED 1
| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
| #define HAVE_DECL_UNSETENV 1
| #define HAVE_STRUCT_UTIMBUF 1
| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
| #define HAVE_STDINT_H_WITH_UINTMAX 1
| #define HAVE_INTMAX_T 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STRNLEN 1
| #define HAVE_WCSLEN 1
| #define HAVE_WCSNLEN 1
| #define HAVE_MBRTOWC 1
| #define HAVE_WCRTOMB 1
| #define HAVE_DECL__SNPRINTF 0
| #define HAVE_SNPRINTF_RETVAL_C99 1
| #define CHECK_PRINTF_SAFE 1
| #define HAVE_DECL_WCWIDTH 1
| #define HAVE_DECL_ALARM 1
| #define HAVE_LC_MESSAGES 1
| #define HAVE_DECL_STRERROR_R 1
| #define HAVE_SYS_ACL_H 1
| #define HAVE_ACL_GET_FILE 1
| #define HAVE_ACL_GET_FD 1
| #define HAVE_ACL_SET_FILE 1
| #define HAVE_ACL_SET_FD 1
| #define HAVE_ACL_FREE 1
| #define HAVE_ACL_FROM_MODE 1
| #define HAVE_ACL_FROM_TEXT 1
| #define HAVE_ACL_DELETE_DEF_FILE 1
| #define HAVE_ACL_EXTENDED_FILE 1
| /* end confdefs.h.  */
| /* Define statacl to an innocuous variant, in case <limits.h> declares statacl.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define statacl innocuous_statacl
|
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char statacl (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef statacl
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char statacl ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_statacl || defined __stub___statacl
| choke me
| #endif
|
| int
| main ()
| {
| return statacl ();
|   ;
|   return 0;
| }
configure:24881: result: no
configure:24898: checking for aclsort
configure:24898: armv6zk-hardfloat-linux-gnueabihf-gcc -std=gnu99 -o conftest -O2 -march=armv6zk -mfpu=vfp -mfloat-abi=hard -pipe  -fomit-frame-pointer  -Wl,-O1 -Wl,--as-needed conftest.c -lacl  >&5
/usr/armv6zk-hardfloat-linux-gnueabihf/tmp/portage/sys-apps/coreutils-8.21/temp/ccA9EhDB.o: In function `main':
conftest.c:(.text.startup+0x4): undefined reference to `aclsort'
collect2: error: ld returned 1 exit status
configure:24898: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU coreutils"
| #define PACKAGE_TARNAME "coreutils"
| #define PACKAGE_VERSION "8.21"
| #define PACKAGE_STRING "GNU coreutils 8.21"
| #define PACKAGE_BUGREPORT "bug-coreutils@gnu.org"
| #define PACKAGE_URL "http://www.gnu.org/software/coreutils/"
| #define PACKAGE "coreutils"
| #define VERSION "8.21"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define HAVE_FSEEKO 1
| #define _FILE_OFFSET_BITS 64
| #define _DARWIN_USE_64_BIT_INODE 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_FEATURES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_WCTYPE_H 1
| #define HAVE_STDIO_EXT_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_GRP_H 1
| #define HAVE_ICONV_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_LANGINFO_H 1
| #define HAVE_XLOCALE_H 1
| #define HAVE_MATH_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_UTMP_H 1
| #define HAVE_UTMPX_H 1
| #define HAVE_SCHED_H 1
| #define HAVE_SPAWN_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_PATHS_H 1
| #define HAVE_STROPTS_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_PWD_H 1
| #define D_INO_IN_DIRENT 1
| #define HAVE_LONG_FILE_NAMES 1
| #define HAVE_PATHCONF 1
| #define HAVE_BTOWC 1
| #define HAVE_CANONICALIZE_FILE_NAME 1
| #define HAVE_REALPATH 1
| #define HAVE_READLINKAT 1
| #define HAVE_CHOWN 1
| #define HAVE_FCHOWN 1
| #define HAVE_FCHDIR 1
| #define HAVE_FDOPENDIR 1
| #define HAVE_FACCESSAT 1
| #define HAVE_POSIX_FADVISE 1
| #define HAVE_FCHMODAT 1
| #define HAVE_FCNTL 1
| #define HAVE_SYMLINK 1
| #define HAVE_MEMPCPY 1
| #define HAVE_ISBLANK 1
| #define HAVE_ISWCTYPE 1
| #define HAVE_MBSRTOWCS 1
| #define HAVE_WMEMCHR 1
| #define HAVE_WMEMCPY 1
| #define HAVE_WMEMPCPY 1
| #define HAVE___FPENDING 1
| #define HAVE___FPURGE 1
| #define HAVE___FREADING 1
| #define HAVE_ALARM 1
| #define HAVE_FSTATAT 1
| #define HAVE_FSYNC 1
| #define HAVE_STRTOF 1
| #define HAVE_FTRUNCATE 1
| #define HAVE_OPENAT 1
| #define HAVE_FSTATFS 1
| #define HAVE_FUTIMENS 1
| #define HAVE_GETDELIM 1
| #define HAVE_GETDTABLESIZE 1
| #define HAVE_GETLOGIN 1
| #define HAVE_FLOCKFILE 1
| #define HAVE_FUNLOCKFILE 1
| #define HAVE___FSETLOCKING 1
| #define HAVE_TCGETATTR 1
| #define HAVE_TCSETATTR 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_GETUSERSHELL 1
| #define HAVE_ISWCNTRL 1
| #define HAVE_ISWBLANK 1
| #define HAVE_LINK 1
| #define HAVE_READLINK 1
| #define HAVE_LINKAT 1
| #define HAVE_LSTAT 1
| #define HAVE_MBSINIT 1
| #define HAVE_MBRTOWC 1
| #define HAVE_MBRLEN 1
| #define HAVE_ISASCII 1
| #define HAVE_MPROTECT 1
| #define HAVE_GETGROUPLIST 1
| #define HAVE_FCHMOD 1
| #define HAVE_MKFIFO 1
| #define HAVE_MKNOD 1
| #define HAVE_MKSTEMP 1
| #define HAVE_NL_LANGINFO 1
| #define HAVE_PIPE2 1
| #define HAVE_POSIX_SPAWN 1
| #define HAVE_UTMPNAME 1
| #define HAVE_UTMPXNAME 1
| #define HAVE_WCSCOLL 1
| #define HAVE_SETENV 1
| #define HAVE_SETTIMEOFDAY 1
| #define HAVE_STIME 1
| #define HAVE_SIGACTION 1
| #define HAVE_SIGALTSTACK 1
| #define HAVE_SIGINTERRUPT 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STPNCPY 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR_R 1
| #define HAVE___XPG_STRERROR_R 1
| #define HAVE_TZSET 1
| #define HAVE_STRNDUP 1
| #define HAVE_STRTOIMAX 1
| #define HAVE_STRTOUMAX 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_PIPE 1
| #define HAVE_UNLINKAT 1
| #define HAVE_FUTIMES 1
| #define HAVE_FUTIMESAT 1
| #define HAVE_UTIMENSAT 1
| #define HAVE_LUTIMES 1
| #define HAVE_WCRTOMB 1
| #define HAVE_WCWIDTH 1
| #define HAVE_WCSWIDTH 1
| #define HAVE_GETEGID 1
| #define HAVE_NEWLOCALE 1
| #define HAVE_SLEEP 1
| #define HAVE_CATGETS 1
| #define HAVE_SYMLINKAT 1
| #define HAVE_SHUTDOWN 1
| #define HAVE_USLEEP 1
| #define HAVE_WCTOB 1
| #define HAVE_SETRLIMIT 1
| #define HAVE_PRCTL 1
| #define HAVE_ENDGRENT 1
| #define HAVE_ENDPWENT 1
| #define HAVE_ISWSPACE 1
| #define HAVE_SETGROUPS 1
| #define HAVE_SETHOSTNAME 1
| #define HAVE_SYNC 1
| #define HAVE_SYSCTL 1
| #define HAVE_SYSINFO 1
| #define HAVE_TCGETPGRP 1
| #define restrict __restrict
| #define HAVE_LANGINFO_CODESET 1
| #define HAVE_C99_STRTOLD 1
| #define FUNC_REALPATH_WORKS 1
| #define HAVE_UNISTD_H 1
| #define HAVE_CHOWN 1
| #define HAVE_ENVIRON_DECL 1
| #define HAVE_DECL_STRERROR_R 1
| #define HAVE_STRERROR_R 1
| #define STRERROR_R_CHAR_P 1
| #define GETGROUPS_T gid_t
| #define HAVE_SIG_ATOMIC_T 1
| #define HAVE_DECL_FCHDIR 1
| #define HAVE_WORKING_O_NOATIME 0
| #define HAVE_WORKING_O_NOFOLLOW 0
| #define PROMOTED_MODE_T mode_t
| #define HAVE_DECL_FDATASYNC 1
| #define HAVE_DECL_STRMODE 0
| #define HAVE_MBSTATE_T 1
| #define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1
| #define HAVE_DECL_FSEEKO 1
| #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
| #define HAVE_DECL_FTELLO 1
| #define HAVE_SHUTDOWN 1
| #define HAVE_STRUCT_SOCKADDR_STORAGE 1
| #define HAVE_SA_FAMILY_T 1
| #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
| #define HAVE_GETHOSTBYNAME 1
| #define HAVE_GETSERVBYNAME 1
| #define HAVE_DECL_INET_NTOP 1
| #define HAVE_IPV4 1
| #define HAVE_IPV6 1
| #define HAVE_DECL_GETCWD 1
| #define HAVE_DECL_GETDELIM 1
| #define HAVE_UNSIGNED_LONG_LONG_INT 1
| #define HAVE_LONG_LONG_INT 1
| #define HAVE_DECL_GETLINE 1
| #define HAVE_GETOPT_H 1
| #define HAVE_GETOPT_LONG_ONLY 1
| #define __GETOPT_PREFIX rpl_
| #define HAVE_DECL_GETENV 1
| #define HAVE_DECL_GETPASS 1
| #define HAVE_DECL_FFLUSH_UNLOCKED 1
| #define HAVE_DECL_FLOCKFILE 1
| #define HAVE_DECL_FPUTS_UNLOCKED 1
| #define HAVE_DECL_FUNLOCKFILE 1
| #define HAVE_DECL_PUTC_UNLOCKED 1
| #define HAVE_ICONV 1
| #define ICONV_CONST
| #define HAVE_SYS_BITYPES_H 1
| #define BITSIZEOF_PTRDIFF_T 32
| #define BITSIZEOF_SIZE_T 32
| #define BITSIZEOF_SIG_ATOMIC_T 32
| #define BITSIZEOF_WCHAR_T 32
| #define BITSIZEOF_WINT_T 32
| #define HAVE_SIGNED_SIG_ATOMIC_T 1
| #define PTRDIFF_T_SUFFIX
| #define SIZE_T_SUFFIX u
| #define SIG_ATOMIC_T_SUFFIX
| #define WCHAR_T_SUFFIX u
| #define WINT_T_SUFFIX u
| #define HAVE_INTTYPES_H 1
| #define FLT_EXPBIT0_WORD 0
| #define FLT_EXPBIT0_BIT 23
| #define HAVE_WINT_T 1
| #define HAVE_TOWLOWER 1
| #define HAVE_DECL_GETC_UNLOCKED 1
| #define HAVE_WCHAR_T 1
| #define USE_POSIX_THREADS 1
| #define USE_POSIX_THREADS_WEAK 1
| #define HAVE_STDLIB_H 1
| #define MALLOC_0_IS_NONNULL 1
| #define HAVE_MAP_ANONYMOUS 1
| #define HAVE_DECL_MEMRCHR 1
| #define HAVE__BOOL 1
| #define HAVE_COMPOUND_LITERALS 1
| #define HAVE_TM_GMTOFF 1
| #define HAVE_WORKING_POSIX_SPAWN 1
| #define HAVE_SIGSET_T 1
| #define HAVE_DECL_SETENV 1
| #define HAVE_SEARCH_H 1
| #define HAVE_TSEARCH 1
| #define HAVE_DECL_SNPRINTF 1
| #define HAVE_DECL_STPNCPY 1
| #define HAVE_DECL_STRDUP 1
| #define HAVE_MAP_ANONYMOUS 1
| #define HAVE_DECL_STRNDUP 1
| #define HAVE_DECL_STRNLEN 1
| #define HAVE_DECL_STRSIGNAL 1
| #define HAVE_DECL_SYS_SIGLIST 1
| #define HAVE_DECL_STRTOIMAX 1
| #define HAVE_DECL_STRTOUMAX 1
| #define HAVE_DECL_CLEARERR_UNLOCKED 1
| #define HAVE_DECL_FEOF_UNLOCKED 1
| #define HAVE_DECL_FERROR_UNLOCKED 1
| #define HAVE_DECL_FGETS_UNLOCKED 1
| #define HAVE_DECL_FPUTC_UNLOCKED 1
| #define HAVE_DECL_FREAD_UNLOCKED 1
| #define HAVE_DECL_FWRITE_UNLOCKED 1
| #define HAVE_DECL_GETCHAR_UNLOCKED 1
| #define HAVE_DECL_PUTCHAR_UNLOCKED 1
| #define HAVE_DECL_UNSETENV 1
| #define HAVE_STRUCT_UTIMBUF 1
| #define HAVE_INTTYPES_H_WITH_UINTMAX 1
| #define HAVE_STDINT_H_WITH_UINTMAX 1
| #define HAVE_INTMAX_T 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STRNLEN 1
| #define HAVE_WCSLEN 1
| #define HAVE_WCSNLEN 1
| #define HAVE_MBRTOWC 1
| #define HAVE_WCRTOMB 1
| #define HAVE_DECL__SNPRINTF 0
| #define HAVE_SNPRINTF_RETVAL_C99 1
| #define CHECK_PRINTF_SAFE 1
| #define HAVE_DECL_WCWIDTH 1
| #define HAVE_DECL_ALARM 1
| #define HAVE_LC_MESSAGES 1
| #define HAVE_DECL_STRERROR_R 1
| #define HAVE_SYS_ACL_H 1
| #define HAVE_ACL_GET_FILE 1
| #define HAVE_ACL_GET_FD 1
| #define HAVE_ACL_SET_FILE 1
| #define HAVE_ACL_SET_FD 1
| #define HAVE_ACL_FREE 1
| #define HAVE_ACL_FROM_MODE 1
| #define HAVE_ACL_FROM_TEXT 1
| #define HAVE_ACL_DELETE_DEF_FILE 1
| #define HAVE_ACL_EXTENDED_FILE 1
| /* end confdefs.h.  */
| /* Define aclsort to an innocuous variant, in case <limits.h> declares aclsort.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define aclsort innocuous_aclsort
|
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char aclsort (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef aclsort
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char aclsort ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_aclsort || defined __stub___aclsort
| choke me
| #endif
|
| int
| main ()
| {
| return aclsort ();
|   ;
|   return 0;
| }
configure:24898: result: no
configure:24915: error: ACLs enabled but support not detected


I did some digging in the configure script, and this is the code that calls the error:
Code:
if test "x$enable_acl$use_acl" = "xyes0"; then
      as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
I tried figuring out quickly why use_acl is false, but I wasn't able to do so at a glance... the configure script is a bit hard to read without fixing indentation levels (and it is very long).

Let me know if you need any more information from the config.log. In terms of my emerge --info for this cross compiler, I can include it here but I also put it in the bug report I mentioned in my first post. Let me know if you need it or anything else. Thanks!
Back to top
View user's profile Send private message
mario18
Apprentice
Apprentice


Joined: 29 Jun 2003
Posts: 231

PostPosted: Tue Oct 08, 2013 11:02 am    Post subject: Reply with quote

i too have the same exact error
_________________
mario18
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Thu Oct 10, 2013 10:48 pm    Post subject: Reply with quote

I've been parsing through the configure script for coreutils, and I think I've found something...
Code:
# 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:
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:
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"
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Fri Oct 11, 2013 4:14 am    Post subject: Reply with quote

I seriously need input from someone that knows more about configure. As best as I can tell, by reviewing the code in the file, the snippit of code I have above is trying to determine if we are cross-compiling the application or not. If we are not, it tries to compile a test program and runs it to check for a specific bug or error condition. In a cross compiled run, there is no way that the test program can be run to check for this condition and is thus skipped, but by skipping this test the configure fails. This makes me wonder if this test wasn't thought through well for cross compilations? This check is essentially making it so that coreutils (and sed and others) can only be built on architectures that will be using it if acl is enabled.

The issue at hand seems to be the detection of whether ACL is supported or not. Is there any way to know this while cross compiling? What ways can it be checked? Is checking for the existence of ACL functions enought without running them? The current script checks for some but not the ones that are normally found in GNU/Linux systems (as far as I can tell). Is it good enough to override use_acl when cross compiling (that seems rash)? At this point, any input would be greatly appreciated. I'll try to figure out how these configure scripts are made (autotools?) and see if I can encounter any documentation on this particular portion of the program.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2160
Location: The Peanut Gallery

PostPosted: Fri Oct 11, 2013 5:29 am    Post subject: Reply with quote

gemarcano wrote:
I seriously need input from someone that knows more about configure
.. At this point, any input would be greatly appreciated. I'll try to figure out how these configure scripts are made (autotools?) and see if I can encounter any documentation on this particular portion of the program.

##workingset on IRC: chat.freenode.net is your best bet for help. I try to stay away from autoconf, but wrt acl, if you're using Linux I'd set it to available (so it uses the relevant headers) and let it possibly fail at runtime with ENOSYS. Alternatively set the cache var to zero if you're never going to use acl on the ARM board.
But truly, ##workingset are the best people: loads of autotools experts in there.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8592

PostPosted: Fri Oct 11, 2013 9:41 pm    Post subject: Reply with quote

The proper test for ACL support, whether native compiling or cross-compiling, is to try to compile and link a test program which uses one or more functions that are presumed to be present only when the full program will build correctly. It is not necessary, and in some cases undesirable, to run the test program. In a cross-compilation environment, your cross-compiler will pull in libraries specific to the cross-compiled host, so the test will pass if you have the right cross headers and libraries for the feature and fail otherwise. Generally, the configure test is supposed to mimic the requirements of the underlying program, so that you can get a graceful error message up front if the underlying program is guaranteed to fail.

Cross compilation support is often neglected, when it exists at all, so it would not surprise me if optional features do not cross-test correctly, even on a popular package.
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Fri Oct 11, 2013 10:04 pm    Post subject: Reply with quote

@ steveL,

Thank you for your input. I'll be looking into getting in contact with ##workingset on IRC one of these days when I have more time. I'm admittedly new to IRC (so far in my Gentoo experience and programming so far I have not had to go to IRCs for help), although it's about time that changes. I know how to work around the issue, but since this impacts more than just coreutils, I'd much rather not have to patch the configure script for all of the affected packages, so I'm going to try to address the actual problem with what may be autoconf.

@ Hu

That's what I thought in terms of configure testing. This specific test tries to run some code to test for a bug and disable ACL if found... not sure how kosher that is. I'll try to determine if this bug it's covering for is still a problem or if it could be a problem... that may help determine what the best way to counter this problem.

--

I found a project online, openembedded (git commit here), that essentially tackled this problem I'm working on by forcing the check to yes. I guess that's a work-around, but again, that's just a work-around. If possible, I'd like to figure out a more permanent solution. I'll keep updating this forum thread with information as I find it. Thanks again for the input!
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sun Oct 13, 2013 5:09 am    Post subject: Reply with quote

I traced the problem file to something in gnulib. The file is "m4/acl.m4", and the code in question is at the very bottom of the file, where the AC function is made to check for the bug. Specifically, this code seems to work around an old bug found in Darwin 8.7.0 (Wikipedia says Darwin is at version 14 now). I actually found the patch that applied this code for this bug filed "way back" in 2006. I've been studying how to handle this issue properly. The best way to do it would be to explicitly check the host (where the resulting binary will run) is or will be Darwin 8.7.0. and disable acl in that specific case, enable otherwise. I'm not sure how to do this exactly... from my reading of the autoconf documentation, host_alias may be able to give me the architecture name, but not the version. I'm not sure it is possible to infer the version from any information available to autoconf.

The other solution is the more general (and probably less safe), but it goes in line with what the documetation for autoconf says on the subject (found here):
Quote:
...If the optional shell commands action-if-cross-compiling are given, those commands are run instead; typically these commands provide pessimistic defaults that allow cross-compilation to work even if the guess was wrong. ...


Question: am I interpreting that sentence from the documentation correctly (specifically the pessimistic default bit)?

Assuming my interpretation is correct, I wrote up the following patch for gnulibs:
Code:
diff --git a/m4/acl.m4 b/m4/acl.m4
index 5b1fb65..38ead9b 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -160,5 +160,5 @@ AC_DEFUN([gl_ACL_GET_FILE],
        [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])
+  AS_IF([test $gl_cv_func_working_acl_get_file = yes || test $gl_cv_func_working_acl_get_file = cross-compiling], [$1], [$2])
 ])


Essentially, if cross-compilation is detected, just assume that the system doesn't have the bug. This will work great on just about every cross-compilation scenario, unless the target system (the host that will run the binary) is Darwin 8.7.0, in which case the bug will manifest itself.

Does anyone know if it is possible to check for the architecture generically for autoconf? I'm going to keep reading up on whether this is possible, but if someone knows and is willing to impart the knowledge, I would greatly appreciate it! This would help with implementing the first of the two solutions for this issue, and is possibly the more robust of the two.

Since this issue impacts anything that borrows from m4/acl.m4 from gnulib, I think, I'm going to modify the subject of the thread to reflect this uncertainty.

EDIT: typo: gnulibs should be gnulib.
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sun Oct 13, 2013 7:03 am    Post subject: Reply with quote

I have a temporary workaround for coreutils that is simple and doesn't required calling autotools or patching anything other than the ebuild.
Code:
--- /usr/portage/sys-apps/coreutils/coreutils-8.21.ebuild       2013-04-27 21:31:29.000000000 -0400
+++ /usr/local/portage/sys-apps/coreutils/coreutils-8.21.ebuild 2013-10-13 02:54:11.638986041 -0400
@@ -70,6 +70,7 @@
        if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
                export fu_cv_sys_stat_statfs2_bsize=yes #311569
                export gl_cv_func_realpath_works=yes #416629
+               export gl_cv_func_working_acl_get_file=yes
        fi
 
        export gl_cv_func_mknod_works=yes #409919


If I'm understading this correctly, this code only executes when the tool chain is a cross compiler and when the CHOST of the target machine is some linux CHOST (in my case, armv6zk-hardfloat-linux-gnueabihf). I tried running this modified ebuild, and it worked, so for Gentoo this may be a good alternative for the time being, but similar additions would be required by sed and other programs that are currently failing in a similar manner... a more general solution, I think, would be best, and as such I'll keep looking for one. If I have time tomorrow I'll try to get in contact with the gnulib folks and see what they have to say on the matter...
Back to top
View user's profile Send private message
mario18
Apprentice
Apprentice


Joined: 29 Jun 2003
Posts: 231

PostPosted: Sun Oct 13, 2013 7:08 am    Post subject: Reply with quote

so im guessing that

Code:
USE="-acl"


to get around it is not a good thing to do? would that screw up other packages down the line?
_________________
mario18
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sun Oct 13, 2013 2:09 pm    Post subject: Reply with quote

@mario18
Sure, USE="-acl" is a solution if one doesn't need access control lists for your system, but what if for some reason one really needs that feature? I mean, one could compile it natively on the target device (on my case the Raspberry Pi) and not have this issue, but when I have a computer with an i7-3770K that can compile coreutils in under a minute (compared to close to 10 or more on the Pi), I'd rather be able to cross-compile stuff. Personally, I don't really have a need for ACL, but being a young programmer with enough knowledge to contribute, hey, it's about time I give back to the community for my use of Linux these last seven years.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8592

PostPosted: Sun Oct 13, 2013 3:50 pm    Post subject: Reply with quote

The pessimistic assumption would be to assume that untestable systems do have the bug, since you want to avoid letting anyone wander into it by accident. That obviously conflicts with what you want to do. A middle ground, given your discovery about the issue being related to Darwin, would be for cross-compilation to assume success if the host is not Darwin and assume failure if the host is Darwin. This is in line with your ebuild change, and makes --enable-acl work for cross-compile users who do not use Darwin, which is a step up over having --enable-acl not work for any cross-compile users.
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sun Oct 13, 2013 4:17 pm    Post subject: Reply with quote

@Hu
Ah, OK. Thanks for the clarification about the pessimistic assumption. The ebuild solution is an OK middle ground for us Gentoo folk. As you mention, the check should be if the host is not Darwin, skip the test-- right now it's if the system is Linux, skip the test. I'll fix that in a bit. I appreciate the input!

--
For what it's worth, I've also modified the sed ebuild with the same modification that I wrote for the coreutils ebuild, and the cross compilation succeeded. I'm still looking into how this host check may be able to be done at configure time and not by the ebuild... hopefully I can come up with something.
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sun Oct 13, 2013 4:42 pm    Post subject: Reply with quote

Alright, I've made another ebuild for coreutils and it works just as well, and is more general, I think.

I've uploaded the ebuild to the bug report mentioned in the bug report above.

The diff is below:
Code:
--- /usr/portage/sys-apps/coreutils/coreutils-8.21.ebuild       2013-04-27 21:31:29.000000000 -0400
+++ /usr/local/portage/sys-apps/coreutils/coreutils-8.21.ebuild 2013-10-13 12:30:29.598246593 -0400
@@ -72,6 +72,10 @@
                export gl_cv_func_realpath_works=yes #416629
        fi
 
+       if tc-is-cross-compiler && [[ ${CHOST} != *darwin* ]] ; then
+               export gl_cv_func_working_acl_get_file=yes #476084
+       fi
+
        export gl_cv_func_mknod_works=yes #409919
        use static && append-ldflags -static && sed -i '/elf_sys=yes/s:yes:no:' configure #321821
        use selinux || export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no #301782
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8592

PostPosted: Sun Oct 13, 2013 5:35 pm    Post subject: Reply with quote

That looks like a good change for the ebuild. As you say, it would be nice to get this into the gnulib code that feeds the configure script so that other Linux distributions get correct cross-compilation behavior too.
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sun Oct 13, 2013 5:51 pm    Post subject: Reply with quote

@Hu
Thanks. I think I have a general solution now that could be applied to gnulib.

I've come up with something to tackle the possible problem with acl.m4.
Code:
diff --git a/m4/acl.m4 b/m4/acl.m4
index 5b1fb65..05227bb 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -160,5 +160,8 @@ AC_DEFUN([gl_ACL_GET_FILE],
        [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])
+  AS_IF([test $gl_cv_func_working_acl_get_file = yes || \
+          ((test $gl_cv_func_working_acl_get_file = cross-compiling ) && \
+          (test "${host_alias#*darwin}" == "$host_alias"))],
+        [$1], [$2])
 ])
Essentially, if I'm doing this right, what this code is doing is to pass the test if acl_get_file works or if the architecture being cross-compiled isn't Darwin. The substring matching is done via POSIX substring parameter matching, as demonstrated here at Stack Overflow. Does this make sense? I've tried this modification after copying my m4/acl.m4 file to my working copy of coreuilts-8.21/m4/acl.m4, and then running:
Code:
$ autoreconf

$ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=armv6zk-hardfloat-linux-gnueabihf --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-packager=Gentoo --with-packager-version="8.21 (p1.0)" --with-packager-bug-reports=http://bugs.gentoo.org/ --enable-install-program=arch --enable-no-install-program=groups,hostname,kill,su,uptime --enable-largefile --disable-libcap --enable-nls --enable-acl --disable-xattr --without-gmp

$ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=powerpc-apple-darwin --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-packager=Gentoo --with-packager-version="8.21 (p1.0)" --with-packager-bug-reports=http://bugs.gentoo.org/ --enable-install-program=arch --enable-no-install-program=groups,hostname,kill,su,uptime --enable-largefile --disable-libcap --enable-nls --enable-acl --disable-xattr --without-gmp
Notice the difference in the host parameter. I used these two to check whether the modification to the acl.m4 was being detected, and at least on my machine it seemed to be doing its job.

I'm going to submit this to the gnulib bug mailing list and see what they think-- there may yet be a better way to do this.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8592

PostPosted: Sun Oct 13, 2013 7:30 pm    Post subject: Reply with quote

That test looks good to me, assuming the syntax you posted is valid within an AS_IF.
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Sun Oct 13, 2013 7:36 pm    Post subject: Reply with quote

@Hu
Seeing that on my system doing the autoreconf and executing configure did not lead to problems in execution, I think it's valid syntax. I think that in the AC_IF so long as it's a valid sh expression it will run correctly.

I've submitted a summary of my work along with the patch for m4/acl.m4 upstream. Hopefully I hear something from them soon.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2160
Location: The Peanut Gallery

PostPosted: Mon Oct 14, 2013 4:39 pm    Post subject: Reply with quote

gemarcano wrote:
Code:
+  AS_IF([test $gl_cv_func_working_acl_get_file = yes || \
+          ((test $gl_cv_func_working_acl_get_file = cross-compiling ) && \
+          (test "${host_alias#*darwin}" == "$host_alias"))],
+        [$1], [$2])
 ])

I wouldn't use all those subshells personally;
Code:
..  || { test $gl_cv_func_working_acl_get_file = cross-compiling  && \
        test "${host_alias#*darwin}" = "$host_alias"; }

Quote:
I've tried this modification:
Code:
$ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=powerpc-apple-darwin --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-packager=Gentoo --with-packager-version="8.21 (p1.0)" --with-packager-bug-reports=http://bugs.gentoo.org/ --enable-install-program=arch --enable-no-install-program=groups,hostname,kill,su,uptime --enable-largefile --disable-libcap --enable-nls --enable-acl --disable-xattr --without-gmp
Notice the difference in the host parameter. I used these two to check whether the modification to the acl.m4 was being detected, and at least on my machine it seemed to be doing its job.

So how come --enable-acl is set on darwin cross-compile?

Sorry if I'm missing something.
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Mon Oct 14, 2013 5:10 pm    Post subject: Reply with quote

@steveL
Ah, yes, I had forgotten about the parentheses making a subshell. I'm not exactly fluent in SH or BASH, so thanks for catching that. I assumed parentheses would work like in C or C++.

Quote:
So how come --enable-acl is set on darwin cross-compile?

The --enable-acl is there to demonstrate that having it enabled will cause the configure to fail. It fails with the message:
Code:
configure: error: ACLs enabled but support not detected

This is the expected behavior when acl_get_file is found to be buggy. In this modification I made when cross-compiling it just guesses that the bug exists if the target host has darwin in its architecture name. The other configure run with the armv6zk host completes successfully with my modification, which is an improvement since the old code just assumed the error was present for cross-compilation. Does that make sense or am I messing up my logic somewhere?
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2160
Location: The Peanut Gallery

PostPosted: Tue Oct 15, 2013 1:25 am    Post subject: Reply with quote

gemarcano wrote:
The --enable-acl is there to demonstrate that having it enabled will cause the configure to fail. It fails with the message:
Code:
configure: error: ACLs enabled but support not detected

This is the expected behavior when acl_get_file is found to be buggy. In this modification I made when cross-compiling it just guesses that the bug exists if the target host has darwin in its architecture name. The other configure run with the armv6zk host completes successfully with my modification, which is an improvement since the old code just assumed the error was present for cross-compilation. Does that make sense or am I messing up my logic somewhere?

No, that makes sense: I just hadn't seen the other part of it, only the --enable-acl (and I'm not following it that closely.)

Though personally I'm not sure I'd bother with that for darwin, since it applies to such an old system. If I were upstream, I'd simply tell people to set the cachevar to no, if they were cross-compiling for such an old darwin (which is pretty unlikely imo.)
Back to top
View user's profile Send private message
gemarcano
n00b
n00b


Joined: 04 Jun 2012
Posts: 72
Location: Virginia

PostPosted: Tue Oct 15, 2013 3:54 am    Post subject: Reply with quote

@steveL
Yeah, I agree. I just heard back from upstream and they applied a similar fix to what you suggested. Essentially now the m4/acl.m4 file is set up so that if the program will be cross-compiled, assume that there is no bug, else run the check.

I tested the upstream fix and it worked on my system (as expected), so I think this can be marked as solved? Except for the fact that sed and coreutils both still fail since they still include the old version of m4/acl.m4. I'll edit the subject header soon.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2160
Location: The Peanut Gallery

PostPosted: Tue Oct 15, 2013 5:01 am    Post subject: Reply with quote

gemarcano: good work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum