首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

源码装配cmake

2013-02-15 
源码安装cmake上传cmake-2.8.10.2.tar.gz到/usr/local/src目录[root@localhost src]# tar zxvf cmake-2.8.

源码安装cmake

上传cmake-2.8.10.2.tar.gz到/usr/local/src目录

[root@localhost src]# tar zxvf cmake-2.8.10.2.tar.gz[root@localhost src]# lltotal 29928drwxr-xr-x. 9 root root     4096 Jan 29 19:37 cmake-2.8.10.2-rw-r--r--. 1 root root  5768373 Jan 29 19:30 cmake-2.8.10.2.tar.gz-rw-r--r--. 1 root root 24870769 Jan 29 19:30 mysql-5.5.29.tar.gz[root@localhost src]# cd cmake-2.8.10.2[root@localhost cmake-2.8.10.2]# lltotal 2980-rwxr-xr-x.   1  501 games   54084 Nov 27 21:26 bootstrap-rw-r--r--.   1  501 games  190526 Nov 27 21:26 ChangeLog.manual-rw-r--r--.   1  501 games 2603523 Nov 27 21:26 ChangeLog.txt-rw-r--r--.   1  501 games    5395 Nov 27 21:26 CMakeCPack.cmake-rw-r--r--.   1  501 games    2536 Nov 27 21:26 CMakeCPackOptions.cmake.in-rw-r--r--.   1  501 games     153 Nov 27 21:26 CMakeGraphVizOptions.cmake-rw-r--r--.   1  501 games   24542 Nov 27 21:26 CMakeLists.txt-rw-r--r--.   1  501 games    4481 Nov 27 21:26 CMakeLogo.gif-rw-r--r--.   1  501 games     796 Nov 27 21:26 cmake_uninstall.cmake.in-rw-r--r--.   1  501 games    2204 Nov 27 21:26 CompileFlags.cmake-rwxr-xr-x.   1  501 games      99 Nov 27 21:26 configure-rw-r--r--.   1  501 games    2637 Nov 27 21:26 Copyright.txt-rw-r--r--.   1  501 games    1050 Nov 27 21:26 CTestConfig.cmake-rw-r--r--.   1  501 games    3258 Nov 27 21:26 CTestCustom.cmake.in-rw-r--r--.   1  501 games     145 Nov 27 21:26 CTestCustom.ctest.in-rw-r--r--.   1  501 games     809 Nov 27 21:26 DartConfig.cmake-rw-r--r--.   1  501 games    4144 Nov 27 21:26 DartLocal.conf.indrwxr-xr-x.   3 root root     4096 Jan 29 19:37 Docs-rw-r--r--.   1  501 games   28046 Nov 27 21:26 doxygen.configdrwxr-xr-x.   4 root root     4096 Jan 29 19:37 Exampledrwxr-xr-x.   9 root root    20480 Jan 29 19:37 Modules-rw-r--r--.   1  501 games    1946 Nov 27 21:26 Readme.txtdrwxr-xr-x.   7 root root    32768 Jan 29 19:37 Sourcedrwxr-xr-x.   2 root root     4096 Jan 29 19:37 Templatesdrwxr-xr-x. 150 root root     4096 Jan 29 19:37 Testsdrwxr-xr-x.  15 root root     4096 Jan 29 19:37 Utilities//安装cmake缺少gcc-c++[root@localhost cmake-2.8.10.2]# ./configure---------------------------------------------CMake 2.8.10.2, Copyright 2000-2012 Kitware, Inc.C compiler on this system is: cc ---------------------------------------------Error when bootstrapping CMake:Cannot find appropriate C++ compiler on this system.Please specify one using environment variable CXX.See cmake_bootstrap.log for compilers attempted.---------------------------------------------Log of errors: /usr/local/src/cmake-2.8.10.2/Bootstrap.cmk/cmake_bootstrap.log---------------------------------------------//yum安装gcc-c++,参见:http://dongbao100.iteye.com/admin/blogs/1777702[root@localhost cmake-2.8.10.2]# yum install gcc-c++Loaded plugins: fastestmirrorDetermining fastest mirrorscdrom                                                    | 4.0 kB     00:00 ... cdrom/primary_db                                         | 3.5 MB     00:00 ... Setting up Install ProcessResolving Dependencies--> Running transaction check---> Package gcc-c++.i686 0:4.4.6-4.el6 will be installed--> Processing Dependency: libstdc++-devel = 4.4.6-4.el6 for package: gcc-c++-4.4.6-4.el6.i686--> Running transaction check---> Package libstdc++-devel.i686 0:4.4.6-4.el6 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================ Package                 Arch         Version               Repository     Size================================================================================Installing: gcc-c++                 i686         4.4.6-4.el6           cdrom         4.3 MInstalling for dependencies: libstdc++-devel         i686         4.4.6-4.el6           cdrom         1.5 MTransaction Summary================================================================================Install       2 Package(s)Total download size: 5.8 MInstalled size: 18 MIs this ok [y/N]: yDownloading Packages:--------------------------------------------Total                                            28 MB/s | 5.8 MB     00:00     Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction  Installing : libstdc++-devel-4.4.6-4.el6.i686                             1/2   Installing : gcc-c++-4.4.6-4.el6.i686                                     2/2   Verifying  : gcc-c++-4.4.6-4.el6.i686                                     1/2   Verifying  : libstdc++-devel-4.4.6-4.el6.i686                             2/2 Installed:  gcc-c++.i686 0:4.4.6-4.el6                                                    Dependency Installed:  libstdc++-devel.i686 0:4.4.6-4.el6                                            Complete!

?继续安装cmake,出现如下错误:

[root@localhost cmake-2.8.10.2]# ./configure ---------------------------------------------CMake 2.8.10.2, Copyright 2000-2012 Kitware, Inc.Found GNU toolchainC compiler on this system is: gcc C++ compiler on this system is: g++ ---------------------------------------------Error when bootstrapping CMake:Cannot find appropriate Makefile processor on this system.Please specify one using environment variable MAKE.---------------------------------------------Log of errors: /usr/local/src/cmake-2.8.10.2/Bootstrap.cmk/cmake_bootstrap.log---------------------------------------------

?解决办法,安装make即可

[root@localhost cmake-2.8.10.2]# yum install make

?继续安装cmake

[root@localhost cmake-2.8.10.2]# ./configure

编译安装

[root@localhost cmake-2.8.10.2]# gmake[root@localhost cmake-2.8.10.2]# gmake install

?

安装成功

?

?

热点排行