issp-center-dev / dsqss

DSQSS -- Discrete Space Quantum System Solver
http://www.pasums.issp.u-tokyo.ac.jp/dsqss/
GNU General Public License v3.0
11 stars 3 forks source link

make installができない #24

Closed takeokato719 closed 4 years ago

takeokato719 commented 4 years ago

研究室のPCクラスターにDSQSSをローカルでインストールしてみようとしたのですが、 最後のmake installのところでうまくいきません。 入力したコマンドは下記です。

cmake ../ -DCMAKE_INSTALL_PREFIX=~/dsqss -DCONFIG=intel make make test make install

コンパイルはうまくいき、テストも100%通っています。make installを実行すると

[ 11%] Built target dla [ 16%] Built target lattgene_P [ 22%] Built target STDMA [ 33%] Built target RDM [ 66%] Built target pmwa_B [100%] Built target pmwa_H Install the project... -- Install configuration: "Release" -- Installing: /usr/local/bin/dla CMake Error at src/dla/cmake_install.cmake:42 (FILE): file INSTALL cannot copy file "/home/kato/github/dsqss/dsqss.build/src/dla/dla" to "/usr/local/bin/dla". Call Stack (most recent call first): cmake_install.cmake:37 (INCLUDE)

という表示がでて止まってしまいます。メッセージを見ると、/usr/local/binに書き込もうとしていますので、 -DCMAKE_INSTALL_PREFIX=~/dsqss のオプションがきいていないようです。オプションを -DCMAKE_INSTALL_PREFIX=/home/hoge/dsqssと絶対パスにしてもだめです。

cmake でののメッセージは下記です。

-- CMake version: 2.8.12.2 -- Loading configration: /home/kato/github/dsqss/config/intel.cmake -- Build type: Release -- The C compiler identification is Intel 16.0.0.20160811 -- The CXX compiler identification is Intel 16.0.0.20160811 -- Check for working C compiler: /opt/intel/compilers_and_libraries_2016.4.258/linux/bin/intel64/icc -- Check for working C compiler: /opt/intel/compilers_and_libraries_2016.4.258/linux/bin/intel64/icc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /opt/intel/compilers_and_libraries_2016.4.258/linux/bin/intel64/icpc -- Check for working CXX compiler: /opt/intel/compilers_and_libraries_2016.4.258/linux/bin/intel64/icpc -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found MPI_C: /usr/local/openmpi-2.1.1-intel64-v16.0.4/lib/libmpi.so
-- Found MPI_CXX: /usr/local/openmpi-2.1.1-intel64-v16.0.4/lib/libmpi.so
-- Use bundled Boost headers (1.67) -- Boost headers: /home/kato/github/dsqss/src/third-party/boost -- Could NOT find PythonInterp: Found unsuitable version "2.7.5", but required is at least "3.4" (found /usr/bin/python) -- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7") -- Found numpy: /usr/lib64/python2.7/site-packages/numpy (found version "1.7.1") -- Found scipy: /usr/lib64/python2.7/site-packages/scipy (found version "0.12.1") -- Found toml: /home/kato/github/dsqss/dsqss.build/pythonmodule/lib/python2.7/site-packages/toml (found version "0.10.1") -- Configuring done -- Generating done -- Build files have been written to: /home/kato/github/dsqss/dsqss.build

すみませんが、どうしたらmake installがローカルで(スーパユーザにならずに)インストールできるか、 ご教授願えないでしょうか。

takeokato719 commented 4 years ago

CMakeCache.txtの中をチェックしたところ

//Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=/usr/local

となっていました。ここを手で書き換えてmake installするとうまくいきました。 -DCMAKE_INSTALL_PREFIX オプションの設定がなぜか反映されていないようです。確認お願いします。

yomichi commented 4 years ago

作業用ディレクトリですでに一度cmake をやったあとではないでしょうか? cache が残っているとうまく設定されないことがあるので、曖昧な場合は作業用ディレクトリを消して一からやりなおすのがおすすめです。

takeokato719 commented 4 years ago

まっさらな状態からやってインストールできました。対応ありがとうございました。