I am working with scarthgap 7.4 and i need to build an image with the library libgpiod.so.2, not libgpiod.so.3 , i understud that the library libgpiod.so.2 use the version 1.x instead libgpiod.so.3 use the version 2.x. Now i tried some configuration to take it and at the end i have removed the file meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_2.1.2.bb and leave only meta-openembedded/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb ,but always the libgpiod.so.3 is created.
What can i do to solve this problem related with a legacy application ?.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
I’d be glad to help with your libgpiod version requirement! To provide the most accurate guidance for your Yocto build configuration, could you let me know which hardware platform and OS version you are using? You can run the tdx-info command on your device to get this information - more details are available at https://developer.toradex.com/software/development-resources/tdx-info/.
This will help me provide specific instructions for configuring your Yocto build to use libgpiod version 1.x (libgpiod.so.2) instead of version 2.x (libgpiod.so.3) for your legacy application requirements.
Best regards, Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
Thank you for providing the system information! I can see you’re using a Colibri iMX8QXP with BSP 7.4.0 and the TDX Wayland distribution (1).
For your libgpiod version requirement, you’ll need to modify your Yocto build configuration to force the use of libgpiod version 1.x instead of 2.x. Here’s how to address this in your Yocto build:
Solution Approaches
1. Recipe Preference Method
Create a custom layer or modify your local.conf to prefer the older libgpiod version by adding:
Create a .bbappend file in your custom layer to override the libgpiod recipe selection and ensure the 1.x version is built with the correct library naming.
3. Layer Priority Adjustment
Since you’re working with the meta-openembedded layer, you may need to adjust layer priorities in your bblayers.conf to ensure your preferred version takes precedence (2).
Important Configuration Notes
When building for NXP-based SoMs like your Colibri iMX8QXP, ensure you have the following in your local.conf:
The issue you’re experiencing where libgpiod.so.3 is still being created despite removing the 2.1.2 recipe suggests that the build system may have cached dependencies or that another recipe is pulling in the newer version.
Recommended Steps
Clean your build environment completely: bitbake -c cleanall libgpiod
Verify no other recipes depend on libgpiod 2.x
Apply the PREFERRED_VERSION setting in your local.conf
Rebuild your image
This approach should ensure your legacy application gets the libgpiod.so.2 library it requires while maintaining compatibility with the BSP 7.4.0 framework (3).
Best regards, Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
The recommended approach would be to compile your program so that it is linked against the correct library in your system.
For that, I recommend that you compile your application either in a Yocto recipe or using the SDK which Yocto can generate: Linux SDKs | Toradex Developer Center