diaobk 发表于 2015-10-3 11:29:29

cmake安装失败

RT
有台机器一直安不了cmake
./bootstrap
出现
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.

---------------------------------------------
Log of errors: /home/kjlv/Software/cmake-3.2.2/Bootstrap.cmk/cmake_bootstrap.log

cmake_bootstrap.log 里面
Line: icc cmake_bootstrap_16681_test.c -o cmake_bootstrap_16681_test
---------- file -----------------------

#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif

#include<stdio.h>

#if defined(__CLASSIC_C__)
int main(argc, argv)
int argc;
char* argv[];
#else
int main(int argc, char* argv[])
#endif
{
printf("%d%c", (argv != 0), (char)0x0a);
return argc-1;
}

------------------------------------------
ld: final link failed: No space left on device
Test failed to compile
换成gcc之后还是一样的错误
只有cmake_bootstrap.log末尾变成了
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: final link failed: No space left on device
collect2: ld returned 1 exit status
Test failed to compile

gcc -v
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix= --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux
Thread model: posix
gcc version 4.1.2 20070115 (SUSE Linux)
icc -v
icc version 13.1.0 (gcc version 4.1.2 compatibility)
gcc icc应该正常

磁盘空间也够
df
Filesystem            SizeUsed Avail Use% Mounted on
/dev/sda1             681G539G143G80% /
udev                   48G392M   47G   1% /dev
/dev/sdb1            15T2.7T   12T19% /home
/dev/sdb2            14T2.1T   12T16% /home2
到底是哪里错了?应该怎么解决?


greatzdl 发表于 2015-10-4 18:48:27

直接下载二进制的包
干嘛非要bootstrap

或者你源码编译啊

diaobk 发表于 2015-10-5 15:22:35

greatzdl 发表于 2015-10-4 18:48
直接下载二进制的包
干嘛非要bootstrap



怎么源码编译啊?

linux越底层的东西我不太了解,只会软件方面的
然后看网上安装的缺编译器都是sudo装完就好的   没看到类似我这种错误

greatzdl 发表于 2015-10-5 15:51:14

diaobk 发表于 2015-10-5 15:22
怎么源码编译啊?

linux越底层的东西我不太了解,只会软件方面的


https://cmake.org/download/
下载Binary distributions
或者
./bootstrap --help
查看说明,将默认的目录改改?

diaobk 发表于 2015-10-5 20:41:13

本帖最后由 diaobk 于 2015-10-5 20:44 编辑

安装sh版的成功了
然后安装gromacs的时候还是出错
The C compiler identification is GNU 4.1.2
-- The CXX compiler identification is GNU 4.1.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /home/kjlv/program/cmake-3.3.2-Linux-x86_64/share/cmake-3.3/Modules/CMakeTestCCompiler.cmake:61 (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/kjlv/Software/gromacs-5.0.4/nompi/CMakeFiles/CMakeTmp



Run Build Command:"/usr/bin/gmake" "cmTC_b700c/fast"

/usr/bin/gmake -f CMakeFiles/cmTC_b700c.dir/build.make
CMakeFiles/cmTC_b700c.dir/build

gmake: Entering directory
`/home/kjlv/Software/gromacs-5.0.4/nompi/CMakeFiles/CMakeTmp'

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

/usr/bin/gcc -o CMakeFiles/cmTC_b700c.dir/testCCompiler.c.o -c
/home/kjlv/Software/gromacs-5.0.4/nompi/CMakeFiles/CMakeTmp/testCCompiler.c


Linking C executable cmTC_b700c

/home/kjlv/program/cmake-3.3.2-Linux-x86_64/bin/cmake -E cmake_link_script
CMakeFiles/cmTC_b700c.dir/link.txt --verbose=1

/usr/bin/gcc CMakeFiles/cmTC_b700c.dir/testCCompiler.c.o -o cmTC_b700c
-rdynamic


/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
final link failed: No space left on device

还是这个ld   No space left

看来是这个的问题要怎么解决?   df看磁盘空间还很富余的

diaobk 发表于 2015-10-5 20:44:34

greatzdl 发表于 2015-10-5 15:51
https://cmake.org/download/
下载Binary distributions
或者


安装sh版的成功了
然后安装gromacs的时候还是出错
The C compiler identification is GNU 4.1.2
-- The CXX compiler identification is GNU 4.1.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /home/kjlv/program/cmake-3.3.2-Linux-x86_64/share/cmake-3.3/Modules/CMakeTestCCompiler.cmake:61 (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/kjlv/Software/gromacs-5.0.4/nompi/CMakeFiles/CMakeTmp



Run Build Command:"/usr/bin/gmake" "cmTC_b700c/fast"

/usr/bin/gmake -f CMakeFiles/cmTC_b700c.dir/build.make
CMakeFiles/cmTC_b700c.dir/build

gmake: Entering directory
`/home/kjlv/Software/gromacs-5.0.4/nompi/CMakeFiles/CMakeTmp'

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

/usr/bin/gcc -o CMakeFiles/cmTC_b700c.dir/testCCompiler.c.o -c
/home/kjlv/Software/gromacs-5.0.4/nompi/CMakeFiles/CMakeTmp/testCCompiler.c


Linking C executable cmTC_b700c

/home/kjlv/program/cmake-3.3.2-Linux-x86_64/bin/cmake -E cmake_link_script
CMakeFiles/cmTC_b700c.dir/link.txt --verbose=1

/usr/bin/gcc CMakeFiles/cmTC_b700c.dir/testCCompiler.c.o -o cmTC_b700c
-rdynamic


/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
final link failed: No space left on device

还是这个ld   No space left

看来是这个的问题要怎么解决?   df看磁盘空间还很富余的

greatzdl 发表于 2015-10-6 17:31:36

diaobk 发表于 2015-10-5 20:44
安装sh版的成功了
然后安装gromacs的时候还是出错
The C compiler identification is GNU 4.1.2


你说的磁盘空间富裕
怎么还会 No space left
你仔细看看
是/boot, /, /home, 那个富裕 哪个不富裕呢?

diaobk 发表于 2015-10-6 21:18:23

greatzdl 发表于 2015-10-6 17:31
你说的磁盘空间富裕
怎么还会 No space left
你仔细看看


好像是这个问题

df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda1                  0       0       0    -/
udev                     12M   422   12M    1% /dev
/dev/sdb1                  0       0       0    -/home
可能是Linux索引节点(inode)用满了

然而普通权限的用户可以操作吗?而且home一点Inode都没有

greatzdl 发表于 2015-10-7 18:50:49

diaobk 发表于 2015-10-6 21:18
好像是这个问题

df -i


咨询一下管理员
df -h 是什么结果呢?

wangpengfei 发表于 2016-7-24 21:32:02

挖坟。c++没安好吧   上来先sudo apt-get install g++ gcc
页: [1]
查看完整版本: cmake安装失败