Skip to content

Fedora 42 build fails: OpenCL-ICD-Loader 3.x incompatibility (xocl) and GCC 15 Werror in aiebu; deps script conflicts #9163

@Ankk98

Description

@Ankk98

Environment

  • OS: Fedora 42
  • Kernel: Linux 6.16.0-264.vanilla.fc42.x86_64
  • gcc: 15.2.1
  • cmake: 3.31.6
  • OpenCL loader packages present by default: OpenCL-ICD-Loader 3.0.6 (+ devel)
  • Branch: HEAD detached at d0a52f139 based on main branch of xdna-driver

Repro steps

  • Install deps:
    sudo ./src/runtime_src/tools/scripts/xrtdeps.sh
    • DNF reports conflicts (see Observed).
  • Build:
    cd build
    ./build.sh -opt -noert -disable-werror -j $(nproc)

Observed behavior

  • Deps script conflicts on Fedora 42 because it prefers ocl-icd while Fedora ships OpenCL-ICD-Loader by default:
    • Conflicts between OpenCL-ICD-Loader{,-devel} and ocl-icd{,-devel} (also i686 pulled in).
  • Build error in xocl against Fedora’s loader headers:
    src/runtime_src/xocl/api/icd/ocl_icd_bindings.cpp:212:1: error: too many initializers for ‘const cl_icd_dispatch’ {aka ‘const _cl_icd_dispatch’}
    
    • Indicates the dispatch struct layout/definition differs from what ocl_icd_bindings.* expects (appears tailored to ocl-icd 2.x, not Khronos OpenCL-ICD-Loader 3.x).
  • Separate build stops due to -Werror enforced inside aiebu with GCC 15 warnings:
    core/common/aiebu/src/cpp/preprocessor/preprocessor_input.h:80:30: error: ‘virtual std::vector<char>& ...::get_data(const std::string&)’ was hidden [-Werror=overloaded-virtual=]
    
    • -DXRT_ENABLE_WERROR=0 does not disable Werror in the aiebu submodule.

Expected behavior

  • XRT should build on Fedora 42 with the distro-default Khronos OpenCL-ICD-Loader 3.x without package swaps.
  • A project-wide “disable Werror” switch should also cover submodules like aiebu, or the warnings should be fixed/gated for GCC 15.

Requests

  • ICD compatibility: Make xocl ICD bindings compatible with OpenCL-ICD-Loader 3.x headers/ABI, or detect the loader variant and initialize the dispatch table accordingly.
  • Deps script: Update xrtdeps.sh for Fedora 42 to:
    • Accept OpenCL-ICD-Loader{,-devel} as valid alternatives to ocl-icd{,-devel}.
    • Avoid pulling i686 ocl-icd which conflicts with 64-bit loader.
  • Werror control: Provide a cmake option that reliably disables -Werror across all submodules including aiebu, or fix the GCC 15 warnings in aiebu.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions