bbopt / nomad

NOMAD - A blackbox optimization software
https://nomad-4-user-guide.readthedocs.io/
GNU Lesser General Public License v3.0
116 stars 24 forks source link

CMake error during install step #67

Open ctribes opened 2 years ago

ctribes commented 2 years ago

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

EisenBee commented 2 years ago

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?

ctribes commented 2 years ago

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

EisenBee commented 2 years ago

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

ctribes commented 2 years ago

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

EisenBee commented 2 years ago

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.

ctribes commented 2 years ago

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.