Add invalid-ac-cv QA and and remove invalid ac_cv.
cover Add invalid-ac-cv QA and and remove invalid ac_cv.
The following changes since commit 0dbe539403fc0da3c3d0b1a6636bc7c9d0e19484:
pulseaudio: fix version when building inside a dirty git checkout (2015-06-11 23:57:52 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/ac-cv
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/ac-cv
Robert Yang (2):
insane.bbclass: check invalid ac_cv value
Remove invalid ac_cv
meta/classes/insane.bbclass | 19 ++++++++++++++++++- meta/recipes-connectivity/openssh/openssh_6.8p1.bb | 8 -------- meta/recipes-connectivity/socat/socat_1.7.3.0.bb | 1 - meta/recipes-core/glibc/glibc.inc | 1 - meta/recipes-devtools/apt/apt.inc | 12 ------------ meta/recipes-devtools/git/git_2.4.2.bb | 2 +- meta/recipes-devtools/python/python.inc | 1 - meta/recipes-devtools/strace/strace_4.10.bb | 2 -- .../recipes-graphics/xorg-xserver/xserver-xorg.inc | 1 - .../gstreamer/gstreamer1.0-plugins-base.inc | 2 -- meta/recipes-multimedia/lame/lame_3.99.5.bb | 2 +- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 - meta/recipes-support/apr/apr_1.5.2.bb | 4 ---- 13 files changed, 20 insertions(+), 36 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/2 insane.bbclass: check invalid ac_cv value
Add QA check invalid-ac-cv to check the invalid cached configure vars (ac_cv_xxx).
--- meta/classes/insane.bbclass | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
meta/classes/insane.bbclass +18 -1
@@ -30,7 +30,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \ textrel already-stripped incompatible-license files-invalid \ installed-vs-shipped compile-host-path install-host-path \ pn-overrides infodir build-deps file-rdeps \ - unknown-configure-option symlink-to-sysroot multilib \ + unknown-configure-option symlink-to-sysroot multilib invalid-ac-cv \ " ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -1139,6 +1139,23 @@ Missing inherit gettext?""" % (gt, config)) package_qa_handle_error("unknown-configure-option", error_msg, d) except subprocess.CalledProcessError: pass + + # Check invalid cached configure vars (ac_cv_xxx). + # The ac_cv_xxx maybe in CACHED_CONFIGUREVARS, CONFIGUREOPTS and + # EXTRA_OECONF. + tocheck = "%s %s %s" % (d.getVar('CACHED_CONFIGUREVARS', True) or "", \ + d.getVar('CONFIGUREOPTS', True) or "", \ + d.getVar('EXTRA_OECONF', True) or "" ) + for var in tocheck.split(): + if var.startswith('ac_cv_'): + varname = var.split('=')[0] + cfgscript=d.expand("${S}/configure") + if os.path.exists(cfgscript): + statement = "grep -q -F %s %s > /dev/null" % (varname, cfgscript) + if subprocess.call(statement, shell=True) != 0: + pn = d.getVar('PN', True) + error_msg = "%s: Invalid cached configure var: %s" % (pn, varname) + package_qa_handle_error("invalid-ac-cv", error_msg, d) } # The Staging Func, to check all staging #addtask qa_staging after do_populate_sysroot before do_build
Signature · 1 line
1.7.9.5
Re: [PATCH 1/2] insane.bbclass: check invalid ac_cv value
Quoted 8 lines · Robert Yang
meta/classes/insane.bbclass +6
-0+ for var in tocheck.split(): + if var.startswith('ac_cv_'): + varname = var.split('=')[0] + cfgscript=d.expand("${S}/configure") + if os.path.exists(cfgscript): + statement = "grep -q -F %s %s > /dev/null" %(varname, cfgscript)
So your assumption that ac_cv_* variables are referenced in full in configure is bad. This is what strace has for the giant AC_CHECK_HEADERS block:
for ac_header in asm/cachectl.h asm/sysmips.h bluetooth/bluetooth.h elf.h inttypes.h ioctls.h linux/bsg.h linux/falloc.h linux/filter.h linux/hiddev.h linux/mmtimer.h linux/perf_event.h linux/seccomp.h linux/securebits.h linux/utsname.h mqueue.h netinet/sctp.h poll.h scsi/sg.h stropts.h sys/conf.h sys/epoll.h sys/fanotify.h sys/filio.h sys/ioctl.h sys/poll.h sys/reg.h sys/vfs.h sys/xattr.h
do :
as_ac_Header=$as_echo "ac_cv_header_$ac_header" | $as_tr_shac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
The variable name is constructed, so this test can't work.
Ross
Re: [PATCH 1/2] insane.bbclass: check invalid ac_cv value
Quoted 13 lines · Ross
On 12 June 2015 at 04:23, Robert Yang <[email protected] <mailto:[email protected]>> wrote:
+ for var in
tocheck.split():
+ ifvar.startswith('ac_cv_'):
+ varname = var.split('=')[0]
+ cfgscript=d.expand("${S}/configure")
+ ifos.path.exists(cfgscript):
+ statement = "grep -q -F %s %s >/dev/null" % (varname,
cfgscript)
Quoted 2 lines
So your assumption that ac_cv_* variables are referenced in full in configure is bad. This is what strace has for the giant
AC_CHECK_HEADERSblock:
Yes, it doesn't work well, I will try to figure out other ways.
// Robert
Quoted 15 lines
for
ac_headerinasm/cachectl.hasm/sysmips.hbluetooth/bluetooth.helf.hinttypes.hioctls.hlinux/bsg.hlinux/falloc.hlinux/filter.hlinux/hiddev.hlinux/mmtimer.hlinux/perf_event.hlinux/seccomp.hlinux/securebits.hlinux/utsname.hmqueue.hnetinet/sctp.hpoll.hscsi/sg.hstropts.hsys/conf.hsys/epoll.hsys/fanotify.hsys/filio.hsys/ioctl.hsys/poll.hsys/reg.hsys/vfs.hsys/xattr.h
do :as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel"$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"The variable name is constructed, so this test can't work.
Ross
PATCH 2/2 Remove invalid ac_cv
In reply to Robert YangThey are not invalid any more.
--- meta/recipes-connectivity/openssh/openssh_6.8p1.bb | 8 -------- meta/recipes-connectivity/socat/socat_1.7.3.0.bb | 1 - meta/recipes-core/glibc/glibc.inc | 1 - meta/recipes-devtools/apt/apt.inc | 12 ------------ meta/recipes-devtools/git/git_2.4.2.bb | 2 +- meta/recipes-devtools/python/python.inc | 1 - meta/recipes-devtools/strace/strace_4.10.bb | 2 -- .../recipes-graphics/xorg-xserver/xserver-xorg.inc | 1 - .../gstreamer/gstreamer1.0-plugins-base.inc | 2 -- meta/recipes-multimedia/lame/lame_3.99.5.bb | 2 +- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 - meta/recipes-support/apr/apr_1.5.2.bb | 4 ---- 12 files changed, 2 insertions(+), 35 deletions(-)
meta/recipes-connectivity/openssh/openssh_6.8p1.bb +0 -8
@@ -53,17 +53,9 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \ --disable-strip \ " -# Since we do not depend on libbsd, we do not want configure to use it -# just because it finds libutil.h. But, specifying --disable-libutil -# causes compile errors, so... -CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no" - # passwd path is hardcoded in sshd CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd" -# We don't want to depend on libblockfile -CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no" - # This is a workaround for uclibc because including stdio.h # pulls in pthreads.h and causes conflicts in function prototypes. # This results in compilation failure, so unless this is fixed,
meta/recipes-connectivity/socat/socat_1.7.3.0.bb +0 -1
@@ -26,7 +26,6 @@ EXTRA_AUTORECONF += "--exclude=autoheader" EXTRA_OECONF += "ac_cv_have_z_modifier=yes sc_cv_sys_crdly_shift=9 \ sc_cv_sys_tabdly_shift=11 sc_cv_sys_csize_shift=4 \ ac_cv_ispeed_offset=13 \ - ac_cv_header_bsd_libutil_h=no \ " PACKAGECONFIG ??= "tcp-wrappers"
meta/recipes-core/glibc/glibc.inc +0 -1
@@ -52,7 +52,6 @@ REQUIRED_DISTRO_FEATURES = "${DISTRO_FEATURES_LIBC}" LEAD_SONAME = "libc.so" CACHED_CONFIGUREVARS += " \ - ac_cv_path_KSH=${base_bindir}/bash \ ac_cv_path_BASH_SHELL=${base_bindir}/bash \ libc_cv_slibdir=${base_libdir} \ libc_cv_rootsbindir=${base_sbindir} \
meta/recipes-devtools/apt/apt.inc +0 -12
@@ -22,16 +22,4 @@ do_configure_prepend() { rm -rf ${S}/buildlib/config.guess } -# Apt wants to know the glibc version by running a binary file, which will -# fail, so we have to tell configure which version to use Since I don't know -# the impliations of setting a wrong value I only provide one for angstrom, -# which uses glibc 2.5 (which claims to be 2.4) -# Koen - 20070327 -EXTRA_OECONF_append_angstrom = " ac_cv_glibc_ver=libc6.4" - -# under Debian it is set to libc6.3 as they use glibc 2.3 -# They also provide glibc 2.5 in 'experimental' and it works with APT built -# for 2.3 so we set it in same way -EXTRA_OECONF_append = " ac_cv_glibc_ver=libc6.3" - FILES_${PN}-dbg += "${libdir}/apt/methods/.debug/"
meta/recipes-devtools/git/git_2.4.2.bb +1 -1
@@ -5,7 +5,7 @@ SRC_URI[tarball.sha256sum] = "8edd564051fb776a41b4c475ed2d6105de82b674b8903a9efa SRC_URI[manpages.md5sum] = "b52251e6f859a54bf5d5a3b7682fbfbf" SRC_URI[manpages.sha256sum] = "114b22518dd71cc1a16018b0ff198a5ee1e6b2239381dfd6a6b9994f3da89661" -EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes \ +EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ " EXTRA_OEMAKE += "NO_GETTEXT=1"
meta/recipes-devtools/python/python.inc +0 -1
@@ -26,6 +26,5 @@ EXTRA_OECONF = "\ --with-signal-module \ --enable-shared \ --enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)} \ - ac_cv_header_bluetooth_bluetooth_h=no ac_cv_header_bluetooth_h=no \ ${PYTHONLSBOPTS} \ "
meta/recipes-devtools/strace/strace_4.10.bb +0 -2
@@ -22,13 +22,11 @@ RDEPENDS_${PN}-ptest += "make coreutils grep gawk" PACKAGECONFIG_class-target ??= "\ libaio ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ " PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio" PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl" PACKAGECONFIG[libunwind] = "--with-libunwind, --without-libunwind, libunwind" -PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}" TESTDIR = "tests"
meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +0 -1
@@ -119,7 +119,6 @@ EXTRA_OECONF += "--with-fop=no \ --localstatedir=/var \ --with-xkb-output=/var/lib/xkb \ --with-sha1=libcrypto \ - ac_cv_file__usr_share_sgml_X11_defs_ent=no \ " PACKAGECONFIG ??= "dri2 udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx', '', d)} \
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc +0 -2
@@ -36,5 +36,3 @@ EXTRA_OECONF += " \ " FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" - -CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
meta/recipes-multimedia/lame/lame_3.99.5.bb +1 -1
@@ -27,4 +27,4 @@ FILES_libmp3lame = "${libdir}/libmp3lame.so.*" FILES_libmp3lame-dev = "${includedir} ${libdir}/*" FILES_${PN}-dev = "" -CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no" +CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_xmmintrin_h=no"
meta/recipes-multimedia/pulseaudio/pulseaudio.inc +0 -1
@@ -29,7 +29,6 @@ EXTRA_OECONF = "\ --without-fftw \ --without-zsh-completion-dir \ --with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \ - ac_cv_header_valgrind_memcheck_h=no \ " PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
meta/recipes-support/apr/apr_1.5.2.bb +0 -4
@@ -27,10 +27,6 @@ OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" # Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928 CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" -# Also suppress trying to use sctp. -# -CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" - do_configure_prepend() { # Avoid absolute paths for grep since it causes failures # when using sstate between different hosts with different
Signature · 1 line
1.7.9.5
Re: [PATCH 2/2] Remove invalid ac_cv
Quoted 3 lines · Robert Yang
-PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
This patch series has very little context (what's ac_cv_invalid, for a start), but strace 4.10 definitely still contains a check for the bluetooth header, so you're removing non-deterministic fixes:
AC_CHECK_HEADERS(m4_normalize([
asm/cachectl.h
asm/sysmips.h
bluetooth/bluetooth.h
...
Ross