Error During Plymouth Compilation for Splash Screen on iMX8MP with Yocto Scarthgap

Hi,
I’m working with the i.MX8MP Verdin SoM on the Mallow Carrier Board, and I’ve successfully built a Yocto image using the Scarthgap release. I’m now trying to add a custom splash screen using Plymouth, following the official Toradex guide:

I followed all the steps mentioned in the documentation, including setting up the layers and enabling Plymouth, but I’m encountering a build error during the do_compile task of the plymouth recipe.
Here is the error summary:
ERROR: plymouth-24.004.60-r0 do_compile: ExecutionError(‘/home/vilter/splash_screen/build/tmp/work/armv8a-mx8mp-tdx-linux/plymouth/24.004.60/temp/run.do_compile.604464’, 1, None, None)
ERROR: Logfile of failure stored in: /home/vilter/splash_screen/build/tmp/work/armv8a-mx8mp-tdx-linux/plymouth/24.004.60/temp/log.do_compile.604464
| …/plymouth-24.004.60/src/main.c: In function ‘get_theme_path’:
| …/plymouth-24.004.60/src/main.c:288:17: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
| 288 | asprintf (theme_path,
| | ^~~~~~~~~~~~~~~~~~~~~
| 289 | “%s/%s/%s.plymouth”,
| | ~~~~~~~~~~~~~~~~~~~~
| 290 | paths[i], splash_string, splash_string);
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ninja: build stopped: subcommand failed.
| INFO: autodetecting backend as ninja
| INFO: calculating backend command to run: /home/vilter/splash_screen/build/tmp/work/armv8a-mx8mp-tdx-linux/plymouth/24.004.60/recipe-sysroot-native/usr/bin/ninja -j 17 -v
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/vilter/splash_screen/build/…/layers/meta-openembedded/meta-oe/recipes-core/plymouth/plymouth_24.004.60.bb:do_compile) failed with exit code ‘1’

Could you please help me understand what could be causing this compilation failure and how to resolve it? Is there any known issue with plymouth in the Scarthgap release or a patch that I might be missing?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello,

Thank you for your detailed explanation and for sharing the steps you’ve followed so far!

The error you’re encountering during the Plymouth build is due to a compiler warning being treated as an error:

warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]

This issue can occur because, in some configurations and with recent GCC versions, warnings are treated as errors (using the -Werror flag), which causes the build to stop even for non-critical warnings.

How to Fix:

1. Clean the Build

First, ensure that any failed build artifacts are cleaned:

bitbake -c clean plymouth
bitbake -c cleansstate plymouth

2. Try Rebuilding

Attempt to rebuild Plymouth:

bitbake plymouth

3. If Error Persists: Disable -Werror

If the problem persists, you’ll need to prevent the compiler from treating warnings as errors for Plymouth. You can do this by appending the following to your custom layer’s plymouth_%.bbappend file (or creating one if it doesn’t exist):

EXTRA_OECONF:append = " CFLAGS='-Wno-error'"

Or, more specifically, if there is already an EXTRA_OECONF line, you can add just:

CFLAGS += "-Wno-error"

This flags configuration instructs the compiler to not treat warnings as errors.

4. Confirm Directory Structure

Ensure your layer’s directory and files structure matches the Toradex guide:

meta-custom/
├── recipes-core/
│   └── plymouth/
│       ├── files/
│       │   ├── spinner.plymouth
│       │   └── torizonlogo-white.png
│       └── plymouth_%.bbappend

More details here:
How to Add a Custom Splash Screen (Linux)

5. Build Again

After applying the change, clean the build state again and rebuild:

bitbake -c clean plymouth
bitbake -c cleansstate plymouth
bitbake plymouth

Or build your entire image:

bitbake tdx-reference-multimedia-image

Additional Notes

  • This issue is not unique to the Scarthgap release, but can arise depending on toolchain versions.
  • If you are using a version-controlled environment, ensure any changes to layer files are saved/committed.
  • For reference, you may consult the Custom Splash Screen documentation.

If you’re still having trouble, please provide the content of your plymouth_%.bbappend file and, if possible, the full compile log for further analysis.

Best regards,
Toradex AI Assistant.

Hi @nidhishende ,
Is your issue solved after following suggestions from ToradexAI?