All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] minicom aborts
@ 2019-02-18 15:09 David PICARD
  2019-02-18 19:44 ` Peter Seiderer
  0 siblings, 1 reply; 7+ messages in thread
From: David PICARD @ 2019-02-18 15:09 UTC (permalink / raw)
  To: buildroot

Hello,
?
When I try to start minicom, some test fails, and minicom quits straight away :

# minicom
minicom: minicom.c: 1041: test_mbswidth: Assertion `mbswidth(e[i].s) == e[i]._mbswidth || mbswidth(e[i].s) == e[i]._mbswidth_kaputt' failed.
Aborted
?
The minicom.c file can be found here :
https://salsa.debian.org/minicom-team/minicom/blob/master/src/minicom.c
?
My only locale is "C".
?
I'm not sure if it's a bug in minicom or if something is missing on my system.
?
- David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] minicom aborts
  2019-02-18 15:09 [Buildroot] minicom aborts David PICARD
@ 2019-02-18 19:44 ` Peter Seiderer
  2019-02-19 11:26   ` David Picard
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Seiderer @ 2019-02-18 19:44 UTC (permalink / raw)
  To: buildroot

Hello David,

On Mon, 18 Feb 2019 16:09:41 +0100, "David PICARD" <dplamp@gmx.com> wrote:

> Hello,
> ?
> When I try to start minicom, some test fails, and minicom quits straight away :
> 
> # minicom
> minicom: minicom.c: 1041: test_mbswidth: Assertion `mbswidth(e[i].s) == e[i]._mbswidth || mbswidth(e[i].s) == e[i]._mbswidth_kaputt' failed.
> Aborted
> ?
> The minicom.c file can be found here :
> https://salsa.debian.org/minicom-team/minicom/blob/master/src/minicom.c
> ?
> My only locale is "C".
> ?
> I'm not sure if it's a bug in minicom or if something is missing on my system.

Try to run with enabled printf debug output:

1038      if (0)
1039         printf("%d: mbswidth=%zd\n", i, mbswidth(e[i].s));
1040       assert(mbswidth(e[i].s) == e[i]._mbswidth
1041 	     || mbswidth(e[i].s) == e[i]._mbswidth_kaputt);

And take a look which test fails with which value...

And share your .config/defconfig file...

Regards,
Peter
 
> ?
> - David
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] minicom aborts
  2019-02-18 19:44 ` Peter Seiderer
@ 2019-02-19 11:26   ` David Picard
  2019-02-19 18:35     ` Peter Seiderer
  0 siblings, 1 reply; 7+ messages in thread
From: David Picard @ 2019-02-19 11:26 UTC (permalink / raw)
  To: buildroot

Hello,

Le 18/02/2019 ? 20:44, Peter Seiderer a ?crit?:
> Hello David,
>
> On Mon, 18 Feb 2019 16:09:41 +0100, "David PICARD" <dplamp@gmx.com> wrote:
>
>> Hello,
>>   
>> When I try to start minicom, some test fails, and minicom quits straight away :
>>
>> # minicom
>> minicom: minicom.c: 1041: test_mbswidth: Assertion `mbswidth(e[i].s) == e[i]._mbswidth || mbswidth(e[i].s) == e[i]._mbswidth_kaputt' failed.
>> Aborted
>>   
>> The minicom.c file can be found here :
>> https://salsa.debian.org/minicom-team/minicom/blob/master/src/minicom.c
>>   
>> My only locale is "C".
>>   
>> I'm not sure if it's a bug in minicom or if something is missing on my system.
> Try to run with enabled printf debug output:
>
> 1038      if (0)
> 1039         printf("%d: mbswidth=%zd\n", i, mbswidth(e[i].s));
> 1040       assert(mbswidth(e[i].s) == e[i]._mbswidth
> 1041 	     || mbswidth(e[i].s) == e[i]._mbswidth_kaputt);
>
> And take a look which test fails with which value...
So I put "if (1)" in line 1038. The test that failed was the 1st. So I 
commented out the lines with Asian characters at the beginning of the 
function, but it still failed. Finally, I put a "return" statement at 
the beginning of the function, and now it works.

I attached my defconfig.
>
> And share your .config/defconfig file...
>
> Regards,
> Peter
>   
>>   
>> - David
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
BR2_x86_geode=y
BR2_DL_DIR="$(BASE_DIR)/../dl_scanotron"
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_PTHREAD_DEBUG=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_HOST_GDB=y
BR2_PACKAGE_HOST_GDB_TUI=y
BR2_PACKAGE_HOST_GDB_PYTHON=y
BR2_TARGET_GENERIC_HOSTNAME="scanotron"
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_TARGET_GENERIC_ROOT_PASSWD="toor"
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_SCANOTRON_PATH)/board/lx800/rootfs_overlay"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/pc/post-image.sh support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pc/genimage-bios.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.18.10"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_SCANOTRON_PATH)/board/lx800/linux.config"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_LIBERATION=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS="-no-sse2"
BR2_PACKAGE_QT5BASE_LINUXFB=y
BR2_PACKAGE_QT5BASE_XCB=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="xcb"
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
BR2_PACKAGE_QT5BASE_JPEG=y
BR2_PACKAGE_QT5BASE_PNG=y
BR2_PACKAGE_QT5BASE_DBUS=y
BR2_PACKAGE_QT5BASE_TSLIB=y
BR2_PACKAGE_QT5SERIALBUS=y
BR2_PACKAGE_QEXTSERIALPORT=y
BR2_PACKAGE_QWT=y
BR2_PACKAGE_QWT_MATHML=y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S_EXT2=y
BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
BR2_TARGET_GRUB2=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_LIBRST=y
BR2_PACKAGE_LIBSZDIST=y
BR2_PACKAGE_PUSHDATA=y

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] minicom aborts
  2019-02-19 11:26   ` David Picard
