在已安装的目录上运行时出现cmake错误

时间:2012-04-12 02:25:44

标签: windows linux cmake mount

我在驻留在已安装文件夹中的程序包上运行cmake时遇到问题。我对此已安装文件夹拥有完全权限。

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:50 (MESSAGE):
The C compiler "/usr/bin/gcc" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/X/win_tmp/cmake/build/CMakeFiles/CMakeTmp



Run Build Command:/usr/bin/make "cmTryCompileExec/fast"

/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build

make: Warning: File `Makefile' has modification time 0.38 s in the future

make[1]: Entering directory
`/home/X/win_tmp/cmake/build/CMakeFiles/CMakeTmp'

make[1]: Warning: File `CMakeFiles/cmTryCompileExec.dir/flags.make' has
modification time 0.35 s in the future

/usr/bin/cmake -E cmake_progress_report
/home/X/win_tmp/cmake/build/CMakeFiles/CMakeTmp/CMakeFiles 1

Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o

/usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
/home/X/win_tmp/cmake/build/CMakeFiles/CMakeTmp/testCCompiler.c

cc1: error:
/home/X/win_tmp/cmake/build/CMakeFiles/CMakeTmp/testCCompiler.c:
Value too large for defined data type

make[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o] Error 1

make[1]: Leaving directory
`/home/X/win_tmp/cmake/build/CMakeFiles/CMakeTmp'

make: *** [cmTryCompileExec/fast] Error 2


CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)


-- Configuring incomplete, errors occurred!

当我将软件包复制到我的linux文件系统时,Cmake似乎运行正常。

谢谢, Gudge

2 个答案:

答案 0 :(得分:1)

根据this link,错误Value too large for defined data type与在安装Samba的文件系统上执行gcc的{​​{1}}有关。对于那些文件系统,返回的inode显然相当大。

解决方案是确保您的mount命令在选项列中有stat()nounix,noserverino或等效)。

有关详细信息,请参阅mount.cifs手册页。

答案 1 :(得分:0)

装入文件夹的这个问题也可能表现为cmake命令“file(GLOB VAR PATTERNS)”无法找到任何内容。在我的情况下,后续命令“add_library”最终没有源文件,并且失败并出现以下错误:

  

您已为库调用ADD_LIBRARY ...没有任何源文件。这通常表示您的CMakeLists.txt文件存在问题。

我希望在这里提到它会将其他人的搜索时间从4分钟减少到2分钟。

相关问题