Bug 15764

Summary: build failure if $TOPDIR contains non-ASCII characters
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yoann Congal <yoann.congal>
Component: coreAssignee: Yoann Congal <yoann.congal>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher, yoann.congal
Version: unspecified   
Target Milestone: 0.0.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)
Attachments:
Description Flags
Perl-native:do_compile failure when using "poké/" as TOPDIR
none
shadow-native:do_configure failure when using "poké/" as TOPDIR none

Description Yoann Congal 2025-02-17 22:37:07 UTC
Created attachment 5102 [details]
Perl-native:do_compile failure when using "poké/" as TOPDIR

In French, the ~/Downloads/ directory is called "~/Téléchargements/" the "é" here are non-ASCII characters. When a user used this directory as base to clone poky, it resulted in build failure.

I did reproduced it with a poky directory named "poké" => At least perl-native:do_compile fails (log attached):
  make[1]: Leaving directory '<snip>/poké/build/tmp/work/x86_64-linux/perl-native/5.40.0/perl-5.40.0-build'
  WARNING: exit code 1 from a shell command.
  /bin/sh: 1: <snip>/poké/build/tmp/work/x86_64-linux/perl-native/5.40.0/perl-5.40.0-build/dist/lib/../../miniperl_top: not found
  make[2]: *** [Makefile:351: ../../lib/auto/lib/.exists] Error 127

As Randy wrote[0]: "There are likely lots of assumption on ASCII strings only for filenames." so we maybe need to check the TOPDIR path is ASCII only? in sanity.bbclass (like TOPDIR path length) ?

Maybe linked tickets:
* 15500 – "devtool upgrade" cannot handle unicode characters in filenames : https://bugzilla.yoctoproject.org/show_bug.cgi?id=15500#c2
* 15375 – Define what a valid layer name can contain (and what it cannot) : https://bugzilla.yoctoproject.org/show_bug.cgi?id=15375

[0]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15500#c2
Comment 1 Yoann Congal 2025-02-18 07:42:10 UTC
Created attachment 5103 [details]
shadow-native:do_configure failure when using "poké/" as TOPDIR

Also, shadow-native:do_configure fails (logs attached).
But there most likely are some more failures down the dependency tree.
Comment 2 Yoann Congal 2025-02-19 09:47:19 UTC
Patch adding a sanity check sent:
[PATCH] sanity: Check for non ascii chars in TOPDIR
https://lists.openembedded.org/g/openembedded-core/topic/patch_sanity_check_for_non/111266915
Comment 3 Yoann Congal 2025-02-20 15:56:51 UTC
[PATCH v2] sanity: Check for non ascii chars in TOPDIR
https://lists.openembedded.org/g/openembedded-core/topic/patch_v2_sanity_check_for/111268354