Bug 15764 - build failure if $TOPDIR contains non-ASCII characters
Summary: build failure if $TOPDIR contains non-ASCII characters
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 0.0.0
Assignee: Yoann Congal
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2025-02-17 22:37 UTC by Yoann Congal
Modified: 2025-02-20 15:58 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments
Perl-native:do_compile failure when using "poké/" as TOPDIR (1.86 KB, text/plain)
2025-02-17 22:37 UTC, Yoann Congal
no flags Details
shadow-native:do_configure failure when using "poké/" as TOPDIR (14.84 KB, text/plain)
2025-02-18 07:42 UTC, Yoann Congal
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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