2016-09-13 6 views
3

私は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. 
+0

?あなたが与えた '-xarch = avx2_i'オプションが気に入らないようです。 –

+0

'-xarch = avx2 'を' CXXFLAGS'の最後から削除してみてください。 –

+2

CMakeが 'CXX'で指定したものではなく、コンパイラとして'/bin/C++ 'を使用していることが出力でわかります。これは、CMakeのキャッシングのために発生する可能性があります。まったく新しい空のディレクトリに生成するためにCMakeを実行すると同じ結果になりますか? – Angew

答えて

2

は二つの問題であるように思われました。まず、下位レベルのSunがCmakeを提供しました。それを「古すぎる」と診断することについて何も天才はない。

2番目の問題は面白かったです。それが表示されたCMake Error: Could not find CMAKE_ROOT !!!が原因でしたsudo make installsudo gmake installに切り替えると、問題は消えました。ここで

は、この問題に関するバグレポートは以下のとおりです。あなたが使用しているC++コンパイラ

関連する問題