<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16413</bug_id>
          
          <creation_ts>2026-09-01 07:16:22 +0000</creation_ts>
          <short_desc>menuconfig doesn&apos;t work on Kubuntu 24.04 (linking ncurses fails)</short_desc>
          <delta_ts>2026-09-18 21:44:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-meta-intel</component>
          <version>6.0.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin K">martin.kroell</reporter>
          <assigned_to name="Martin K">martin.kroell</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>yoann.congal</cc>
    
    <cc>yogesh.tyagi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>106693</commentid>
    <comment_count>0</comment_count>
    <who name="Martin K">martin.kroell</who>
    <bug_when>2026-09-01 07:16:22 +0000</bug_when>
    <thetext>I&apos;m on Kubuntu 24.04. When I try to configure my intel kernel with
bitbake virtual/kernel -c menuconfig
I get the following error:

[...]
  GEN     Makefile
  HOSTCC  scripts/basic/fixdep
libs=&apos;-lncurses -ltinfo&apos;
cflags=&apos;-DCURSES_LOC=&quot;&lt;curses.h&gt;&quot;&apos;
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/mnconf-common.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/mconf
/home/me/yocto/my-distro/build/tmp/hosttools/ld: scripts/kconfig/lxdialog/yesno.o: warning: relocation against `acs_map&apos; in read-only section `.text&apos;
/home/me/yocto/my-distro/build/tmp/hosttools/ld: scripts/kconfig/mconf.o: in function `show_help&apos;:
mconf.c:(.text+0x739): undefined reference to `stdscr&apos;
/home/me/yocto/my-distro/build/tmp/hosttools/ld: scripts/kconfig/lxdialog/checklist.o: in function `print_arrows&apos;:
checklist.c:(.text+0x2c): undefined reference to `wmove&apos;
/home/me/yocto/my-distro/build/tmp/hosttools/ld: checklist.c:(.text+0x43): undefined reference to `wattrset&apos;
/home/me/yocto/my-distro/build/tmp/hosttools/ld: checklist.c:(.text+0x4a): undefined reference to `acs_map&apos;
/home/me/yocto/my-distro/build/tmp/hosttools/ld: checklist.c:(.text+0x52): undefined reference to `waddch&apos;
[...]
/home/me/yocto/my-distro/build/tmp/hosttools/ld: yesno.c:(.text+0x30d): undefined reference to `delwin&apos;
/home/me/yocto/my-distro/build/tmp/hosttools/ld: yesno.c:(.text+0x340): undefined reference to `wrefresh&apos;
/home/me/yocto/my-distro/build/tmp/hosttools/ld: scripts/kconfig/lxdialog/yesno.o: in function `print_buttons&apos;:
yesno.c:(.text+0x7f): undefined reference to `wrefresh&apos;
/home/me/yocto/my-distro/build/tmp/hosttools/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[2]: *** [/home/me/yocto/my-distro/build/tmp/work-shared/my-board/kernel-source/scripts/Makefile.host:123: scripts/kconfig/mconf] Error 1
make[1]: *** [/home/me/yocto/my-distro/build/tmp/work-shared/my-board/kernel-source/Makefile:748: menuconfig] Error 2
make: *** [/home/me/yocto/my-distro/build/tmp/work-shared/my-board/kernel-source/Makefile:248: __sub-make] Error 2
Command failed.
Press any key to continue...

I found the patches 0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch and 0002-mconf-fix-output-of-cflags-and-libraries.patch in meta-intel/recipes-kernel/linux/linux-intel. If I understand them correctly, they try to fix problems like mine, but the result seems to be wrong.

The resulting mconf-cfg.sh has two if-blocks for handling $CROSS_CURSES_LIB:

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0

set -eu

cflags=$1
libs=$2

PKG=&quot;ncursesw&quot;
PKG2=&quot;ncurses&quot;

if [ &quot;$CROSS_CURSES_LIB&quot; != &quot;&quot; ]; then
    echo libs=\&apos;$CROSS_CURSES_LIB\&apos;
    if [ x&quot;$CROSS_CURSES_INC&quot; != x ]; then
	echo cflags=\&apos;$CROSS_CURSES_INC\&apos;
    fi
    exit 0
fi

if [ &quot;$CROSS_CURSES_LIB&quot; != &quot;&quot; ]; then
    echo $CROSS_CURSES_LIB &gt; ${libs}
    if [ x&quot;$CROSS_CURSES_INC&quot; != x ]; then
	echo $CROSS_CURSES_INC &gt; ${cflags}
    fi
    exit 0
fi

if [ -n &quot;$(command -v ${HOSTPKG_CONFIG})&quot; ]; then
	if ${HOSTPKG_CONFIG} --exists $PKG; then
		${HOSTPKG_CONFIG} --cflags ${PKG} &gt; ${cflags}
		${HOSTPKG_CONFIG} --libs ${PKG} &gt; ${libs}
		exit 0
	fi

	if ${HOSTPKG_CONFIG} --exists ${PKG2}; then
		${HOSTPKG_CONFIG} --cflags ${PKG2} &gt; ${cflags}
		${HOSTPKG_CONFIG} --libs ${PKG2} &gt; ${libs}
		exit 0
	fi
fi
[...]

But only the second one seems to be correct. If I remove the first one, menuconfig works fine.
My quick-and-dirty workaround is, to add a third patch on my layer to remove the first if-block, but that doesn&apos;t seems to be the correct way to fix this.

Best regards
Martin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106715</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-09-03 14:41:00 +0000</bug_when>
    <thetext>Martin, 

Can you check the patches that are used in linux-yocto which may be in yocto-kernel-cache. If not, ask yogesh.tyagi@intel.com or Bruce Ashfield.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106716</commentid>
    <comment_count>2</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2026-09-03 14:43:42 +0000</bug_when>
    <thetext>Interestingly, those were patched yesterday: https://git.yoctoproject.org/yocto-kernel-cache/commit/?id=225a864c394f4a6db5d774a45909304cdad5f2f8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106892</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2026-09-18 21:44:02 +0000</bug_when>
    <thetext>I think this may have been fixed now?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>