Bug 9668 - libarchive doesn't respect disable-acl
Summary: libarchive doesn't respect disable-acl
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: multimedia (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2
Assignee: Maxin B. John
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-05-24 10:05 UTC by Gary Thomas
Modified: 2016-06-06 04:21 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
add check for acl/libacl.h (2.42 KB, patch)
2016-06-02 13:31 UTC, Maxin B. John
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Thomas 2016-05-24 10:05:33 UTC
Even without acl in PACKAGECONFIG (hence --disable-acl), the configure script still checkks for acl.h/libacl.  This can lead to a broken build if acl was present during an initial run but removed later and the package simply rebuilt without rerunning configure.

From the config.log:
configure:13342: checking acl/libacl.h usability
configure:13342: arm-amltd-linux-gnueabi-gcc  -march=armv7ve -marm -mfpu=neon  -mfloat-abi=softfp -mcpu=cortex-a7 --sysroot=/local/p7619_2016-02-23/tmp/sysroots/my_target -c  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/local/p7619_2016-02-23/tmp/work/cortexa7-neon-amltd-linux-gnueabi/libarchive/3.1.2-r0=/usr/src/debug/libarchive/3.1.2-r0 -fdebug-prefix-map=/local/p7619_2016-02-23/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/local/p7619_2016-02-23/tmp/sysroots/teton-p7618=   -I/local/pXXXX_2016-02-23/tmp/work/cortexa7-neon-amltd-linux-gnueabi/libarchive/3.1.2-r0/extra-includes conftest.c >&5
conftest.c:67:24: fatal error: acl/libacl.h: No such file or directory
 #include <acl/libacl.h>


Tested with poky master:c7e614c438706fb3ed7520b4990ebb3973366942
Comment 1 Randy MacLeod 2016-05-26 14:49:02 UTC
Apparently not easy to reproduce so being treated as a medium priority defect.
Comment 2 Maxin B. John 2016-06-02 13:31:12 UTC
Created attachment 3209 [details]
add check for acl/libacl.h

Hi Gary,

This build failure is hard to re-create. However, based on the configure.ac code, header check exists only for <sys/acl.h>. It should also include check for <acl/libacl.h> which contains additional API in linux.

ie:
if test "x$enable_acl" != "xno"; then
    AC_CHECK_HEADERS([sys/acl.h])
    AC_CHECK_LIB([acl],[acl_get_file])
    AC_CHECK_FUNCS([acl_create_entry acl_init acl_set_fd acl_set_fd_np acl_set_file])
 

I have attached a patch to fix it. Is it possible for you to verify that this failure still occurs on poky (master branch) ?

Please note that libarchive was upgraded to version 3.2.0 recently
Comment 3 Maxin B. John 2016-06-02 13:35:55 UTC
Please apply this patch on top of poky (master) and check if we can recreate this error.
Comment 4 Maxin B. John 2016-06-03 13:15:48 UTC
Submitted an upstream pull request.
https://github.com/libarchive/libarchive/pull/712
Comment 5 Gary Thomas 2016-06-04 07:07:13 UTC
(In reply to comment #3)
> Please apply this patch on top of poky (master) and check if we can recreate
> this error.

I was able to get my build to break again and then applied this patch.  It now builds correctly, thanks