nomad icon indicating copy to clipboard operation
nomad copied to clipboard

CMake error during install step

Open ctribes opened this issue 3 years ago • 6 comments
trafficstars

The command cmake --install build/release in Windows returns an error

CMake Error at build/release/ext/sgtelib/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/......../nomad-v.4.2.0/build/release/ext/sgtelib/Release/.....exe":

This happens when the Release config option is missing in the build step. For windows, the build step is not for the Release config by default but it is for the install step! Hence, for the Release config in Windows:

STEP 2: cmake --build build\release --config Release

STEP 3: cmake --install build\release

ctribes avatar Mar 10 '22 18:03 ctribes

I am having this error in windows, the steps I am taking are:

cmake -DBUILD_INTERFACE_PYTHON=ON -S . -B build/release

cmake --build build\release --config Release

cmake --install build\release

And I believe I am getting the same error as you listed above:

\nomad-v.4.2.0>cmake --install build\release -- Install configuration: "Release" CMake Error at build/release/ext/sgtelib/cmake_install.cmake:39 (file): file INSTALL cannot find "C:/0_Work/0_OneDrive/0_ExploratoryWork/0_Nomad/nomad-v.4.2.0/build/release/ext/sgtelib/Release/sgtelib_main.exe": File exists. Call Stack (most recent call first): build/release/ext/cmake_install.cmake:37 (include) build/release/cmake_install.cmake:37 (include)

Any ideas how to debug this?

EisenBee avatar Jun 15 '22 13:06 EisenBee

Have you tried to remove the build directory and redo the steps ?

ctribes avatar Jun 15 '22 13:06 ctribes

I just tried that but I get the same error. Thanks for your help.

EisenBee avatar Jun 15 '22 13:06 EisenBee

I will try to reproduce the behaviour. Does it work without the -DBUILD_INTERFACE_PYTHON=ON ?

ctribes avatar Jun 15 '22 13:06 ctribes

Yes, using cmake -S . -B build/release as step 1 resulted in all steps being successful.

I may have an issue with my python installation, let me try to sort that out before you dig too deep to reproduce.

EisenBee avatar Jun 15 '22 13:06 EisenBee

Everything went well when building with -DBUILD_INTERFACE_PYTHON=ON ? If there is an issue with Python you should see that when building the Nomad python interface (PyNomad.dll). In that case the cmake install may not work well for some parts.

ctribes avatar Jun 15 '22 14:06 ctribes