nest-simulator
nest-simulator copied to clipboard
CMAKE_INSTALL_PREFIX can be set incorrectly after error
Describe the bug
If you first hit the "NEST must be installed in a virtual environment or with CMAKE_INSTALL_PREFIX", then switch to a venv and rerun, CMAKE_INSTALL_PREFIX
will have been set to /usr/local/
:
(3.8.10) robin@neurocomp:~/nest-simulator/build$ cmake ..
...
-- Found Python: /home/robin/.pyenv/versions/3.8.10/bin/python3.8 (found suitable version "3.8.10", minimum required is "3.8") found components: Interpreter Development.Module
CMake Error at cmake/ProcessOptions.cmake:415 (message):
No virtual Python environment found and no installation prefix specified.
Please either build and install NEST in a virtual Python environment or
specify CMake option -DCMAKE_INSTALL_PREFIX=<nest_install_dir>.
Call Stack (most recent call first):
CMakeLists.txt:143 (nest_process_with_python)
-- Configuring incomplete, errors occurred!
See also "/home/robin/nest-simulator/build/CMakeFiles/CMakeOutput.log".
See also "/home/robin/nest-simulator/build/CMakeFiles/CMakeError.log".
(3.8.10) robin@neurocomp:~/nest-simulator/build$ pyenv virtualenv virtual3.8
(3.8.10) robin@neurocomp:~/nest-simulator/build$ pyenv local virtual3.8
(virtual3.8) robin@neurocomp:~/nest-simulator/build$ cmake ..
...
-- Found PythonInterp: /home/robin/.pyenv/versions/virtual3.8/bin/python (found version "3.8.10")
--------------------------------------------------------------------------------
NEST Configuration Summary
--------------------------------------------------------------------------------
Build type :
Target System : Linux
Cross Compiling : FALSE
C compiler : GNU 9.3.0 (/usr/bin/cc)
C compiler flags : -O2 -Wall -fopenmp -fdiagnostics-color=auto
C++ compiler : GNU 9.3.0 (/usr/bin/c++)
C++ compiler flags : -std=c++11 -O2 -Wall -fopenmp -fdiagnostics-color=auto
Build dynamic : ON
Built-in modules : models
User modules : None
Python bindings : Yes (Python 3.8.10: /home/robin/.pyenv/versions/3.8.10/bin/python3.8)
Includes : /home/robin/.pyenv/versions/3.8.10/include/python3.8
Libraries :
Cython bindings : Yes (Cython 0.29.25: /home/robin/.pyenv/versions/3.8.10/bin/cython)
MPI4PY header : NO
Use threading : Yes (OpenMP: -fopenmp)
Use GSL : No
Use Readline : Yes (GNU Readline 8.0)
Includes : /usr/include
Libraries : /usr/lib/x86_64-linux-gnu/libreadline.so;/usr/lib/x86_64-linux-gnu/libncurses.so
Use libltdl : Yes (LTDL 2.4.6)
Includes : /usr/include
Libraries : /usr/lib/x86_64-linux-gnu/libltdl.so
Use doxygen : No
Use MPI : No
Detailed timers : No
Use MUSIC : No
Use libneurosim : No
Use Boost : No
Use SIONlib : No
--------------------------------------------------------------------------------
The NEST executable will be installed to:
/usr/local/bin/
NEST dynamic libraries and user modules will be installed to:
/usr/local/lib/nest/
Documentation and examples will be installed to:
/usr/local/share/doc/nest/
PyNEST will be installed to:
/usr/local/lib/python3.8/site-packages
To Reproduce Steps to reproduce the behavior:
-
cmake ..
in non-virtual Python env. - Switch to virtual env
-
cmake ..
Expected behavior
The CMAKE_INSTALL_PREFIX
should be unset when the error is thrown so that on the next cmake
run CMake doesn't presume the user has set it.
Hey @Helveg, maybe you might want to take a look at this PR 2245.
Issue automatically marked stale!
@Helveg Is this still relevant now that #2245 is merged?
I would close it until something resurfaces, it's probably just a CMAKE learning curve to make a habit of clearing your build cache