Skip to content

[Build] v1.20.0 min GCC version can't build on armv8 #22837

Open

Description

Describe the issue

The GCC version is checked to be at least version 9 in the CMakeLists.txt.

if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9)

When building on armv8 with GCC 9 the check further down fails

check_cxx_compiler_flag(-march=armv8.2-a+bf16 HAS_ARM64_BFLOAT16)

It seems the feature modifier bf16 was introduced in GCC 10 see here.
If I'm not mistaken the minimum GCC version checked for should be rather be 10 instead of 9.

Urgency

No response

Target platform

armv8

Build script

Using build.py with --parallel 4 --config Release --build_dir build --cmake_extra_defines FETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER

Error / output

-- Performing Test HAS_ARM64_BFLOAT16 - Failed
CMake Error at CMakeLists.txt:695 (message):
  The compiler doesn't support BFLOAT16!!!

Visual Studio Version

No response

GCC / Compiler Version

9.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using templatecontributions welcomelower priority issues for the core ORT teams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions