Unfortunately I already cleared those build logs. But the issue is reproducible for me, so I set up a new build like this:

flk@intel-corei7-64:~/bitbake-setup$ bin/bitbake-setup init
Bitbake-setup is using /home/flk/bitbake-builds as top directory ("bitbake-setup settings --help" shows how to change it).

A common site.conf file will be created, please edit or replace before running builds
   /home/flk/bitbake-builds/site.conf

Proceed? (y/N): y

Available configurations:
0. oe-nodistro OpenEmbedded - 'nodistro' basic configuration
1. poky-master Poky - The Yocto Project testing distribution configurations and hardware test platforms

Please select one of the above configurations by its number:
1

Available bitbake configurations:
0. poky Poky - The Yocto Project testing distribution
1. poky-with-sstate Poky - The Yocto Project testing distribution with internet sstate acceleration. Use with caution as it requires a completely robust local network with sufficient bandwidth.

Please select one of the above bitbake configurations by its number:
0

Target machines:
0. machine/qemux86-64
1. machine/qemuarm64
2. machine/qemuriscv64
3. machine/genericarm64
4. machine/genericx86-64

Please select one of the above options by its number:
4

Distribution configuration variants:
0. distro/poky
1. distro/poky-altcfg
2. distro/poky-tiny

Please select one of the above options by its number:
1

Run 'bitbake-setup init --non-interactive poky-master poky distro/poky-altcfg machine/genericx86-64' to select this configuration non-interactively.

Initializing a setup directory in
/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64
Continue? (y/N): y

Fetching layer/tool repositories into /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/layers
   bitbake
   openembedded-core
   meta-yocto
   yocto-docs

Setting up bitbake configuration in
/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build

This bitbake configuration provides:
   Poky - The Yocto Project testing distribution

Usage instructions and additional information are in
/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/README

The bitbake configuration files (local.conf, bblayers.conf and more) can be found in /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/conf

To run builds, source the environment using
. /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/init-build-env

Then I manually cloned meta-intel into /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/layers and added an entry for it in /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/conf/bblayers.conf

After that, I started compiling intel-media-driver, which immediately failed at do_compile: ERROR: intel-media-driver-25.1.4-r0 do_compile: Execution of '/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/temp/run.do_compile.2138089' failed with exit code 1 ERROR: Logfile of failure stored in: /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/temp/log.do_compile.2138089
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: VERBOSE=1 cmake --build /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/build --target all -- | Change Dir: '/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/build'
|
| Run Build Command(s): ninja -v -j 32 all
| ninja: fatal: posix_spawn: Argument list too long
|
| WARNING: /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/temp/run.do_compile.2138089:153 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
| WARNING: Backtrace (BB generated script):
| #1: cmake_runcmake_build, /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/temp/run.do_compile.2138089, line 153 | #2: cmake_do_compile, /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/temp/run.do_compile.2138089, line 147 | #3: do_compile, /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/temp/run.do_compile.2138089, line 142 | #4: main, /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/temp/run.do_compile.2138089, line 166 ERROR: Task (/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/layers/meta-intel/recipes-multimedia/libva/intel-media-driver_25.1.4.bb:do_compile) failed with exit code '1'

I attempted to circumvent this error by adding the following to the intel-media-driver recipe:

EXTRA_OECMAKE += "-DCMAKE_NINJA_FORCE_RESPONSE_FILE=ON"

Now compilation started and failed some time later with a more informative error: | FAILED: [code=1] media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/agnostic/common/cm/cm_array.cpp.o | /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++ --sysroot=/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/recipe-sysroot @media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/agnostic/common/cm/cm_array.cpp.o.rsp -MD -MT media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/agnostic/common/cm/cm_array.cpp.o -MF media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/agnostic/common/cm/cm_array.cpp.o.d -o media_driver/CMakeFiles/iHD_drv_video_COMMON.dir/agnostic/common/cm/cm_array.cpp.o -c /home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/sources/intel-media-driver-25.1.4/media_driver/agnostic/common/cm/cm_array.cpp | x86_64-poky-linux-g++: fatal error: cannot execute '/home/flk/bitbake-builds/poky-master-poky-distro_poky-altcfg-machine_genericx86-64/build/tmp/work/core2-64-poky-linux/intel-media-driver/25.1.4/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/15.2.0/cc1plus': posix_spawn: Argument list too long
| compilation terminated.


This is the directory name I am referring to: 'poky-master-poky-distro_poky-altcfg-machine_genericx86-64' And it would have been even longer if I had decided to use sstate mirror.

On Tue, Nov 11 2025 at 11:23:16 +01:00:00, Alexander Kanavin <[email protected]> wrote:
On Mon, 10 Nov 2025 at 18:37, Markus Volk <[email protected] <mailto:[email protected]>> wrote:
I ran some tests with the bitbake-setup tool and noticed a problem that is at least partly related to the long name of the setup directory.

 With the default value, compiling intel-media-driver fails with:
 posix_spawn: Argument list too long

It turns out that this is a known issue when the string length reaches MAX_ARG_STRLEN.
 <https://github.com/ninja-build/ninja/issues/1261>

To verify this assumption, I changed the setup directory name to just ā poky,ā which avoided the problem. This is an annoying issue and not a satisfactory solution, but perhaps it will help as a bug report or if someone else encounters the same problem.

 Perhaps using response files would help?

I'd like to see how you ended up with a directory name that is too
long for intel-media-driver. Can you share the build logs that pass
and those that fail?

Bitbake-setup does not add that much to the build paths, so trying to
make it even shorter will not solve the issue properly.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#226161): 
https://lists.openembedded.org/g/openembedded-core/message/226161
Mute This Topic: https://lists.openembedded.org/mt/116223608/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to