diff mbox series

[v2] ncurses: Fix install conflict when enable multilib.

Message ID 1736843308-4094-1-git-send-email-wangmy@fujitsu.com
State New
Headers show
Series [v2] ncurses: Fix install conflict when enable multilib. | expand

Commit Message

Mingyu Wang (Fujitsu) Jan. 14, 2025, 8:28 a.m. UTC
From: Wang Mingyu <wangmy@fujitsu.com>

After enable multilib in armv8, there are differences in the terminfo files between lib32 and lib64 packages.

The differences of kbs between ncurses-terminfo nad lib32-ncurses-terminfo are as follows:

Comments

Alexander Kanavin Jan. 14, 2025, 10:59 a.m. UTC | #1
On Tue, 14 Jan 2025 at 09:28, wangmy via lists.openembedded.org
<wangmy=fujitsu.com@lists.openembedded.org> wrote:
> After consulting with the upstream of ncurses, it is possible to specify kbs by setting --with-xterm-kbs=XXX.
> Based on the instructions in https://github.com/ThomasDickey/ncurses-snapshots/blob/master/configure#L9810,
> it is appropriate to add --with-xterm-kbs=del.

I'd like to dig a little bit deeper into this, because I'm not sure
how the mismatch could happen. The configure script does this
autodetection:

case $host_os in
(*linux-gnu|*cygwin|*mingw32|*msys)
    want_xterm_kbs=DEL
    ;;
(*)
    want_xterm_kbs=BS
    ;;
esac

Presumably it chooses BS option in one of your multilib
configurations, but I do not understand why would that be. Can you
share log.do_configure for both of them, particularly interesting
would be the part where it sets host_os:

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-poky-linux-gnu
checking target system type... x86_64-poky-linux-gnu
Configuring for linux-gnu

Thanks,
Alex
Mingyu Wang (Fujitsu) Jan. 15, 2025, 1:04 a.m. UTC | #2
> case $host_os in
> (*linux-gnu|*cygwin|*mingw32|*msys)
>     want_xterm_kbs=DEL
>     ;;
> (*)
>     want_xterm_kbs=BS
>     ;;
> esac

We check the output of host_os when enable multilib:
$host_os of aarch64 : linux-gnu
$host_os of aarch32: linux-gnueabi

We think about two solutions:
1. Use the v2 patch to specify --with-xterm-kbs=del
2. Temporarily modify the following code in Yocto. And submit patches to upstream:
--- a/configure
+++ b/configure
@@ -9470,7 +9470,7 @@ echo "${ECHO_T}$with_xterm_new" >&6
 WHICH_XTERM=$with_xterm_new
 
 case $host_os in
-(*linux-gnu|*cygwin|*mingw32|*msys)
+(*linux-gnu*|*cygwin|*mingw32|*msys)
        want_xterm_kbs=DEL
        ;;
 (*)

Which plan do you think is better?

  --
Best Regards
---------------------------------------------------
Wang Mingyu
FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST)
No.6 Wenzhu Road, Nanjing, 210012, China
TEL:+86+25-86630566--8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: wangmy@fujitsu.com

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org
> <openembedded-core@lists.openembedded.org> On Behalf Of Alexander
> Kanavin via lists.openembedded.org
> Sent: Tuesday, January 14, 2025 7:00 PM
> To: Wang, Mingyu/王 鸣瑜 <wangmy@fujitsu.com>
> Cc: openembedded-core@lists.openembedded.org; Lei, Maohui/雷 茂慧
> <leimaohui@fujitsu.com>
> Subject: Re: [PATCH] [OE-core] [PATCH v2] ncurses: Fix install conflict when
> enable multilib.
> 
> On Tue, 14 Jan 2025 at 09:28, wangmy via lists.openembedded.org
> <wangmy=fujitsu.com@lists.openembedded.org> wrote:
> > After consulting with the upstream of ncurses, it is possible to specify kbs by
> setting --with-xterm-kbs=XXX.
> > Based on the instructions in
> > https://github.com/ThomasDickey/ncurses-snapshots/blob/master/configur
> > e#L9810, it is appropriate to add --with-xterm-kbs=del.
> 
> I'd like to dig a little bit deeper into this, because I'm not sure how the mismatch
> could happen. The configure script does this
> autodetection:
> 
> case $host_os in
> (*linux-gnu|*cygwin|*mingw32|*msys)
>     want_xterm_kbs=DEL
>     ;;
> (*)
>     want_xterm_kbs=BS
>     ;;
> esac
> 
> Presumably it chooses BS option in one of your multilib configurations, but I do
> not understand why would that be. Can you share log.do_configure for both of
> them, particularly interesting would be the part where it sets host_os:
> 
> checking build system type... x86_64-pc-linux-gnu checking host system type...
> x86_64-poky-linux-gnu checking target system type... x86_64-poky-linux-gnu
> Configuring for linux-gnu
> 
> Thanks,
> Alex
Alexander Kanavin Jan. 15, 2025, 12:08 p.m. UTC | #3
On Wed, 15 Jan 2025 at 02:04, Mingyu Wang (Fujitsu) <wangmy@fujitsu.com> wrote:
> We think about two solutions:
> 1. Use the v2 patch to specify --with-xterm-kbs=del
> 2. Temporarily modify the following code in Yocto. And submit patches to upstream:
> --- a/configure
> +++ b/configure
> @@ -9470,7 +9470,7 @@ echo "${ECHO_T}$with_xterm_new" >&6
>  WHICH_XTERM=$with_xterm_new
>
>  case $host_os in
> -(*linux-gnu|*cygwin|*mingw32|*msys)
> +(*linux-gnu*|*cygwin|*mingw32|*msys)
>         want_xterm_kbs=DEL
>         ;;
>  (*)
>
> Which plan do you think is better?

I think this plan with two action points:
1. Specify --with-xterm-kbs=del in the recipe. You can adjust the
commit message to explain the above problem with linux-gnueabi.
2. At the same time, propose the above patch upstream, without adding
it to Yocto.

Alex
diff mbox series

Patch

--- armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-ncurses/6.5/image/usr/share/terminfo/x/xterm+kbs2025-01-14 03:45:45.669478283 +0000
+++ cortexa57-poky-linux/ncurses/6.5/image/usr/share/terminfo/x/xterm+kbs2025-01-14 01:18:20.497366368 +0000
@@ -1 +1 @@ 
-%8xterm+kbs|fragment for backspace key??????????????????????????????????????????????????????????????????????????????????????????????????????????????
\ No newline at end of file
+%8xterm+kbs|fragment for backspace key??????????????????????????????????????????????????????????????????????????????????????????????????????????????
\ No newline at end of file

After consulting with the upstream of ncurses, it is possible to specify kbs by setting --with-xterm-kbs=XXX.
Based on the instructions in https://github.com/ThomasDickey/ncurses-snapshots/blob/master/configure#L9810,
it is appropriate to add --with-xterm-kbs=del.

Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
---
 meta/recipes-core/ncurses/ncurses.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index e96ee075bd..3f93550cf9 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -70,6 +70,7 @@  ncurses_configure() {
 	        --without-debug \
 	        --without-ada \
 	        --without-gpm \
+		--with-xterm-kbs=del \
 	        --enable-hard-tabs \
 	        --enable-xmc-glitch \
 	        --enable-colorfgbg \