llvm
                                
                                
                                
                                    llvm copied to clipboard
                            
                            
                            
                        default `install` target has missing dependencies
Running ninja install does not correctly complete the install. The install target should correctly track all  dependencies without requiring another target to be run.
$ python ../buildbot/configure.py --cuda -o . && ninja install
[ ...]
CMake Error at tools/libdevice/cmake_install.cmake:46 (file):
  file INSTALL cannot find
  "/home/luke/src/upstream/llvm-project/build/lib/libsycl-itt-stubs.o": No
  such file or directory.
Call Stack (most recent call first):
  tools/cmake_install.cmake:147 (include)
  cmake_install.cmake:80 (include)
ninja deploy-sycl-toolchain && ninja install creates the missing dependency and allows the install to complete. This indicates that the install target for ALL is missing an explicit dependency
Local config: OS: Debian sid gcc=12, cmake=3.24.2, ninja=1.11.1, cuda=11.7.1-1
$ git rev-parse --short HEAD
70b67671a342
                                    
                                    
                                    
                                
Thanks for posting the workaround, it helped me get past it.
Just hitting this today on the sycl-mlir branch. Probably still the same on sycl branch.
As suggested, the following work-around worked:
# Try install from scratch after configuration
cmake --build $DPCPP_HOME/llvm/build --target install
CMake Error at tools/libdevice/cmake_install.cmake:46 (file):
  file INSTALL cannot find
  "/storage/rkeryell/SYCL/sycl-mlir/llvm/build/./lib/libsycl-itt-stubs.o": No  such file or directory.
Call Stack (most recent call first):
  tools/cmake_install.cmake:562 (include)
  cmake_install.cmake:122 (include)
