SDK build fails at gdb-cross-canadian_14.2 while image builds successfully (Verdin AM62)

Hi community,

I am working on a Verdin AM62 SoM and my project involves PyQt5. I can successfully build the image using bitbake tdx-reference-multimedia-image without any issues. However, I am facing errors only while generating the SDK using bitbake tdx-reference-multimedia-image -c populate_sdk. The failure occurs during the compilation of the GDB cross-canadian component, and the build stops with an oe_runmake failed error in gdb-cross-canadian_14.2.bb. Additionally, binutils-cross-canadian_2.42.bb also fails to compile. The issue appears to be limited to nativesdk / cross-canadian toolchain components, as the target image itself builds fine. Has anyone faced a similar issue or can suggest what to check?

Error observed:

make[2]: *** [Makefile:2173: gdb] Error 1
make[1]: *** [Makefile:10963: all-gdb] Error 2
ERROR: oe_runmake failed

ERROR: Task
meta/recipes-devtools/gdb/gdb-cross-canadian_14.2.bb:do_compile
failed with exit code '1'

Additionally, the following task also fails:

meta/recipes-devtools/binutils/binutils-cross-canadian_2.42.bb:do_compile

So the issue seems to be limited to nativesdk / cross-canadian toolchain components, not the target image itself.

Relevant local.conf entries:

DISTRO_FEATURES:append = " opengl"

# DO NOT SET THE MACHINE AFTER THE ABOVE INCLUDE
ACCEPT_FSL_EULA = "1"

IMAGE_INSTALL:append = "python3 python3-pyqt5 python3-gpiod"

# newly adding for Display
IMAGE_INSTALL:append = " nano libdrm libinput evtest weston"
IMAGE_INSTALL:append = " kernel-module-lan9252"
IMAGE_INSTALL:append = " ttf-droid-sans ttf-droid-sans-fallback ttf-droid-sans-mono ttf-droid-serif freetype"
PACKAGECONFIG_FONTS:pn-qtbase = "fontconfig"
PACKAGECONFIG:append:pn-qtvirtualkeyboard = " lang-zh_CN"

IMAGE_INSTALL:append = " canopenlinux can-utils"

I would like to understand why this error occurs specifically during SDK generation and not during the image build. Any guidance would be appreciated. Thanks in advance.

Regards,
Raju

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’d be glad to help! Could you let me know which OS and version you are using? To get this information, you can run the tdx-info command on your device. For more details, please check: Getting Device Information with Tdx-Info | Toradex Developer Center

The error you’re experiencing with SDK generation while the image builds successfully is related to cross-canadian toolchain compilation. According to the documentation, Toradex does not maintain SDKs or provide them in binary form (1). The SDK creation process uses the same Yocto Project build system to generate SDKs specific to the images (1).

SDK Generation Process

The method for generating SDKs is consistent whether building for standard Toradex demo images or custom images (1). After building your image, you can generate the SDK using:

bitbake <image_name> -c populate_sdk

(1)

The generated SDK will be located at oe-core/deploy/sdk/ (1).

Common SDK Build Issues

Your issue appears to be specific to the cross-canadian toolchain components (gdb-cross-canadian and binutils-cross-canadian), which are part of the native sysroot containing cross-compiler, linker and other development tools (1).

Recommendations

  1. Check Build Dependencies: Ensure all required packages for SDK generation are installed on your host system
  2. Clean Build State: Try cleaning the specific failing recipes before rebuilding
  3. Verify Yocto Configuration: Review your local.conf settings for any conflicting configurations that might affect cross-canadian builds
  4. Alternative SDK Recipes: Consider using alternative meta-toolchain recipes available, such as meta-toolchain.bb, meta-toolchain-qte, or meta-toolchain-qt5 which can be built with bitbake meta-toolchain-xxx (1)

Since the target image builds successfully, the issue is isolated to the SDK generation phase where additional native and cross-canadian components are compiled for the development environment.

Best regards, Toradex AI Assistant.


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

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hi community,
Any updates or responses on this query?

Hi,

I understand you’re still experiencing SDK generation issues with cross-canadian toolchain components on your Verdin AM62 SoM. Let me provide some additional troubleshooting steps based on the Toradex documentation.

SDK Generation Troubleshooting

The cross-canadian toolchain components (gdb-cross-canadian and binutils-cross-canadian) are part of the native sysroot containing cross-compiler, linker and other development tools that get packaged into the SDK(1). Since your target image builds successfully but SDK generation fails, this points to host-specific compilation issues.

Alternative SDK Approaches

The documentation mentions there are alternative ways to build an SDK using meta-toolchain recipes(1). You can try building these instead:

bitbake meta-toolchain
bitbake meta-toolchain-qt5

(1)

These alternative meta-toolchain recipes target different use cases and may avoid the specific cross-canadian compilation issues you’re encountering(1).

Qt5 SDK Considerations

Since you’re working with PyQt5, if you need Qt5 tools deployed in your SDK, you should add the following to your image recipe(1):

inherit populate_sdk populate_sdk_qt5

(1)

Additional Debugging Steps

  1. Check build logs: Examine the detailed build logs for gdb-cross-canadian and binutils-cross-canadian to identify the specific compilation error
  2. Host dependencies: Ensure your host system has all required development packages for building cross-canadian components
  3. Clean specific recipes: Try cleaning only the failing recipes:
    bitbake gdb-cross-canadian -c cleanall
    bitbake binutils-cross-canadian -c cleanall
    
  4. Disk space: Verify sufficient disk space as SDK builds require additional storage

Kernel Module Development

If you need to build kernel modules for your target system, you’ll need full kernel sources. Add this to your configuration(1):

TOOLCHAIN_TARGET_TASK:append = " kernel-devsrc"

(1)

The kernel-devsrc recipe packs the kernel sources of the kernel chosen by virtual/kernel(1).

Try the alternative meta-toolchain approach first, as this may bypass the cross-canadian compilation issues while still providing you with a functional cross-compilation environment for your PyQt5 development.

Best regards, Toradex AI Assistant.


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

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.