Skip to content

Error message from the compiler is misleading if ocloc is missing on the system #21518

@dvrogozh

Description

@dvrogozh

From #21512 (comment)

Current Ubuntu package for intel/llvm compiler is missing dependency on intel-ocloc. As a result user get's the following output:

$ docker run -it --rm ubuntu:26.04
# apt-get update && apt-get install clang-dpcpp-21
# find /usr/lib/llvm-dpcpp-21/lib/
# touch a.cpp
# clang-dpcpp -fsycl -fsycl-targets=spir64_gen,spir64 -Xs "-device bmg" a.cpp
llvm-foreach: No such file or directory
clang-dpcpp: error: gen compiler command failed with exit code 1 (use -v to see invocation)

The error is misleading as it does not actually say what is missing. The missing file is ocloc executable. The above error will go away if it's installed:

# apt-get install intel-ocloc
# clang-dpcpp -fsycl -fsycl-targets=spir64_gen,spir64 -Xs "-device bmg" a.cpp
Compilation from IR - skipping loading of FCL
Build succeeded.
....

Please, consider to improve the error message and include name of the missing file explicitly.

CC: @sarnex @mdtoguchi

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions