windows - 在挂载目录上运行时出现 cmake 错误

标签 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 似乎运行良好。

谢谢, 格格

最佳答案

根据 this link ,错误 Value too large for defined data typegcc 在 Samba 安装的文件系统上执行 stat() 有关。对于那些文件系统,返回的 inode 显然相当大。

解决方案是确保您的挂载命令在选项列中有 nounix,noserverino(在 /etc/fstab 或等效项中)。

参见 mount.cifs手册页以获取更多详细信息。

关于windows - 在挂载目录上运行时出现 cmake 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10116605/

相关文章:

c++ - WinINet异步模式灾难

c - 软件pwm作为linux内核模块

linux - 如何用介子设置调试和优化标志

c++ - 在 cmake 调用中附加 CXX_FLAGS

cmake - 如何在 CMake 中安装时使用版本号重命名/修改目标文件?

linux - 编译遗迹库(适用于 msp430)

windows - 如何重写历史以删除 git 中的可执行位

linux - 程序员应该使用什么工具从 Windows 机器在 Ubuntu 机器上工作

windows - 如何在 win32 汇编器(特别是 nasm)中获得脉冲?

php - Bash 脚本不会在后台启动后执行命令