diff mbox series

sanity.bbclass: Lower the length of TMPDIR limit to 300

Message ID 20260114090413.586488-1-changqing.li@windriver.com
State New
Headers show
Series sanity.bbclass: Lower the length of TMPDIR limit to 300 | expand

Commit Message

Changqing Li Jan. 14, 2026, 9:04 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

With TMPDIR set to 400, gtk+3-native compile failed with failure:
ninja: fatal: posix_spawn: Argument list too long

Refer [1], one of the meson.build of gtk3, the list of files is long,
and with a long path, there files list will make arguments huge for
ninja. Refer [2], the open issue for ninja, meson need to improve
to make this work, and there is a fix for this, refer [3], but we can
still reproduce this issue with poky, I open an new issue for meson,
refer [4], and meantime, change our TMPDIR limit to 300 to avoid
this kind of issue. I also tested with 350, not works.

[1] https://github.com/gooroom/gtk3/blob/gooroom-3.0/gtk/meson.build
[2] https://github.com/ninja-build/ninja/issues/1261
[3] https://github.com/mesonbuild/meson/pull/7245
[4] https://github.com/mesonbuild/meson/issues/15423

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/classes-global/sanity.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alexander Kanavin Jan. 14, 2026, 10:22 a.m. UTC | #1
On Wed, 14 Jan 2026 at 10:04, Changqing Li via lists.openembedded.org
<changqing.li=windriver.com@lists.openembedded.org> wrote:
> Refer [1], one of the meson.build of gtk3, the list of files is long,
> and with a long path, there files list will make arguments huge for
> ninja. Refer [2], the open issue for ninja, meson need to improve
> to make this work, and there is a fix for this, refer [3], but we can
> still reproduce this issue with poky, I open an new issue for meson,
> refer [4], and meantime, change our TMPDIR limit to 300 to avoid
> this kind of issue. I also tested with 350, not works.

This kind of fix will just encourage further reductions in the limit,
as other components will be discovered for which even 300 is not good
enough.

I'd rather find a way to address the issue at the source, and carry a
custom patch for that, if upstream is sluggish to resolve it.

Alex
diff mbox series

Patch

diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
index c89ff2c51f..376f6e66af 100644
--- a/meta/classes-global/sanity.bbclass
+++ b/meta/classes-global/sanity.bbclass
@@ -803,8 +803,8 @@  def check_sanity_version_change(status, d):
     if not oes_bb_conf:
         status.addresult('You are not using the OpenEmbedded version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n')
 
-    # The length of TMPDIR can't be longer than 400
-    status.addresult(check_path_length(tmpdir, "TMPDIR", 400))
+    # The length of TMPDIR can't be longer than 300
+    status.addresult(check_path_length(tmpdir, "TMPDIR", 300))
 
     # Check that TOPDIR does not contain non ascii chars (perl_5.40.0, Perl-native and shadow-native build failures)
     status.addresult(check_non_ascii(topdir, "TOPDIR"))