intel / intel/llvm

Couldn`t find the 'libspirv'

Open
#19,339 1 comment 0 reactions 0 assignees View on GitHub
bug hip
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

### Describe the bug

when I use the self-build-compiler to compile the sycl code , it brought the error :

`clang++: error: cannot find 'remangled-l64-signed_char.libspirv-amdgcn-amd-amdhsa.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv`

------

**The detail for the self-build-compiler**
> My toolkit is not in the default installation directory.
> The record of commands are as follows:

``
cd path_to_buildbot
CC=gcc CXX=g++ python configure.py --cuda -DCUDA_Toolkit_ROOT=
/home/spack/spack/opt/spack/linux-debian12-sapphirerapids/gcc-12.2.0/cuda-12.1.1-bym4wirbkm4ipizrw5xt6wtghdbm2
jvi/bin
CC=gcc CXX=g++ python compile.py
``

**The detail for the compile **

``
/home/zhwh/sycl_workspace/llvm-sycl/build/bin/clang++ \
-std=c++17 -O3 -fsycl \
-fsycl-targets=amdgcn-amd-amdhsa \
--rocm-path=/opt/rocm \
-Xsycl-target-backend --offload-arch=gfx1030 \
code.cpp -o kernel \
-L/home/zhwh/sycl_workspace/llvm-sycl/build/lib -lur_loader
``

When I run the commands , the error pop up.

`clang++: error: cannot find 'remangled-l64-signed_char.libspirv-amdgcn-amd-amdhsa.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv`

### To reproduce

1. Include code snippet as short as possible
2. Specify the command which should be used to compile the program
3. Specify the command which should be used to launch the program
4. Indicate what is wrong and what was expected

### Environment

- OS: [e.g Windows/Linux]
- Target device and vendor: [e.g. AMD GPU]
- DPC++ version: [e.g. commit hash or output of `clang++ --version`]
- Dependencies version: [e.g. the output of `rocm-smi` and `sycl-ls --verbose`]

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.