llvm icon indicating copy to clipboard operation
llvm copied to clipboard

default `install` target has missing dependencies

Open ldrumm opened this issue 3 years ago • 9 comments

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

ldrumm avatar Oct 03 '22 13:10 ldrumm

Thanks for posting the workaround, it helped me get past it.

matsbror avatar Oct 13 '22 06:10 matsbror

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

keryell avatar Nov 18 '23 02:11 keryell

We added deploy-sycl-toolchain target to install DPC++.

bader avatar Nov 18 '23 02:11 bader

We added deploy-sycl-toolchain target 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?

keryell avatar Nov 18 '23 03:11 keryell

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.

bader avatar Nov 18 '23 05:11 bader

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!

KornevNikita avatar May 17 '24 11:05 KornevNikita

Why do we need to do those things? If nothing has changed, I don't see why the ticket needs changing

ldrumm avatar May 20 '24 09:05 ldrumm

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.

KornevNikita avatar May 21 '24 08:05 KornevNikita

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

ldrumm avatar May 21 '24 09:05 ldrumm

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!

github-actions[bot] avatar Jul 21 '24 00:07 github-actions[bot]

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 avatar Sep 12 '24 17:09 matthew-olson-intel

@matthew-olson-intel, please, try using sycl branch instead of master.

bader avatar Sep 12 '24 17:09 bader

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.

matthew-olson-intel avatar Sep 12 '24 17:09 matthew-olson-intel

@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.

bader avatar Sep 12 '24 17:09 bader

@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.

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.

matthew-olson-intel avatar Sep 12 '24 17:09 matthew-olson-intel

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)

matthew-olson-intel avatar Sep 12 '24 18:09 matthew-olson-intel

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?

matthew-olson-intel avatar Sep 12 '24 18:09 matthew-olson-intel

It's worth noting, too, that I get the same error if I do ninja install instead of the ninja deploy-sycl-toolchain target.

matthew-olson-intel avatar Sep 12 '24 18:09 matthew-olson-intel

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!

github-actions[bot] avatar Nov 12 '24 00:11 github-actions[bot]

Hi @ldrumm, do you have ETA on them the issue will be resolved?

dm-vodopyanov avatar Jan 08 '25 14:01 dm-vodopyanov

@ldrumm friendly ping

KornevNikita avatar Jan 29 '25 16:01 KornevNikita