# install error

**URL:** https://discourse.itk.org/t/install-error/7414
**Category:** Engineering
**Created:** [February 3, 2025, 7:23pm UTC](https://discourse.itk.org/t/install-error/7414 "2025-02-03T19:23:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![codeling](https://discourse.itk.org/user_avatar/discourse.itk.org/codeling/32/2214_2.png) [@codeling](https://discourse.itk.org/u/codeling)
#### Post date: [February 3, 2025, 7:23pm UTC](https://discourse.itk.org/t/install-error/7414/1 "2025-02-03T19:23:14Z")

</div>

In a [github action for building](https://github.com/3dct/open_iA/actions/runs/13115954251/job/36590157644) our project (which requires ITK), I’m getting a strange error trying to install ITK 5.4:

```auto
CMake Error at Modules/ThirdParty/HDF5/src/itkhdf5/hl/c++/src/cmake_install.cmake:55 (file):
  file INSTALL cannot find
  "...../itk/bin-5.4.0/bin/Release/hdf5_hl_cpp-shared.dll":
  File exists.

```

This only happens on the Windows platform, there is no error on Linux.

Does anybody have a quick idea about what might go wrong here? The error message is kind of contradictory - “cannot find file … file exists”? maybe the file is copied twice but the second copying checks whether the file already existsi and won’t overwrite?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [February 3, 2025, 9:53pm UTC](https://discourse.itk.org/t/install-error/7414/2 "2025-02-03T21:53:53Z")

</div>

I don’t usually install ITK, I typically use it from the build folder. It is no surprise that I don’t remember that error message.

If you typically install ITK, is it easy for you to try whether [PR 5167](https://github.com/InsightSoftwareConsortium/ITK/pull/5167) adversely affects installation? It is the only thing left to test before merging it.

---

<div class="post-metadata">

### Author: ![codeling](https://discourse.itk.org/user_avatar/discourse.itk.org/codeling/32/2214_2.png) [@codeling](https://discourse.itk.org/u/codeling)
#### Post date: [February 4, 2025, 6:22am UTC](https://discourse.itk.org/t/install-error/7414/3 "2025-02-04T06:22:01Z")

</div>

> I don’t usually install ITK, I typically use it from the build folder.

That will be the next thing I’ll try. I typically do it like this too - but in previous experiments there was limited space available in the github actions runner, so I tried to reduce the used storage through installing (vtk &) itk, and removing source and binary folders. Also, it has made caching easier and more efficient.

> If you typically install ITK, is it easy for you to try whether [PR 5167](https://github.com/InsightSoftwareConsortium/ITK/pull/5167) adversely affects installation?

This has been the first time I successfully experimented with installing itk, so no, sorry, I am not really qualified to test this!

---

<div class="post-metadata">

### Author: ![codeling](https://discourse.itk.org/user_avatar/discourse.itk.org/codeling/32/2214_2.png) [@codeling](https://discourse.itk.org/u/codeling)
#### Post date: [February 4, 2025, 6:44am UTC](https://discourse.itk.org/t/install-error/7414/4 "2025-02-04T06:44:11Z")

</div>

Some further research - the contradictory message `cannot find ... file exists` seems to be a [CMake bug](https://gitlab.kitware.com/cmake/cmake/-/issues/24902).

From the logs, it looks as though the install command actually uses the wrong file name. The library actually created during build is called `bin-5.4.0/bin/Release/itkhdf5_cpp-shared-5.4.dll`, but the file that the INSTALL command looks for is called `bin-5.4.0/bin/Release/hdf5_hl_cpp-shared.dll`. So it’s missing the `itk` prefix, and the `-5.4` suffix.

In my local build of ITK 5.4, I do not have the `Modules/ThirdParty/HDF5/src/itkhdf5/hl/c++/src/cmake_install.cmake`, it is probably created on the fly during install?

I also see a bunch of CMake configure warnings related to hdf5, not sure if they could be related:

```auto
CMake Warning (dev) at Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt:1095 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt:1107 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt:1176 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt:1188 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

```

---

<div class="post-metadata">

### Author: ![codeling](https://discourse.itk.org/user_avatar/discourse.itk.org/codeling/32/2214_2.png) [@codeling](https://discourse.itk.org/u/codeling)
#### Post date: [February 24, 2025, 3:52pm UTC](https://discourse.itk.org/t/install-error/7414/5 "2025-02-24T15:52:48Z")

</div>

To follow up here: I tried again now with ITK 5.4.2, and installation works again for me on the github actions windows-latest runner!
