Simplify how to stage directories in the sysroot
PATCH v2 5/16 tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +1 -4
@@ -68,10 +68,7 @@ do_install() { done } -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" -tcl_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" PACKAGES =+ "tcl-lib" FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
Signature · 1 line
2.1.0
v2 cover Simplify how to stage directories in the sysroot
The first commit in this set makes it possible to specify the directories that will be staged in the sysroot via variables rather than hardcoding it in sysroot_stage_dirs(). This should make it a lot easier to add/remove directories to stage.
The rest of the commits just change recipes to take advantage of the new variables.
Because of the following if statement in sysroot_stage_dirs():
if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; thenI have split the list of directories into SYSROOT_DIRS and SYSROOT_DIRS_NATIVE, where the latter is included if that if statement is true. I am not sure when that statement is true (my understanding is that it should be true for native builds, but I am not sure if it is also true for other builds like cross, nativesdk, etc). If it is only true for native builds then that if statement could be removed, and the SYSROOT_DIRS_NATIVE variable could be replaced by SYSROOT_DIRS_append_class-native...
PATCHv2: Removed the if statement mentioned above and replaced it with normal _append operations on SYSROOT_DIRS instead.
//Peter
The following changes since commit 28433319ad8299aa23b1fcfdddbe100b29e86517:
bitbake: toaster: tests browser Add test for creating a project (2016-05-11 11:32:58 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/sysroot_dirs
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/sysroot_dirs
Peter Kjellerstedt (16):
staging.bbclass: Make it easier to define which dirs to stage
u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot
libtool-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
qemuwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
shadow-sysroot: Use SYSROOT_DIRS to add dirs to stage in sysroot
depmodwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
base-files: Use SYSROOT_DIRS to add dirs to stage in sysroot
signing-keys: Use SYSROOT_DIRS to add dirs to stage in sysroot vala.inc: Use SYSROOT_DIRS to add dirs to stage in sysroot
gobject-introspection: Use SYSROOT_DIRS to add dirs to stage in
sysroot
grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
gettext: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from
sysroot
libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST
meta/classes/staging.bbclass | 75 ++++++++++++---------- meta/recipes-bsp/grub/grub2.inc | 5 +- meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb | 5 +- meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +- meta/recipes-core/gettext/gettext_0.16.1.bb | 7 +- meta/recipes-core/meta/signing-keys.bb | 6 +- meta/recipes-devtools/gcc/gcc-target.inc | 4 +- .../libtool/libtool-cross_2.4.6.bb | 7 +- meta/recipes-devtools/libtool/libtool_2.4.6.bb | 13 ++-- .../recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 6 +- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +- meta/recipes-devtools/vala/vala.inc | 13 ++-- .../shadow/shadow-sysroot_4.2.1.bb | 6 +- .../gobject-introspection_1.46.0.bb | 9 ++- meta/recipes-graphics/xorg-font/font-util_1.3.1.bb | 5 +- .../recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 6 +- 16 files changed, 71 insertions(+), 106 deletions(-)
Signature · 1 line
2.1.0
PATCH v2 1/16 staging.bbclass: Make it easier to define which dirs to stage
The directories that should be staged in the sysroot are now specified in the SYSROOT_DIRS variable. Extra directories that should be staged for native are specified in SYSROOT_DIRS_NATIVE. Finally, directories that should not be staged are specified in SYSROOT_DIRS_BLACKLIST.
This also removes the sysroot_stage_libdir() function as it is no longer used (it was just a wrapper for sysroot_stage_dir()).
--- meta/classes/staging.bbclass | 75 +++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 33 deletions(-)
meta/classes/staging.bbclass +42 -33
@@ -1,3 +1,37 @@ +# These directories will be staged in the sysroot +SYSROOT_DIRS = " \ + ${includedir} \ + ${libdir} \ + ${base_libdir} \ + ${nonarch_base_libdir} \ + ${datadir} \ +" + +# These directories are also staged in the sysroot when they contain files that +# are usable on the build system +SYSROOT_DIRS_NATIVE = " \ + ${bindir} \ + ${sbindir} \ + ${base_bindir} \ + ${base_sbindir} \ + ${libexecdir} \ + ${sysconfdir} \ + ${localstatedir} \ +" +SYSROOT_DIRS_append_class-native = " ${SYSROOT_DIRS_NATIVE}" +SYSROOT_DIRS_append_class-cross = " ${SYSROOT_DIRS_NATIVE}" +SYSROOT_DIRS_append_class-crosssdk = " ${SYSROOT_DIRS_NATIVE}" + +# These directories will not be staged in the sysroot +SYSROOT_DIRS_BLACKLIST = " \ + ${mandir} \ + ${docdir} \ + ${infodir} \ + ${datadir}/locale \ + ${datadir}/applications \ + ${datadir}/fonts \ + ${datadir}/pixmaps \ +" sysroot_stage_dir() { src="$1"
@@ -14,43 +48,18 @@ sysroot_stage_dir() { ) } -sysroot_stage_libdir() { - src="$1" - dest="$2" - - sysroot_stage_dir $src $dest -} - sysroot_stage_dirs() { from="$1" to="$2" - sysroot_stage_dir $from${includedir} $to${includedir} - if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then - sysroot_stage_dir $from${bindir} $to${bindir} - sysroot_stage_dir $from${sbindir} $to${sbindir} - sysroot_stage_dir $from${base_bindir} $to${base_bindir} - sysroot_stage_dir $from${base_sbindir} $to${base_sbindir} - sysroot_stage_dir $from${libexecdir} $to${libexecdir} - sysroot_stage_dir $from${sysconfdir} $to${sysconfdir} - sysroot_stage_dir $from${localstatedir} $to${localstatedir} - fi - if [ -d $from${libdir} ] - then - sysroot_stage_libdir $from${libdir} $to${libdir} - fi - if [ -d $from${base_libdir} ] - then - sysroot_stage_libdir $from${base_libdir} $to${base_libdir} - fi - if [ -d $from${nonarch_base_libdir} ] - then - sysroot_stage_libdir $from${nonarch_base_libdir} $to${nonarch_base_libdir} - fi - sysroot_stage_dir $from${datadir} $to${datadir} - # We don't care about docs/info/manpages/locales - rm -rf $to${mandir}/ $to${docdir}/ $to${infodir}/ ${to}${datadir}/locale/ - rm -rf $to${datadir}/applications/ $to${datadir}/fonts/ $to${datadir}/pixmaps/ + for dir in ${SYSROOT_DIRS}; do + sysroot_stage_dir "$from$dir" "$to$dir" + done + + # Remove directories we do not care about + for dir in ${SYSROOT_DIRS_BLACKLIST}; do + rm -rf "$to$dir" + done } sysroot_stage_all() {
Signature · 1 line
2.1.0
PATCH v2 4/16 qemuwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb +1 -5
@@ -41,10 +41,6 @@ EOF chmod +x ${D}${bindir_crossscripts}/qemuwrapper } -SYSROOT_PREPROCESS_FUNCS += "qemuwrapper_sysroot_preprocess" - -qemuwrapper_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
2.1.0
PATCH v2 7/16 depmodwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb +1 -5
@@ -41,10 +41,6 @@ EOF chmod +x ${D}${bindir_crossscripts}/depmodwrapper } -SYSROOT_PREPROCESS_FUNCS += "depmodwrapper_sysroot_preprocess" - -depmodwrapper_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" inherit nopackages
Signature · 1 line
2.1.0
PATCH v2 9/16 signing-keys: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-core/meta/signing-keys.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-core/meta/signing-keys.bb +2 -4
@@ -12,6 +12,8 @@ inherit allarch deploy EXCLUDE_FROM_WORLD = "1" INHIBIT_DEFAULT_DEPS = "1" +SYSROOT_DIRS += "${sysconfdir}/pki" + PACKAGES =+ "${PN}-ipk ${PN}-rpm ${PN}-packagefeed" FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
@@ -54,10 +56,6 @@ do_install () { fi } -sysroot_stage_all_append () { - sysroot_stage_dir ${D}${sysconfdir}/pki ${SYSROOT_DESTDIR}${sysconfdir}/pki -} - do_deploy () { if [ -f "${B}/rpm-key" ]; then install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
Signature · 1 line
2.1.0
PATCH v2 12/16 grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
In reply to Peter Kjellerstedt--- meta/recipes-bsp/grub/grub2.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-bsp/grub/grub2.inc +1 -4
@@ -63,7 +63,4 @@ do_configure_prepend() { # grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are # conflicted, remove it since no one uses it. -SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib" -remove_sysroot_mkconfig_lib() { - rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib" -} +SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
Signature · 1 line
2.1.0
PATCH v2 6/16 shadow-sysroot: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb +2 -4
@@ -21,12 +21,10 @@ S = "${WORKDIR}" do_install() { install -d ${D}${sysconfdir} - install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs + install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs } -sysroot_stage_all() { - sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} -} +SYSROOT_DIRS += "${sysconfdir}" # don't create any packages # otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
Signature · 1 line
2.1.0
PATCH v2 10/16 vala.inc: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/vala/vala.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
meta/recipes-devtools/vala/vala.inc +6 -7
@@ -36,15 +36,14 @@ do_install_append_class-target() { install ${B}/vapigen-wrapper ${D}${bindir}/ } +# Put vapigen wrapper into target sysroot so that it can be used when building +# vapi files. +SYSROOT_DIRS_append_class-target = " ${bindir}" -SYSROOT_PREPROCESS_FUNCS_append_class-target += "vapigen_sysroot_preprocess" - +SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess" vapigen_sysroot_preprocess() { - # Put vapigen wrapper into target sysroot so that it can be used when building vapi files. - sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} - - # Also, tweak the vapigen name in vapigen pkgconfig file, so that it picks up our - # wrapper. + # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks + # up our wrapper. sed -i \ -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \ ${SYSROOT_DESTDIR}${datadir}/pkgconfig/vapigen-${SHRT_VER}.pc
Signature · 1 line
2.1.0
PATCH v2 13/16 gettext: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
In reply to Peter Kjellerstedt--- meta/recipes-core/gettext/gettext_0.16.1.bb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-core/gettext/gettext_0.16.1.bb +1 -6
@@ -102,11 +102,6 @@ do_install_append() { # available, and we don't want to use older macros from the target gettext in # a non-gplv3 build, so kill them and let dependent recipes rely on # gettext-native. - -SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_m4_macros" - -remove_sysroot_m4_macros () { - rm -r "${SYSROOT_DESTDIR}${datadir}/aclocal" -} +SYSROOT_DIRS_BLACKLIST += "${datadir}/aclocal" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.1.0
PATCH v2 14/16 gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/gcc/gcc-target.inc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-target.inc +1 -3
@@ -205,6 +205,4 @@ do_install_append () { # and builds track file dependencies (e.g. perl and its makedepends code). # For determinism we don't install this ever and rely on the copy from gcc-cross. # [YOCTO #7287] -sysroot_stage_dirs_append () { - rm -rf $to${libdir}/gcc -} +SYSROOT_DIRS_BLACKLIST += "${libdir}/gcc"
Signature · 1 line
2.1.0
PATCH v2 11/16 gobject-introspection: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- .../gobject-introspection/gobject-introspection_1.46.0.bb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb +4 -5
@@ -151,13 +151,12 @@ FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" # we need target versions of introspection tools in sysroot so that they can be run via qemu # when building introspection files in other packages -SYSROOT_PREPROCESS_FUNCS_append_class-target += "gi_binaries_sysroot_preprocess" +SYSROOT_DIRS_append_class-target = " ${bindir}" +SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess" gi_binaries_sysroot_preprocess() { - sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} - - # Also, tweak the binary names in introspection pkgconfig file, so that it picks up our - # wrappers which do the cross-compile and qemu magic. + # Tweak the binary names in the introspection pkgconfig file, so that it + # picks up our wrappers which do the cross-compile and qemu magic. sed -i \ -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \ -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
Signature · 1 line
2.1.0
PATCH v2 15/16 libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/libtool/libtool_2.4.6.bb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
meta/recipes-devtools/libtool/libtool_2.4.6.bb +5 -8
@@ -5,7 +5,11 @@ RDEPENDS_${PN} += "bash" # # We want the results of libtool-cross preserved - don't stage anything ourselves. # -SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess" +SYSROOT_DIRS_BLACKLIST += " \ + ${bindir} \ + ${datadir}/aclocal \ + ${datadir}/libtool/build-aux \ +" do_install_append () { sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
@@ -18,10 +22,3 @@ do_install_append () { -e 's@^\(postdep_objects="\).*@\1"@' \ -i ${D}${bindir}/libtool } - -libtool_sysroot_preprocess () { - rm -rf ${SYSROOT_DESTDIR}${bindir}/* - rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/* - rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/build-aux/* -} -
Signature · 1 line
2.1.0
PATCH v2 16/16 font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST
In reply to Peter Kjellerstedt--- meta/recipes-graphics/xorg-font/font-util_1.3.1.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-graphics/xorg-font/font-util_1.3.1.bb +1 -4
@@ -19,7 +19,4 @@ BBCLASSEXTEND = "native" SRC_URI[md5sum] = "23756dab809f9ec5011bb27fb2c3c7d6" SRC_URI[sha256sum] = "aa7ebdb0715106dd255082f2310dbaa2cd7e225957c2a77d719720c7cc92b921" -SYSROOT_PREPROCESS_FUNCS += "fontutil_sysroot_preprocess" -fontutil_sysroot_preprocess () { - sysroot_stage_dir ${D}${datadir}/fonts/ ${SYSROOT_DESTDIR}${datadir}/fonts/ -} +SYSROOT_DIRS_BLACKLIST_remove = "${datadir}/fonts"
Signature · 1 line
2.1.0
PATCH v2 8/16 base-files: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-core/base-files/base-files_3.0.14.bb +1 -4
@@ -165,9 +165,7 @@ do_install_append_linuxstdbase() { done } -sysroot_stage_all_append () { - sysroot_stage_dir ${D}${sysconfdir}/skel ${SYSROOT_DESTDIR}${sysconfdir}/skel -} +SYSROOT_DIRS += "${sysconfdir}/skel" PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg" FILES_${PN} = "/"
@@ -177,4 +175,3 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} ${sysconfdir}/shells" CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile" -
Signature · 1 line
2.1.0
PATCH v2 2/16 u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb +1 -4
@@ -40,10 +40,7 @@ do_install_class-cross () { install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv } -SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross" -uboot_fw_utils_cross() { - sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross} -} +SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" PACKAGE_ARCH = "${MACHINE_ARCH}" BBCLASSEXTEND = "cross"
Signature · 1 line
2.1.0
PATCH v2 3/16 libtool-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter Kjellerstedt--- meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +1 -6
@@ -35,11 +35,6 @@ do_install () { install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/ } -SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess" - -libtoolcross_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} - sysroot_stage_dir ${D}${target_datadir} ${SYSROOT_DESTDIR}${target_datadir} -} +SYSROOT_DIRS += "${bindir_crossscripts} ${target_datadir}" SSTATE_SCAN_FILES += "libtoolize *-libtool"
Signature · 1 line
2.1.0
Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter KjellerstedtQuoted 21 lines · Peter Kjellerstedt
--- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)meta/recipes-devtools/tcltk/tcl_8.6.4.bb +1
-5@@ -68,10 +68,7 @@ do_install() { done } -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" -tcl_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" PACKAGES =+ "tcl-lib" FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" --
Quoted 2 lines
2.1.0
This one breaks meta-oe's postgresql.
Andreas
Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
Quoted 29 lines
-----Original Message-----
From: Andreas Müller [mailto:[email protected]]
Sent: den 26 maj 2016 14:00
To: Peter Kjellerstedt
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCHv2 05/16] tcl: UseSYSROOT_DIRSto add dirs to stage in sysrootmeta/recipes-
Quoted 5 lines · Peter Kjellerstedt
--- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)meta/recipes- renamed from meta/recipes-devtools/tcltk/tcl_8.6.4.bb +0
-0devtools/tcltk/tcl_8.6.4.bb
Quoted 13 lines
index 8e92b3e..61be81d 100644
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +1
-4@@ -68,10 +68,7 @@ do_install() { done } -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" -tcl_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}"
Quoted 8 lines
Quoted 5 lines
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +0
-1PACKAGES =+ "tcl-lib" FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" --2.1.0
This one breaks meta-oe's postgresql.
Andreas
Breaks it how?
//Peter
Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
Quoted 36 lines · Peter Kjellerstedt
Quoted 36 lines
-----Original Message-----
From: Andreas Müller [mailto:[email protected]]
Sent: den 26 maj 2016 14:00
To: Peter Kjellerstedt
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCHv2 05/16] tcl: UseSYSROOT_DIRSto add dirs to stage in sysrootmeta/recipes-
Quoted 5 lines · Peter Kjellerstedt
--- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)meta/recipes- renamed from meta/recipes-devtools/tcltk/tcl_8.6.4.bb +0
-0devtools/tcltk/tcl_8.6.4.bb
Quoted 16 lines
index 8e92b3e..61be81d 100644
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +1
-5@@ -68,10 +68,7 @@ do_install() { done } -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" -tcl_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" PACKAGES =+ "tcl-lib" FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" --Quoted 2 lines
2.1.0
This one breaks meta-oe's postgresql.
Quoted 3 lines
Quoted 1 line
Andreas
Breaks it how?
You can see the error in last status e-mail:
http://lists.openembedded.org/pipermail/openembedded-core/2016-May/121725.html
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
In reply to Peter KjellerstedtQuoted 36 lines · Peter Kjellerstedt
Quoted 36 lines
-----Original Message-----
From: Andreas Müller [mailto:[email protected]]
Sent: den 26 maj 2016 14:00
To: Peter Kjellerstedt
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCHv2 05/16] tcl: UseSYSROOT_DIRSto add dirs to stage in sysrootmeta/recipes-
Quoted 5 lines · Peter Kjellerstedt
--- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)meta/recipes- renamed from meta/recipes-devtools/tcltk/tcl_8.6.4.bb +0
-0devtools/tcltk/tcl_8.6.4.bb
Quoted 16 lines
index 8e92b3e..61be81d 100644
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +1
-5@@ -68,10 +68,7 @@ do_install() { done } -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" -tcl_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}" PACKAGES =+ "tcl-lib" FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" --Quoted 2 lines
2.1.0
This one breaks meta-oe's postgresql.
Quoted 6 lines
Quoted 1 line
Andreas
Breaks it how?
//Peter
Yes I agree I cannot see what's wrong with this patch - together with modifications of staging.bbclass it should do same as before. For test I reverted this patch and postgresql builds fine again. Have no idea what's causing postgresql failure
Some typo I don't see?
Andreas
Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
Quoted 42 lines · Andreas Müller
Quoted 40 lines · Peter Kjellerstedt
Quoted 29 lines
-----Original Message-----
From: Andreas Müller [mailto:[email protected]]
Sent: den 26 maj 2016 14:00
To: Peter Kjellerstedt
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCHv2 05/16] tcl: UseSYSROOT_DIRSto add dirs to stage in sysrootmeta/recipes-
Quoted 5 lines · Peter Kjellerstedt
--- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)meta/recipes- renamed from meta/recipes-devtools/tcltk/tcl_8.6.4.bb +0
-0devtools/tcltk/tcl_8.6.4.bb
Quoted 13 lines
index 8e92b3e..61be81d 100644
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +1
-4@@ -68,10 +68,7 @@ do_install() { done } -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" -tcl_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} +SYSROOT_DIRS += "${bindir_crossscripts}"Quoted 8 lines
Quoted 5 lines
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +0
-1PACKAGES =+ "tcl-lib" FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" --2.1.0
This one breaks meta-oe's postgresql.
Andreas
Breaks it how?
Quoted 9 lines
Quoted 2 lines
//Peter
Yes I agree I cannot see what's wrong with this patch - together with modifications of staging.bbclass it should do same as before. For test I reverted this patch and postgresql builds fine again. Have no idea what's causing postgresql failure
Some typo I don't see?
To get more infomation I
* build with patch reverted
* put sysroot under git control
* remove revert again
Don't know why but now we see absolute paths in tclConfig.sh:
usr/bin/crossscripts/tclConfig.sh +0 -4
@@ -57,7 +57,7 @@ TCL_SHLIB_CFLAGS='-fPIC' TCL_CFLAGS_WARNING='-Wall' # Extra flags to pass to cc: -TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include=/usr/src/debug/tcl/8.6.4-r0 -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux= -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2=
-pipe '
+TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/src/debug/tcl/8.6.4-r0 -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux= -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2=
-pipe '
# Base command to use for combining object files into a shared library:
TCL_SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
@@ -104,11 +104,11 @@ TCL_BUILD_LIB_SPEC='-L/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/us
# String to pass to linker to pick up the Tcl library from its
# installed directory. -TCL_LIB_SPEC='-L=/usr/lib -ltcl8.6' +TCL_LIB_SPEC='-L=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/lib -ltcl8.6'
# String to pass to the compiler so that an extension can
# find installed Tcl headers. -TCL_INCLUDE_SPEC='-I=/usr/include/tcl8.6' +TCL_INCLUDE_SPEC='-I=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include/tcl8.6'
# Indicates whether a version numbers should be used in -l switches # ("ok" means it's safe to use switches like -ltcl7.5; "nodots" means
@@ -157,7 +157,7 @@ TCL_BUILD_STUB_LIB_SPEC='-L/home/superandy/tmp/oe-core-glibc/sysroots/raspberryp
# String to pass to linker to pick up the Tcl stub library from its
# installed directory. -TCL_STUB_LIB_SPEC='-L=/usr/lib -ltclstub8.6' +TCL_STUB_LIB_SPEC='-L=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/lib -ltclstub8.6'
# Path to the Tcl stub library in the build directory. TCL_BUILD_STUB_LIB_PATH='/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include/build/libtclstub8.6.a'
This is the symptom but what is it caused by?
Andreas
Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
Quoted 129 lines
-----Original Message-----
From: Andreas Müller [mailto:[email protected]]
Sent: den 28 maj 2016 15:42
To: Peter Kjellerstedt
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCHv2 05/16] tcl: UseSYSROOT_DIRSto add dirs to stage in sysrootQuoted 10 lines · Andreas Müller
Quoted 8 lines · Peter Kjellerstedt
Quoted 8 lines
-----Original Message-----
From: Andreas Müller [mailto:[email protected]]
Sent: den 26 maj 2016 14:00
To: Peter Kjellerstedt
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCHv2 05/16] tcl: UseSYSROOT_DIRSto add dirs to stage in sysrootQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Review
Quoted 5 lines · Peter Kjellerstedt
--- meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)(quoted diff) +0
-0b/meta/recipes-
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
devtools/tcltk/tcl_8.6.4.bb
meta/recipes-devtools/tcltk/tcl_8.6.4.bb do_install() { · line 73
Quoted 10 lines
index 8e92b3e..61be81d 100644
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +0
-3@@ -68,10 +68,7 @@ do_install() { done } -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess" -tcl_sysroot_preprocess () { - sysroot_stage_dir ${D}${bindir_crossscripts}${SYSROOT_DESTDIR}${bindir_crossscripts}
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 8 lines
meta/recipes-devtools/tcltk/tcl_8.6.4.bb +1
-2-} +SYSROOT_DIRS += "${bindir_crossscripts}" PACKAGES =+ "tcl-lib" FILES_tcl-lib = "${libdir}/libtcl8.6.so.*" --2.1.0
This one breaks meta-oe's postgresql.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Andreas
Breaks it how?
//Peter
Yes I agree I cannot see what's wrong with this patch - together with modifications of staging.bbclass it should do same as before. For
test
Quoted 5 lines
I reverted this patch and postgresql builds fine again. Have no idea what's causing postgresql failure
Some typo I don't see?
To get more infomation I
* build with patch reverted
* put sysroot under git control
* remove revert againDon't know why but now we see absolute paths in
tclConfig.sh:usr/bin/crossscripts/tclConfig.sh +0
-2@@ -57,7 +57,7 @@ TCL_SHLIB_CFLAGS='-fPIC' TCL_CFLAGS_WARNING='-Wall' # Extra flags to pass to cc: -TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include=/usr/src/debug/tcl/8.6.4-r0 -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64- linux=
-fdebug-prefix-map=/home/superandy/tmp/oe-core- glibc/sysroots/raspberrypi2=
-pipe 'usr/bin/crossscripts/tclConfig.sh +1
-1+TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include=/home/superandy/tmp/oe-core- glibc/sysroots/raspberrypi2/usr/src/debug/tcl/8.6.4-r0 -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64- linux=
-fdebug-prefix-map=/home/superandy/tmp/oe-core- glibc/sysroots/raspberrypi2=
-pipe '# Base command to use for combining object files into a shared
library:
TCL_SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'usr/bin/crossscripts/tclConfig.sh +0
-0@@ -104,11 +104,11 @@TCL_BUILD_LIB_SPEC='-L/home/superandy/tmp/oe-core- glibc/sysroots/raspberrypi2/us
# String to pass to linker to pick up the Tcl library from its
# installed directory.usr/bin/crossscripts/tclConfig.sh +1
-1-TCL_LIB_SPEC='-L=/usr/lib -ltcl8.6' +TCL_LIB_SPEC='-L=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/lib
usr/bin/crossscripts/tclConfig.sh +1
-2-ltcl8.6' # String to pass to the compiler so that an extension can # find installed Tcl headers. -TCL_INCLUDE_SPEC='-I=/usr/include/tcl8.6' +TCL_INCLUDE_SPEC='-I=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include/tcl8.6'
# Indicates whether a version numbers should be used in -l switches # ("ok" means it's safe to use switches like -ltcl7.5; "nodots" means
usr/bin/crossscripts/tclConfig.sh +0
-0@@ -157,7 +157,7 @@TCL_BUILD_STUB_LIB_SPEC='-L/home/superandy/tmp/oe-core- glibc/sysroots/raspberryp
# String to pass to linker to pick up the Tcl stub library from its
# installed directory.usr/bin/crossscripts/tclConfig.sh +1
-1-TCL_STUB_LIB_SPEC='-L=/usr/lib -ltclstub8.6' +TCL_STUB_LIB_SPEC='-L=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/lib
-ltclstub8.6'
Quoted 7 lines
# Path to the Tcl stub library in the build directory. TCL_BUILD_STUB_LIB_PATH='/home/superandy/tmp/oe-core-
glibc/sysroots/raspberrypi2/usr/include/build/libtclstub8.6.a'This is the symptom but what is it caused by?
Andreas
It seems to be an intricate history. The difference stems from the the order things are executed in SYSROOT_PREPROCESS_FUNCS, the fact that the tcl recipe inherits binconfig and that it sets BINCONFIG_GLOB to "*Config.sh".
Before my change, the tcl_sysroot_preprocess() function was called after the binconfig_sysroot_preprocess() function, and thus overwrote the tclConfig.sh that the latter function had installed. After my change the "correct" tclConfig.sh is installed by sysroot_stage_all() which is run before binconfig_sysroot_preprocess() and thus the latter now overwrites the "correct" tclConfig.sh with a "faulty" version (I used "correct" and "faulty" here as I guess it depends on one's point of view, and what one expect inheriting binconfig to do...)
If I change:
BINCONFIG_GLOB = "*Config.sh"
to:
BINCONFIG_GLOB_class-target = "tclConfig.sh"
both the installed files in the sysroots and on target go back to look exactly as they did before my change (and postgresql builds again). Changing "*Config.sh" to "tclConfig.sh" will avoid installing extra files in the sysroots (itclConfig.sh, tclooConfig.sh and tdbcConfig.sh) as I do not think that was intended when the use of binconfig was introduced for tcl (based on what is installed by do_install()).
I will send a patch to fix the tcl recipe as per above.
//Peter