我正在关注这个
thread和这个
one来构建我自己的KDE而没有sudo权限.由于工作站上没有安装Git和CMake.我刚将它们都安装在/ home /并添加了/ home / / bin和/ home / / lib到PATH和LD_LIBRARY_PATH.
由于KDE构建仅支持CMake,因此不支持配置.所以我必须通过CMake设置前缀,如下所示:cmake~ / kde-devel / src / kdelibs -DCMAKE_INSTALL_PREFIX = / home /< user>.此时我得到以下错误:
> ~/bin/cmake ~/kde-devel/src/kdelibs -DCMAKE_INSTALL_PREFIX=/home/
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /home/gnu/bin/c++
-- Check for working CXX compiler: /home/gnu/bin/c++ -- broken
CMake Error at /home//share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:45 (MESSAGE):
The C++ compiler "/home/gnu/bin/c++" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: /home//kde-devel/build/kdelibs/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
...
我检查了有2个C编译器:
> where c++
/home/gnu/bin/c++
/usr/bin/c++
我应该将CMake默认C编译器设置为/usr/bin/c吗?如何?或者有什么方法可以解决这个问题吗?