简体   繁体   English

在挂载目录上运行时cmake错误

[英]cmake error while running on a mounted directory

I have issue running cmake on a package residing in a mounted folder. 我在驻留在已安装文件夹中的软件包上运行cmake时遇到问题。 I have full permissions on this mounted folder. 我对此安装的文件夹具有完全权限。

-- 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!

Cmake seems to run fine when I copy the package on to my linux filesystem. 当我将软件包复制到Linux文件系统上时,Cmake似乎运行良好。

Thanks, Gudge 谢谢,G

According to this link , the error Value too large for defined data type has to do with gcc executing stat() on Samba-mounted file systems. 根据该链接Value too large for defined data type ,错误Value too large for defined data typegcc在安装Samba的文件系统上执行stat()有关。 The inode returned is apparently rather large for those file systems. 对于那些文件系统,返回的inode显然很大。

The solution is to ensure your mount command has nounix,noserverino in the options column (in /etc/fstab or equivalent). 解决方案是确保您的安装命令在选项列( /etc/fstab或等效名称)中具有nounix,noserverino

See the mount.cifs man page for further details. 有关更多详细信息,请参见mount.cifs手册页。

This problem with mounted folders can also manifest itself with a failure for the cmake command " file(GLOB VAR PATTERNS) " to find anything. 挂载的文件夹的问题还可以通过cmake命令“ file(GLOB VAR PATTERNS) ”找不到任何东西而表现出来。 In my case, the subsequent command " add_library " would end up with no source files and fail with the following error: 就我而言,后续命令“ add_library ”将最终没有源文件,并且失败并显示以下错误:

You have called ADD_LIBRARY for library ... without any source files. 您已为库...调用ADD_LIBRARY,而没有任何源文件。 This typically indicates a problem with your CMakeLists.txt file. 这通常表示您的CMakeLists.txt文件有问题。

I hope that by mentioning this here that it will cut the search time of others from 4 to 2 minutes. 我希望通过在此提及,将其他人的搜索时间从4分钟缩短到2分钟。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM