Number of multilib related fixes
v2 cover Number of multilib related fixes
Fix a number of multilib issues include IA32 eglibc header generation, misc header conflicts and ncurses man page collisions.
This is v2 of the patch set, original was sent by Richard.
The following changes since commit dad2169cfb331b7af5c6d380347ea279a59bd716:
classes/image_types: IMAGE_TYPES was missing some entries (2011-07-26 15:52:40 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/ml_fixes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/ml_fixes
Mark Hatle (8):
multilib_header.bbclass: Add oe_multilib_header wrapper
binutils: Fix multilib header conflict - bfd.h
apr: Fix multilib header conflict - apr.h
beecrypt: Fix multilib header conflict - beecrypt/gnu.h
linux-libc-headers: Fix file conflict -- ..install.cmd eglibc_2.13: Resolve multilib header conflicts
ncurses: Resolve header and man page multilib conflicts package.bbclass: fixup_perms - change symlink processing
meta/classes/multilib_header.bbclass | 29 ++++++ meta/classes/package.bbclass | 10 +- meta/recipes-core/eglibc/eglibc-package.inc | 4 +- meta/recipes-core/eglibc/eglibc_2.13.bb | 91 ++++++++++++++++++++ meta/recipes-core/ncurses/ncurses.inc | 7 +- meta/recipes-devtools/binutils/binutils.inc | 4 +- meta/recipes-devtools/binutils/binutils_2.21.1.bb | 2 +- .../linux-libc-headers-yocto_git.bb | 5 +- .../linux-libc-headers_2.6.37.2.bb | 5 +- .../linux-libc-headers_2.6.39.bb | 5 + meta/recipes-support/apr/apr_1.4.2.bb | 8 ++- meta/recipes-support/beecrypt/beecrypt_4.2.1.bb | 8 ++- scripts/multilib_header_wrapper.h | 55 ++++++++++++ 13 files changed, 217 insertions(+), 16 deletions(-) create mode 100644 meta/classes/multilib_header.bbclass create mode 100644 scripts/multilib_header_wrapper.h
Signature · 1 line
1.7.3.4
PATCH v2 1/8 multilib_header.bbclass: Add oe_multilib_header wrapper
This helper function and associated header will allow us to resolve two/three header files that conflict due to contents that change based on wordsize and ABI.
--- meta/classes/multilib_header.bbclass | 29 ++++++++++++++++++ scripts/multilib_header_wrapper.h | 55 ++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 0 deletions(-) create mode 100644 meta/classes/multilib_header.bbclass create mode 100644 scripts/multilib_header_wrapper.h
meta/classes/multilib_header.bbclass new file +29 -0
@@ -0,0 +1,29 @@ +inherit siteinfo + +# If applicable on the architecture, this routine will rename the header and add +# a unique identifier to the name for the ABI/bitsize that is being used. A wrapper will +# be generated for the architecture that knows how to call all of the ABI variants for that +# given architecture. +# +# TODO: mips64 n32 is not yet recognized in this code +# when that is identified the name of the wrapped item should be "n32" and appropriately +# determined int he if coding... +# +oe_multilib_header() { + # Do nothing on ARM, only one ABI is supported at once + if echo ${TARGET_ARCH} | grep -q arm; then + return + fi + for each_header in "$@" ; do + if [ ! -f "${D}/${includedir}/$each_header" ]; then + bberror "oe_multilib_header: Unable to find header $each_header." + continue + fi + stem=$(echo $each_header | sed 's#\.h$##') + ident=${SITEINFO_BITS} + # if mips64/n32 set ident to n32 + mv ${D}/${includedir}/$each_header ${D}/${includedir}/${stem}-${ident}.h + + sed -e "s#ENTER_HEADER_FILENAME_HERE#${stem}#g" ${COREBASE}/scripts/multilib_header_wrapper.h > ${D}/${includedir}/$each_header + done +}
scripts/multilib_header_wrapper.h new file +55 -0
55 lines not on this page · raw message
Signature · 1 line
1.7.3.4
Re: [v2 PATCH 1/8] multilib_header.bbclass: Add oe_multilib_header wrapper
Quoted 3 lines · Mark Hatle
This helper function and associated header will allow us to resolve two/three header files that conflict due to contents that change based on wordsize and ABI.
Will it be a nop for non multilib case ?
PATCH v2 2/8 binutils: Fix multilib header conflict - bfd.h
In reply to Mark Hatlebfd.h conflicts between 32-bit and 64-bit versions.
--- meta/recipes-devtools/binutils/binutils.inc | 4 +++- meta/recipes-devtools/binutils/binutils_2.21.1.bb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/binutils/binutils.inc +3 -1
@@ -13,7 +13,7 @@ LICENSE = "GPLv3" DEPENDS = "flex-native bison-native zlib-native" -inherit autotools gettext +inherit autotools gettext multilib_header PACKAGES += "${PN}-symlinks"
@@ -116,6 +116,8 @@ do_install () { done rm ${D}${bindir}/ar ${D}${bindir}/strings + + oe_multilib_header bfd.h } do_install_virtclass-native () {
meta/recipes-devtools/binutils/binutils_2.21.1.bb +1 -1
@@ -1,6 +1,6 @@ require binutils.inc -PR = "r2" +PR = "r3" LIC_FILES_CHKSUM="\ file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
Signature · 1 line
1.7.3.4
PATCH v3 3/8 apr: Fix multilib header conflict - apr.h
In reply to Mark Hatleapr.h conflicts between 32-bit and 64-bit versions
--- meta/recipes-support/apr/apr_1.4.2.bb | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
meta/recipes-support/apr/apr_1.4.2.bb +6 -2
@@ -6,7 +6,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=0c35ff3c4c83b89d2f076e315caac28b \ file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96" -PR = "r0" +PR = "r1" SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.bz2 \ file://configure_fixes.patch;patch=1 \
@@ -17,7 +17,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.bz2 \ SRC_URI[md5sum] = "4b00e8f70c067893d075577962656b35" SRC_URI[sha256sum] = "2017ca700694d09d2b0b21dd7c4d195e43a48735aac88526160c6195ee8f5391" -inherit autotools lib_package binconfig +inherit autotools lib_package binconfig multilib_header OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
@@ -34,6 +34,10 @@ do_configure_append() { sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' build/apr_rules.mk } +do_install_append() { + oe_multilib_header apr.h +} + SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess" apr_sysroot_preprocess () {
Signature · 1 line
1.7.3.4
PATCH v2 4/8 beecrypt: Fix multilib header conflict - beecrypt/gnu.h
In reply to Mark Hatlebeecrypt/gnu.h conflicts between 32-bit and 64-bit versions.
--- meta/recipes-support/beecrypt/beecrypt_4.2.1.bb | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
meta/recipes-support/beecrypt/beecrypt_4.2.1.bb +6 -2
@@ -17,11 +17,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9894370afd5dfe7d02b8d14319e729a1 \ DEPENDS = "icu" -PR = "r0" +PR = "r1" -inherit autotools +inherit autotools multilib_header acpaths="" +do_install_append() { + oe_multilib_header beecrypt/gnu.h +} + EXTRA_OECONF="--without-python --enable-shared --enable-static --disable-openmp" FILES_${PN} = "${sysconfdir} ${libdir}/*.so.* ${libdir}/${BPN}/*.so.*"
Signature · 1 line
1.7.3.4
PATCH v2 5/8 linux-libc-headers: Fix file conflict -- ..install.cmd
In reply to Mark HatleThe ..install.cmd conflicts between various configure runs.
This isn't used anywhere, so remove it to avoid the conflict.
--- .../linux-libc-headers-yocto_git.bb | 5 ++++- .../linux-libc-headers_2.6.37.2.bb | 5 ++++- .../linux-libc-headers_2.6.39.bb | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-)
meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb +4 -1
@@ -10,7 +10,7 @@ RPROVIDES_${PN}-dev = "linux-libc-headers-dev" RPROVIDES_${PN}-dbg = "linux-libc-headers-dbg" SRCREV = "69cfbdf9f1ff461a75e5b77d6d7ba35e97db4cc3" PV = "2.6.37+git-${SRCPV}" -PR = "r3" +PR = "r4" SRCREV_FORMAT = "meta_machine" SRC_URI = "git://git.yoctoproject.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
@@ -47,6 +47,9 @@ do_compile () { do_install() { set_arch oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH + + # The ..install.cmd conflicts between various configure runs + find ${D}${includedir} -name ..install.cmd | xargs rm -f } BBCLASSEXTEND = "nativesdk"
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb +4 -1
@@ -2,7 +2,7 @@ require linux-libc-headers.inc INHIBIT_DEFAULT_DEPS = "1" DEPENDS += "unifdef-native" -PR = "r1" +PR = "r2" SRC_URI += " file://connector-msg-size-fix.patch"
@@ -43,6 +43,9 @@ do_install() { oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH # Kernel should not be exporting this header rm -f ${D}${exec_prefix}/include/scsi/scsi.h + + # The ..install.cmd conflicts between various configure runs + find ${D}${includedir} -name ..install.cmd | xargs rm -f } BBCLASSEXTEND = "nativesdk"
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.39.bb +5 -0
@@ -9,6 +9,8 @@ SRC_URI[sha256sum] = "584d17f2a3ee18a9501d7ff36907639e538cfdba4529978b8550c461d4 S = "${WORKDIR}/linux-${PV}" +PR = "r2" + set_arch() { case ${TARGET_ARCH} in alpha*) ARCH=alpha ;;
@@ -44,6 +46,9 @@ do_install() { oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH # Kernel should not be exporting this header rm -f ${D}${exec_prefix}/include/scsi/scsi.h + + # The ..install.cmd conflicts between various configure runs + find ${D}${includedir} -name ..install.cmd | xargs rm -f } BBCLASSEXTEND = "nativesdk"
Signature · 1 line
1.7.3.4
Re: [v2 PATCH 5/8] linux-libc-headers: Fix file conflict -- ..install.cmd
Quoted 84 lines · Mark Hatle
The ..install.cmd conflicts between various configure runs.
This isn't used anywhere, so remove it to avoid the conflict.
Signed-off-by Mark Hatle <[email protected]>---
.../linux-libc-headers-yocto_git.bb | 5 ++++- .../linux-libc-headers_2.6.37.2.bb | 5 ++++- .../linux-libc-headers_2.6.39.bb | 5 +++++3 files changed, 13 insertions(+), 2 deletions(-)meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb +0
-0@@ -10,7 +10,7 @@ RPROVIDES_${PN}-dev = "linux-libc-headers-dev"RPROVIDES_${PN}-dbg = "linux-libc-headers-dbg" SRCREV = "
69cfbdf9f1ff461a75e5b77d6d7ba35e97db4cc3" PV = "2.6.37+git-${SRCPV}"meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb +1
-1-PR = "r3" +PR = "r4"SRCREV_FORMAT = "
meta_machine"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"meta/recipes-kernel/linux-libc-headers/linux-libc-headers-yocto_git.bb +0
-0@@ -47,6 +47,9 @@ do_compile () { do_install() {set_arch
oe_runmakeheaders_installINSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH +
+ # The ..install.cmd conflicts between various configure runs
+ find ${D}${includedir} -name ..install.cmd | xargs rm -f
}BBCLASSEXTEND = "nativesdk"
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb +0
-0@@ -2,7 +2,7 @@ require linux-libc-headers.incINHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "unifdef-native"meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb +1
-1-PR = "r1" +PR = "r2"SRC_URI += " file://connector-msg-size-fix.patch"
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb +0
-0@@ -43,6 +43,9 @@ do_install() {oe_runmake
headers_installINSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH # Kernel should not be exporting this header
rm -f${D}${exec_prefix}/include/scsi/scsi.h
+
+ # The ..install.cmd conflicts between various configure runs
+ find ${D}${includedir} -name ..install.cmd | xargs rm -f
}BBCLASSEXTEND = "nativesdk"
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.39.bb +0
-0@@ -9,6 +9,8 @@ SRC_URI[sha256sum] = "584d17f2a3ee18a9501d7ff36907639e538cfdba4529978b8550c461d4S = "${WORKDIR}/linux-${PV}"
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.39.bb +2
-0+PR = "r2" +set_arch() {
case ${TARGET_ARCH} in
alpha*) ARCH=alpha ;;meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.39.bb +0
-0@@ -44,6 +46,9 @@ do_install() {oe_runmake
headers_installINSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH # Kernel should not be exporting this header
rm -f${D}${exec_prefix}/include/scsi/scsi.h
+
+ # The ..install.cmd conflicts between various configure runs
+ find ${D}${includedir} -name ..install.cmd | xargs rm -f
}BBCLASSEXTEND = "nativesdk"
--
1.7.3.4
Quoted 5 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Thanks for having fixed that.
I noticed two kinds of cruft while packaging: .install and ..install.cmd
# remove Linux headers .install and ..install.cmd files
find ${D}${base_libdir}/klibc/include -name '.install' -delete
find ${D}${base_libdir}/klibc/include -name '..install.cmd' -deleteI'll check now after your patch.
Regards
Andrea
PATCH v2 6/8 eglibc_2.13: Resolve multilib header conflicts
In reply to Mark HatleDue to mismatches between various header definitions in i386 and x86_64 we need to overwrite the i386 versions of the headers with their x86_64 equivalents.
This can not be done for the syscall.h as it's dynamically generated, so use the header conflict resolution helper for that.
--- meta/recipes-core/eglibc/eglibc-package.inc | 4 +- meta/recipes-core/eglibc/eglibc_2.13.bb | 91 +++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletions(-)
meta/recipes-core/eglibc/eglibc-package.inc +3 -1
@@ -86,10 +86,12 @@ SUMMARY_eglibc-utils = "Miscellaneous utilities provided by eglibc" DESCRIPTION_eglibc-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..." DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs" -inherit libc-common +inherit libc-common multilib_header do_install_append () { rm -f ${D}${sysconfdir}/localtime + + oe_multilib_header bits/syscall.h } do_install_locale () {
meta/recipes-core/eglibc/eglibc_2.13.bb +91 -0
97 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH v2 7/8 ncurses: Resolve header and man page multilib conflicts
In reply to Mark HatleBy default man pages are compressed, the way ncurses compresses them causes differences (timestamp and name) to be embedded into the gziped file. So each build will end up with a slightly different file. Avoid this, by not compressing the man pages.
Avoid header conflict with curses.h using the multilib header helper.
--- meta/recipes-core/ncurses/ncurses.inc | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +5 -2
@@ -6,9 +6,9 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc SECTION = "libs" DEPENDS = "ncurses-native" DEPENDS_virtclass-native = "" -INC_PR = "r0" +INC_PR = "r1" -inherit autotools binconfig +inherit autotools binconfig multilib_header # Upstream has useful patches at times at ftp://invisible-island.net/ncurses/ SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz"
@@ -61,6 +61,7 @@ do_configure() { --enable-sigwinch \ --enable-pc-files \ --disable-rpath-hack \ + --with-manpage-format=normal \ "$@" cd .. done
@@ -161,6 +162,8 @@ do_install() { f=${D}${libdir}/libtermcap.so echo '/* GNU ld script */' >$f echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f + + oe_multilib_header curses.h } python populate_packages_prepend () {
Signature · 1 line
1.7.3.4
PATCH v2 8/8 package.bbclass: fixup_perms - change symlink processing
In reply to Mark HatleWe switch to using os.lchown in order to avoid following a symlink.
We also now check if an item is a symlink, if so we avoid the os.chmod as a symlink inherits the mode of it's target.
--- meta/classes/package.bbclass | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
meta/classes/package.bbclass +5 -5
@@ -472,7 +472,7 @@ python fixup_perms () { else: return int(mode,8) - # Note uid/gid -1 has special significance in os.chown + # Note uid/gid -1 has special significance in os.lchown def _procuid(self, uid): if uid is None or uid == "-": return -1
@@ -514,14 +514,14 @@ python fixup_perms () { # Fix the permission, owner and group of path def fix_perms(path, mode, uid, gid, dir): - if mode: + if mode and not os.path.islink(path): #bb.note("Fixup Perms: chmod 0%o %s" % (mode, dir)) os.chmod(path, mode) # -1 is a special value that means don't change the uid/gid - # if they are BOTH -1, don't bother to chown + # if they are BOTH -1, don't bother to lchown if not (uid == -1 and gid == -1): - #bb.note("Fixup Perms: chown %d:%d %s" % (uid, gid, dir)) - os.chown(path, uid, gid) + #bb.note("Fixup Perms: lchown %d:%d %s" % (uid, gid, dir)) + os.lchown(path, uid, gid) # Return a list of configuration files based on either the default # files/fs-perms.txt or the contents of FILESYSTEM_PERMS_TABLES
Signature · 1 line
1.7.3.4
Saul Wold
AppliedQuoted 37 lines · Mark Hatle
Fix a number of multilib issues include IA32 eglibc header generation, misc header conflicts and ncurses man page collisions.
This is v2 of the patch set, original was sent by Richard.
The following changes since commit
dad2169cfb331b7af5c6d380347ea279a59bd716:classes/image_types: IMAGE_TYPES was missing some entries (2011-07-26 15:52:40 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contribmhatle/ml_fixes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/ml_fixesMark Hatle (8):
multilib_header.bbclass: Addoe_multilib_headerwrapper
binutils: Fix multilib header conflict -bfd.h
apr: Fix multilib header conflict -apr.h
beecrypt: Fix multilib header conflict -beecrypt/gnu.h
linux-libc-headers: Fix file conflict -- ..install.cmd eglibc_2.13: Resolve multilib header conflicts
ncurses: Resolve header and man page multilib conflicts package.bbclass:fixup_perms- change symlink processingmeta/classes/multilib_header.bbclass | 29 ++++++ meta/classes/package.bbclass | 10 +- meta/recipes-core/eglibc/eglibc-package.inc | 4 +- meta/recipes-core/eglibc/eglibc_2.13.bb | 91 ++++++++++++++++++++ meta/recipes-core/ncurses/ncurses.inc | 7 +- meta/recipes-devtools/binutils/binutils.inc | 4 +- meta/recipes-devtools/binutils/binutils_2.21.1.bb | 2 +- .../linux-libc-headers-yocto_git.bb | 5 +- .../linux-libc-headers_2.6.37.2.bb | 5 +- .../linux-libc-headers_2.6.39.bb | 5 + meta/recipes-support/apr/apr_1.4.2.bb | 8 ++- meta/recipes-support/beecrypt/beecrypt_4.2.1.bb | 8 ++- scripts/multilib_header_wrapper.h | 55 ++++++++++++ 13 files changed, 217 insertions(+), 16 deletions(-)
Quoted 3 lines
create mode 100644 meta/classes/multilib_header.bbclass create mode 100644
scripts/multilib_header_wrapper.h
Merged into OE-Core
Thanks
Sau!