Configuring llama.cpp's SYCL backend after installing oneAPI fails with 'unrecognized command-line option -fsycl'
[blocker] build
Fields
id
gotchas/sycl-build-unrecognized-fsyclClass
build
Severity
blocker
Concepts
intel-oneapi-base-toolkitoneapisycltoolchain
Symptom
After installing intel-oneapi-base-toolkit from Intel's apt repository (2025.2/2025.3 packages, including intel-oneapi-compiler-dpcpp-cpp), a GGML_SYCL=ON configure/build aborts with: c++: error: unrecognized command-line option '-fsycl'. The compiler being invoked is not the Intel DPC++ compiler that accepts the flag.
Root cause
The CMake SYCL path passes -fsycl, which only Intel's icpx/clang++ frontend accepts. In this environment the build resolved a different c++ (typically the system GCC), so the flag is rejected at compile time. The install itself succeeds and prints the full dependency list, which makes it look like the toolchain is present.
Workaround
Configure the build inside the oneAPI environment so CMake picks up icpx, and verify which compiler CMake resolves before building. If the flag is still rejected, the base toolkit alone is not sufficient - install the compiler component explicitly.
notes
Blocked on issue, not confirmed resolved; the specific missing-component diagnosis is the reporter's environment rather than a maintainer-verified root cause. Related: gotcha-intel-dgpu-vulkan-or-sycl-agentic-stall for runtime behaviour once SYCL does build.
Notes
Blocked on issue, not confirmed resolved; the specific missing-component diagnosis is the reporter's environment rather than a maintainer-verified root cause. Related: gotcha-intel-dgpu-vulkan-or-sycl-agentic-stall for runtime behaviour once SYCL does build.