# Work-around
cmake --build $DPCPP_HOME/llvm/build --target=deploy-sycl-toolchain
cmake --build $DPCPP_HOME/llvm/build --target install
                                    
                                    
                                    
                                
We added deploy-sycl-toolchain target to install DPC++.
We added
deploy-sycl-toolchaintarget to install DPC++.
Cool. But I am confused. Do you mean into the sycl branch recently and this should be closed?
Or that it is an old story on the sycl branch, this issue was forgotten and for some reason it did not percolate into the sycl-mlir branch?
We use deploy-sycl-toolchain target for years, I don't think we ever used install target to deploy DPC++ compiler.
I'm not aware of sycl-mlir branch changes regarding the deployment procedure.
Hi! There have been no updates for at least the last 60 days, though the ticket has assignee(s).
@ldrumm, could I ask you to take one of the following actions? :)
- Please provide an update if you have any (or just a small comment if you don't have any yet).
 - OR mark this issue with the 'confirmed' label if you have confirmed the problem/request and our team should work on it.
 - OR close the issue if it has been resolved.
 - OR take any other suitable action.
 
Thanks!
Why do we need to do those things? If nothing has changed, I don't see why the ticket needs changing
Hello @ldrumm,
Why do we need to do those things? If nothing has changed, I don't see why the ticket needs changing
Because the issue has assignee.
I assume that the assignee is working on this or planning to. Since there are no updates I just wanted to check if you're looking into this. If no - you could unassign it and mark with the 'confirmed' label, so we would take a look by ourselves.
On Tue May 21, 2024 at 9:49 AM BST, Nikita Kornev wrote:
Hello @ldrumm,
Why do we need to do those things? If nothing has changed, I don't see why the ticket needs changing
Because the issue has assignee. I'm the assignee
Hi! There have been no updates for at least the last 60 days, though the issue has assignee(s).
@ldrumm, could you please take one of the following actions:
- provide an update if you have any
 - unassign yourself if you're not looking / going to look into this issue
 - mark this issue with the 'confirmed' label if you have confirmed the problem/request and our team should work on it
 - close the issue if it has been resolved
 - take any other suitable action.
 
Thanks!
I'm getting this error, too, using the latest master and building with:
python ./buildbot/configure.py \
  -t Debug \
  --cmake-opt=-DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
  --cmake-opt=-DCMAKE_C_FLAGS="-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
  --cmake-opt=-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
  --cmake-opt=-DSYCL_ENABLE_PLUGINS="level_zero" \
  --cmake-opt=-DLLVM_ENABLE_PROJECTS="opencl;openmp;clang"
cd build
ninja deploy-sycl-toolchain
                                    
                                    
                                    
                                
@matthew-olson-intel, please, try using sycl branch instead of master.
Ach, sorry, I wasn't actually using master; I was in the sycl branch. Tested right after a git checkout sycl (and rm -rf build), and same error.
@ldrumm, do you have any updates on this issue?
@matthew-olson-intel, I'm not sure you are hitting the same problem as reported in the issue description. You seem to build the right target for DPC++ compiler installation. The problem reported here is about building install target, which installs LLVM framework development tools. I think it's worth filing a separate issue for your problem.
@ldrumm, do you have any updates on this issue?
@matthew-olson-intel, I'm not sure you are hitting the same problem as reported in the issue description. You seem to build the right target for DPC++ compiler installation. The problem reported here is about building
installtarget, which installs LLVM framework development tools. I think it's worth filing a separate issue for your problem.
Perhaps. I'm 99% certain that I'm getting the error from just the invocation from ninja deploy-sycl-toolchain, but I'll rm -rf everything and try again from scratch.
Running the following build script:
cd $TOOL_DIR
git clone https://github.com/intel/llvm -b sycl src
cd src
rm -rf build
python ./buildbot/configure.py \
  -t Debug \
  --cmake-opt=-DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
  --cmake-opt=-DCMAKE_C_FLAGS="-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
  --cmake-opt=-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
  --cmake-opt=-DSYCL_ENABLE_PLUGINS="level_zero" \
  --cmake-opt=-DLLVM_ENABLE_PROJECTS="opencl;openmp;clang"
cd build
ninja deploy-sycl-toolchain
Yields the following error:
[3397/3402] Deploying component sycl
-- Install configuration: "Debug"
-- Installing: /home/macslayer/tools/prefix_test/lib/libsycl.so.8.0.0-0
-- Installing: /home/macslayer/tools/prefix_test/lib/libsycl.so.8
-- Set non-toolchain portion of runtime path of "/home/macslayer/tools/prefix_test/lib/libsycl.so.8.0.0-0" to ""
-- Installing: /home/macslayer/tools/prefix_test/lib/libsycl.so
-- Installing: /home/macslayer/tools/prefix_test/lib/libsycl-preview.so.8.0.0-0
-- Installing: /home/macslayer/tools/prefix_test/lib/libsycl-preview.so.8
-- Set non-toolchain portion of runtime path of "/home/macslayer/tools/prefix_test/lib/libsycl-preview.so.8.0.0-0" to ""
-- Installing: /home/macslayer/tools/prefix_test/lib/libsycl-preview.so
[3398/3402] Deploying component libsycldevice
-- Install configuration: "Debug"
CMake Error at /home/macslayer/tools/sycl/src/build/tools/libdevice/cmake_install.cmake:46 (file):
  file INSTALL cannot find
  "/home/macslayer/tools/sycl/src/build/./lib/libsycl-itt-stubs.o":
  No such file or directory.
Call Stack (most recent call first):
  /home/macslayer/tools/sycl/src/build/tools/cmake_install.cmake:557 (include)
  /home/macslayer/tools/sycl/src/build/cmake_install.cmake:127 (include)
                                    
                                    
                                    
                                
Maybe I'm doing something odd that's causing it, though; for example, in order to also build OpenMP, I'm adding the opencl;openmp;clang targets. Is that not the recommended way of getting OpenMP built, too?
It's worth noting, too, that I get the same error if I do ninja install instead of the ninja deploy-sycl-toolchain target.
Hi! There have been no updates for at least the last 60 days, though the issue has assignee(s).
@ldrumm, could you please take one of the following actions:
- provide an update if you have any
 - unassign yourself if you're not looking / going to look into this issue
 - mark this issue with the 'confirmed' label if you have confirmed the problem/request and our team should work on it
 - close the issue if it has been resolved
 - take any other suitable action.
 
Thanks!
Hi @ldrumm, do you have ETA on them the issue will be resolved?
@ldrumm friendly ping