私はSun Studio 12.5でSolaris 11.3で作業しています。 Cmake out-of-treeで設定しようとすると、Cmakeは設定エラーで終了し、makefileを生成しません。ツリー内が壊れている可能性もあります。しかし、私たちの手続きでは、樹木の外に樹立すると言われています。私がやること。CMakeがSun Studio 12.5でMakefileを生成できない
私はCmakeの経験がほとんどありません。他の人はCMakeファイルに貢献しましたが、私はそれらに関連するタスクに苦労しています。私は何かが間違っているのか、私たちのCmakeファイルが壊れているのか、CmakeがSolarisの下でうまくテストされていないのかどうかはわかりません。
CMakeでは何が起こっていますか?どのように修正するのですか?
ここには、Cmakeファイルへのリンクがあります。私はそれらをコピー/ペーストすることができますが、それはちょうどスペースの束を取る。これらのファイルはGitHub上でホストされるため、常に利用可能にする必要があります。ここで
Solarisのcmakeのバージョンは3.6.2をインストールする前に私には、次のとおりです。
以下$ cmake --version
cmake version 2.8.6
は、Solaris cmakeのバージョン2.8からです。 6。
cryptopp-build$ export CXX=/opt/developerstudio12.5/bin/CC
cryptopp-build$ export CXXFLAGS="-DNDEBUG -g2 -O2 -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__ -D__SSE4_2__ -D__AES__ -D__PCLMUL__ -D__RDRND__ -D__RDSEED__ -D__AVX__ -D__AVX2__ -D__BMI__ -D__BMI2__ -D__ADX__ -xarch=avx2_i"
cryptopp-build$ cmake ../cryptopp
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:45 (MESSAGE):
The C++ compiler "/bin/c++" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /export/home/test/cryptopp-build/CMakeFiles/CMakeTmp
Run Build Command:/bin/gmake "cmTryCompileExec/fast"
/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o
/bin/c++ -DNDEBUG -g2 -O2 -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__
-D__SSE4_2__ -D__AES__ -D__PCLMUL__ -D__RDRND__ -D__RDSEED__ -D__AVX__
-D__AVX2__ -D__BMI__ -D__BMI2__ -D__ADX__ -xarch=avx2_i -o
CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o -c
/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
c++: error: language arch=avx2_i not recognized
c++: error: language arch=avx2_i not recognized
gmake[1]: Leaving directory
`/export/home/test/cryptopp-build/CMakeFiles/CMakeTmp'
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o] Error
1
gmake: *** [cmTryCompileExec/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)
-- Configuring incomplete, errors occurred!
そして:
$ /opt/developerstudio12.5/bin/CC -V
CC: Studio 12.5 Sun C++ 5.14 SunOS_i386 2016/05/31
私はソースからのcmakeの3.6.2を構築し、CXX compiler identification is unknown
問題を攻撃する/usr/local
にインストールしましたが、いくつかのトラブルを抱えているように見えます。私が以前に言ったように、私はCmakeの専門家ではありません(そして私はどのようにしてmake && sudo make install
を台無しにすることができないのか分かりません)。で@AndrewHenle結果によって示唆されているようにキャッシュをクリアする
cryptopp-build$ cmake ../cryptopp
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
CMake Error: Error executing cmake::LoadCache(). Aborting.
:だから
# The project GNUmakefile clears all Cmake artifacts because Cmake cannot seem to do it on its own
$ cd cryptopp
$ git status -s
$
$ cd ..
$ rm -rf cryptopp-build
$ mkdir cryptopp-build
$ cd cryptopp-build
# Using 3.6.2 now
$ cmake ../cryptopp
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/local/bin
CMake Error: Error executing cmake::LoadCache(). Aborting.
?あなたが与えた '-xarch = avx2_i'オプションが気に入らないようです。 –
'-xarch = avx2 'を' CXXFLAGS'の最後から削除してみてください。 –
CMakeが 'CXX'で指定したものではなく、コンパイラとして'/bin/C++ 'を使用していることが出力でわかります。これは、CMakeのキャッシングのために発生する可能性があります。まったく新しい空のディレクトリに生成するためにCMakeを実行すると同じ結果になりますか? – Angew