Skip to content
Code Vì Thích

Code Vì Thích

Saved my learning code and solution for some bugs!!!

    • Home
    • Contents
      • Programming
        • Python
      • Technology Fields
      • Bugs and Solutions
      • Tools
      • Questions and Answers
    • About

    [Yocto] ERROR: The metadata is not deterministic and this needs to be fixed.

    Bugs and Solutions
    admin in 20 May 2022
    Post Views: 12,569

    I am facing “Taskhash mismatch ” & “The metadata is not deterministic and this needs to be fixed” & “Taskhash mismatch “ errors in Yocto project build. This issue occurred without any obvious reasons. There is no change in the source code/recipe or any other build parameters.

    Error log:

    ERROR: When reparsing /home/Yoctos/5.10.72_2.2.0/sources/meta-imx/meta-sdk/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_5.8.0.bb:do_compile, the basehash value changed from c9a5e395231ebddcceb23cb3312e6658a038657173d8e603775fb10f6ed83395 to 98c5b2d2904c60d576ea88a2eb3a44bc8e0c61e72c15954e9ca2eee31ace0f3c. The metadata is not deterministic and this needs to be fixed.
    ERROR: The following commands may help:

    ERROR: $ bitbake imx-gpu-sdk -cdo_compile -Snone

    ERROR: Then:

    ERROR: $ bitbake imx-gpu-sdk -cdo_compile -Sprintdiff

    or

    ERROR: When reparsing /home/nxf71573/Yoctos/5.10.72_2.2.0/sources/meta-imx/meta-sdk/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_5.8.0.bb:do_compile, the basehash value changed from c9a5e395231ebddcceb23cb3312e6658a038657173d8e603775fb10f6ed83395 to 98c5b2d2904c60d576ea88a2eb3a44bc8e0c61e72c15954e9ca2eee31ace0f3c. The metadata is not deterministic and this needs to be fixed.

    ERROR: The following commands may help:

    ERROR: $ bitbake imx-gpu-sdk -cdo_compile -Snone

    ERROR: Then:

    ERROR: $ bitbake imx-gpu-sdk -cdo_compile -Sprintdiff

    ERROR: Bitbake’s cached basehash does not match the one we just generated (/home/nxf71573/Yoctos/5.10.72_2.2.0/sources/meta-imx/meta-sdk/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_5.8.0.bb:do_compile)!

    ERROR: The mismatched hashes were c9a5e395231ebddcceb23cb3312e6658a038657173d8e603775fb10f6ed83395 and 98c5b2d2904c60d576ea88a2eb3a44bc8e0c61e72c15954e9ca2eee31ace0f3c

    ERROR: Taskhash mismatch 540cf4f9ec55ea13ab8671eb9d15e923294edf15c4901d901e2198272f86a578 versus f470bf5f0b7758ac36c24e691112ffd09f5a398d6d1c6119d9274961fb01d973 for /home/nxf71573/Yoctos/5.10.72_2.2.0/sources/meta-imx/meta-sdk/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_5.8.0.bb:do_compile

    My temporary solution is changing old_basehash to new_basehash logged in the error log (the basehash value changed from old_basehash to new_basehash.) at  cache file in folder ./tmp/cache/

    In my case:

    old_basehash:c9a5e395231ebddcceb23cb3312e6658a038657173d8e603775fb10f6ed83395

    new_basehash:98c5b2d2904c60d576ea88a2eb3a44bc8e0c61e72c15954e9ca2eee31ace0f3c

    • Step1: search old_basehash in folder ./tmp/cache
      ~/Yoctos/5.10.72_2.2.0/build-imx8qxpc0$ grep -rn c9a5e395231ebddcceb23cb3312e6658a038657173d8e603775fb10f6ed83395 tmp/cache
      Binary file tmp/cache/default-glibc/imx8qxpc0mek/x86_64/bb_cache.dat.32802993559eecd8b079a9361443b2917b3bce4a2d54cfba659be1e813fc1769 matches
    • Step2: Replace old_basehash by new_basehash; open cache file had found in step 1 and replace 98c5b2d2904c60d576ea88a2eb3a44bc8e0c61e72c15954e9ca2eee31ace0f3c by 98c5b2d2904c60d576ea88a2eb3a44bc8e0c61e72c15954e9ca2eee31ace0f3c
      ~/Yoctos/5.10.72_2.2.0/build-imx8qxpc0$ vim ./tmp/cache/default-glibc/imx8qxpc0mek/x86_64/bb_cache.dat.32802993559eecd8b079a9361443b2917b3bce4a2d54cfba659be1e813fc1769
    • Step3: Rebuild yocto again==> it’s ok now

     

    I hope that it is useful for you!

    Tagsthe basehash value changed fromThe metadata is not deterministic and this needs to be fixedyocto
    0 0 votes
    Article Rating
    Subscribe
    Login
    Notify of
    guest
    guest
    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    ← Previous Post Next Post →

    Search

    Calendar

    Bài Viết gần đây

    • Linux file types 07/05/2025
    • [FOSSology] How to run license, copyright, and export control scans from the command line 07/05/2025
    • How to make npm install offline without internet 06/05/2025
    • Installing Oh-my-zshv and zsh-autosuggestions, zsh-syntax-highlighting 24/10/2024
    • Running Multiple Instances of Microsoft Teams Using Docker 24/07/2024

    Tổng quan

    Recent Posts

    • Linux file types
    • [FOSSology] How to run license, copyright, and export control scans from the command line
    • How to make npm install offline without internet
    • Installing Oh-my-zshv and zsh-autosuggestions, zsh-syntax-highlighting
    • Running Multiple Instances of Microsoft Teams Using Docker

    Recent Comments

    • 사설토토 on [Linux] clean shell environment Linux

    Archives

    • May 2025 (3)
    • October 2024 (1)
    • July 2024 (2)
    • June 2022 (1)
    • May 2022 (3)
    • March 2022 (1)

    Categories

    • Bugs and Solutions (5)
    • Questions and Answers (1)
    • Technology Fields (2)
      • Docker (1)
      • Embedded Linux (1)
    • Tools (3)

    Meta

    • Register
    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    © 2021-2025 Code Vì Thích

    Powered by WordPress Whiteboard Theme

    ↑
    wpDiscuz
    0
    0
    Would love your thoughts, please comment.x
    ()
    x
    | Reply