@ 2019-02-19 18:35     ` Peter Seiderer
  2019-02-20 10:07       ` David Picard
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Seiderer @ 2019-02-19 18:35 UTC (permalink / raw)
  To: buildroot

Hello David,

On Tue, 19 Feb 2019 12:26:43 +0100, David Picard <dplamp@gmx.com> wrote:

> Hello,
> 
> Le 18/02/2019 ? 20:44, Peter Seiderer a ?crit?:
> > Hello David,
> >
> > On Mon, 18 Feb 2019 16:09:41 +0100, "David PICARD" <dplamp@gmx.com> wrote:
> >  
> >> Hello,
> >>   
> >> When I try to start minicom, some test fails, and minicom quits straight away :
> >>
> >> # minicom
> >> minicom: minicom.c: 1041: test_mbswidth: Assertion `mbswidth(e[i].s) == e[i]._mbswidth || mbswidth(e[i].s) == e[i]._mbswidth_kaputt' failed.
> >> Aborted
> >>   
> >> The minicom.c file can be found here :
> >> https://salsa.debian.org/minicom-team/minicom/blob/master/src/minicom.c
> >>   
> >> My only locale is "C".
> >>   
> >> I'm not sure if it's a bug in minicom or if something is missing on my system.  
> > Try to run with enabled printf debug output:
> >
> > 1038      if (0)
> > 1039         printf("%d: mbswidth=%zd\n", i, mbswidth(e[i].s));
> > 1040       assert(mbswidth(e[i].s) == e[i]._mbswidth
> > 1041 	     || mbswidth(e[i].s) == e[i]._mbswidth_kaputt);
> >
> > And take a look which test fails with which value...  
> So I put "if (1)" in line 1038. The test that failed was the 1st. So I 
> commented out the lines with Asian characters at the beginning of the 
> function, but it still failed. Finally, I put a "return" statement at 
> the beginning of the function, and now it works.

I can confirm minicom (without modifications) needs an UTF8 enabled locale
(e.g. LANG=en_US.utf8) to run without the assert...

The function mbswidth() is implemented in common.c ([1]), using
mbstowcs()....

Regards,
Peter

[1] https://salsa.debian.org/minicom-team/minicom/blob/master/src/common.c#L117

> 
> I attached my defconfig.
> >
> > And share your .config/defconfig file...
> >
> > Regards,
> > Peter
> >     
> >>   
> >> - David
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot at busybox.net
> >> http://lists.busybox.net/mailman/listinfo/buildroot  
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] minicom aborts
  2019-02-19 18:35     ` Peter Seiderer
@ 2019-02-20 10:07       ` David Picard
  2019-10-21 20:34         ` AndrePinto
  0 siblings, 1 reply; 7+ messages in thread
From: David Picard @ 2019-02-20 10:07 UTC (permalink / raw)
  To: buildroot

Hello,

Well, that looks cleaner than my quick and dirty patch...

But how do I enable a UTF8 locale ? A "grep LOCALE .config" returns this :

BR2_ENABLE_LOCALE_PURGE=y
BR2_ENABLE_LOCALE_WHITELIST="C en_US"

Thanks,
David

Le 19/02/2019 ? 19:35, Peter Seiderer a ?crit?:
> I can confirm minicom (without modifications) needs an UTF8 enabled locale
> (e.g. LANG=en_US.utf8) to run without the assert...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] minicom aborts
  2019-02-20 10:07       ` David Picard
@ 2019-10-21 20:34         ` AndrePinto
  2019-10-22 19:21           ` Peter Seiderer
  0 siblings, 1 reply; 7+ messages in thread
From: AndrePinto @ 2019-10-21 20:34 UTC (permalink / raw)
  To: buildroot

Hello,

Did you fix that without modifying the code? I am facing the same problem.

Thanks for your attention.

Andr?.



--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] minicom aborts
  2019-10-21 20:34         ` AndrePinto
@ 2019-10-22 19:21           ` Peter Seiderer
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Seiderer @ 2019-10-22 19:21 UTC (permalink / raw)
  To: buildroot

Hello Andre,

On Mon, 21 Oct 2019 15:34:35 -0500 (CDT), AndrePinto <andrealmeidap1996@gmail.com> wrote:

> Hello,
> 
> Did you fix that without modifying the code? I am facing the same problem.

Should be fixes without code modifying, run with e.g.

	LANG=en_US.utf8 minicom

in case en_US.utf8 is enabled in your buildroot config, e.g.

	BR2_GENERATE_LOCALE="en_US"

Regards,
Peter

> 
> Thanks for your attention.
> 
> Andr?.
> 
> 
> 
> --
> Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-22 19:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 15:09 [Buildroot] minicom aborts David PICARD
2019-02-18 19:44 ` Peter Seiderer
2019-02-19 11:26   ` David Picard
2019-02-19 18:35     ` Peter Seiderer
2019-02-20 10:07       ` David Picard
2019-10-21 20:34         ` AndrePinto
2019-10-22 19:21           ` Peter Seiderer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.