ncurses, busybox, cml1.bbclass: Fix menuconfig display corruption
PATCH 1/1 ncurses, busybox, cml1.bbclass: Fix menuconfig display corruption
Previously there was a change to the ncurses compile to make it more like the typical way it was compiled on a host system. This fixed a whole class of host machines, but masked the real underlying problem with the display corruption issues and menuconfig.
The corner case that led to the discovery that the wrong curses.h file was getting used was when there was no curses libraries at all on one of the development hosts. What had happened before was that /usr/include/curses.h on the host system had to match closely enough to the curses.h in the sysroot and then linking against the sysroot version of curses.so was ok (meaning no display corruption). But on some systems with ncurses.h vs curses.h such as SuSE hosts, there were still issues.
If we fix the root of the problem and force the mconf and lxdialog to use the correct headers and libraries from the sysroot there is no further issues and the menuconfig target works properly. It also means we can back out the custom compilation flags to the ncurses recipe because they are no longer needed.
For the kernel part of the menuconfig / nconfig changes it will be merged separately and this is all based on:
https://lkml.org/lkml/2013/3/3/103
--- meta/classes/cml1.bbclass | 5 +- .../busybox-1.20.2/busybox-cross-menuconfig.patch | 69 ++++++++++++++++++++ meta/recipes-core/busybox/busybox_1.20.2.bb | 3 +- meta/recipes-core/ncurses/ncurses.inc | 14 ---- 4 files changed, 74 insertions(+), 17 deletions(-) create mode 100644 meta/recipes-core/busybox/busybox-1.20.2/busybox-cross-menuconfig.patch
meta/classes/cml1.bbclass +3 -2
@@ -9,10 +9,11 @@ addtask configure after do_unpack do_patch before do_compile inherit terminal -OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES TERMINFO" +OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS CROSS_CURSES_LIB CROSS_CURSES_INC TERMINFO" HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTLDFLAGS = "${BUILD_LDFLAGS}" -HOST_LOADLIBES = "-lncurses" +CROSS_CURSES_LIB = "-lncurses -ltinfo" +CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"' TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo" python do_menuconfig() {
meta/recipes-core/busybox/busybox-1.20.2/busybox-cross-menuconfig.patch new file +69 -0
69 lines not on this page · raw message
meta/recipes-core/busybox/busybox_1.20.2.bb +2 -1
@@ -28,7 +28,8 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://fix-for-spurious-testsuite-failure.patch \ file://busybox-1.20.2-kernel_ver.patch \ file://stat-usr-bin.patch \ - file://testsuite-du-du-k-works-fix-false-positive.patch" + file://testsuite-du-du-k-works-fix-false-positive.patch \ + file://busybox-cross-menuconfig.patch" SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c" SRC_URI[tarball.sha256sum] = "eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882"
meta/recipes-core/ncurses/ncurses.inc +0 -14
@@ -29,19 +29,6 @@ BUILD_CPPFLAGS += "-D_GNU_SOURCE" # natives don't generally look in base_libdir base_libdir_class-native = "${libdir}" -# Display corruption occurs on 64 bit hosts without these settings -# This was derrived from the upstream debian ncurses which uses -# these settings for 32 and 64 bit hosts. -EXCONFIG_ARGS = "" -EXCONFIG_ARGS_virtclass-native = " \ - --disable-lp64 \ - --with-chtype='long' \ - --with-mmask-t='long'" -EXCONFIG_ARGS_virtclass-nativesdk = " \ - --disable-lp64 \ - --with-chtype='long' \ - --with-mmask-t='long'" - # Fall back to the host termcap / terminfo for -nativesdk and -native # The reality is a work around for strange problems with things like # "bitbake -c menuconfig busybox" where it cannot find the terminfo
@@ -79,7 +66,6 @@ ncurses_configure() { --enable-sigwinch \ --enable-pc-files \ --disable-rpath-hack \ - ${EXCONFIG_ARGS} \ --with-manpage-format=normal \ "$@" || return 1 cd ..
Signature · 1 line
1.7.1
Quoted 20 lines · Jason Wessel
Previously there was a change to the ncurses compile to make it more like the typical way it was compiled on a host system. This fixed a whole class of host machines, but masked the real underlying problem with the display corruption issues and menuconfig.
The corner case that led to the discovery that the wrong
curses.hfile was getting used was when there was no curses libraries at all on one of the development hosts. What had happened before was that/usr/include/curses.hon the host system had to match closely enough to thecurses.hin the sysroot and then linking against the sysroot version of curses.so was ok (meaning no display corruption). But on some systems withncurses.hvscurses.hsuch as SuSE hosts, there were still issues.If we fix the root of the problem and force the mconf and lxdialog to use the correct headers and libraries from the sysroot there is no further issues and the menuconfig target works properly. It also means we can back out the custom compilation flags to the ncurses recipe because they are no longer needed.
Quoted 4 lines
For the kernel part of the menuconfig / nconfig changes it will be merged separately and this is all based on:
Probably best to hold off merging this until we see if the kernel patch is accepted upstream. This is more of an RFC and to raise further awareness of the problem and the fact that we have a solution now that the root cause is well understood on the menuconfig corruption.
Cheers,
Jason.
Is this a proposed fix for bug 3898?
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3898
Quoted 2 lines · Trevor Woerner
Is this a proposed fix for bug 3898?
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3898
Absolutely this would fix that defect.
Jason.