Skip to content

[BUG] APL/CNL Build failed due to bigger SOF_SRC_HASH #3322

Closed

Description

@fredoh9

Describe the bug
Build failed with warnings for APL and CNL today in my local build.(I don't think this is problem only for this two) Not sure this is my environment problem. I used to build FWs without any problem.

./scripts/xtensa-build-all.sh cnl
or
./scripts/xtensa-build-all.sh apl


[  2%] Building C object src/init/CMakeFiles/ext_manifest.dir/ext_manifest.c.o
cc1: warnings being treated as errors
/home/fredoh/work/sof/20200818/src/init/ext_manifest.c:35: warning: integer constant is too large for ‘long’ type
/home/fredoh/work/sof/20200818/src/init/ext_manifest.c:35: warning: large integer implicitly truncated to unsigned type
make[2]: *** [src/init/CMakeFiles/ext_manifest.dir/build.make:63: src/init/CMakeFiles/ext_manifest.dir/ext_manifest.c.o] Error 2

I checked SOF_SRC_HASH, it is 5 bytes, although src_hash variable is uint32_t.

$ grep -rn SOF_SRC_HASH
generated/include/version.h:7:#define SOF_SRC_HASH 0x96a474897

0x9 | 6a | 47 | 48 | 97

To Reproduce
Steps to reproduce the behavior: (e.g. list commands or actions used to reproduce the bug)

Reproduction Rate
100%

Expected behavior
Build should be done without warning/error

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: topic/sof-dev
    • SOF: 96a4748

CNL Build log is attached. 20200818_cnl_build_errors.txt

Activity

  1. added
    bugSomething isn't working as expected
    on Aug 18, 2020
  2. fredoh9 commented on Aug 18, 2020

    @fredoh9
    ContributorAuthor

    Looks my case, it hit else part of below

    # Calculate source hash value, used to check ldc file and firmware compatibility
    if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
    ...
    else()
            set(SOF_SRC_HASH ${GIT_LOG_HASH})
            message(WARNING "Source content hash can't be calculated, use GIT_LOG_HASH")
    endif()
    

    My current build tree is based on git worktree add and it has .git in ROOT directory also.

  3. jdrzaszcz commented on Aug 19, 2020

    @jdrzaszcz
  4. self-assigned this
    on Aug 19, 2020
  5. added
    APLApplies to Apollolake platform
    CNLApplies to Cannonlake platform
    on Aug 20, 2020
  6. added this to the v1.6 milestone on Aug 20, 2020
  7. added a commit that references this issue on Aug 24, 2020
    7a10da0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

APLApplies to Apollolake platformCNLApplies to Cannonlake platformbugSomething isn't working as expectedloggerDictionary and logger

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions