无法在AIX上构建Cmake吗?

时间:2018-07-15 18:38:09

标签: cmake aix

我正在尝试重现AIX上报告的问题。我需要在$HOME中安装CMake,因为该计算机缺少CMake,而且我不是该计算机的管理员。机器是GCC119 on the compile farm。如果重要的话,GCC119是ppc64-be。

我下载了CMake 3.11,并解压缩到$HOME/cmake-3.11/中。根据{{​​1}}:

  

UNIX / Mac OSX / MinGW / MSYS / Cygwin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ p >      

您需要具有C ++编译器(支持C ++ 11)和README.rst   已安装。运行在源代码中找到的make脚本   CMake目录。您可以使用bootstrap选项查看   支持的选项。您可以使用--help   选项为CMake指定自定义安装目录。您可以   从CMake源目录中运行--prefix=<install_prefix>脚本,或   您选择的任何其他构建目录。一旦完成   成功运行bootstrapmake。总结::

make install

这似乎很简单:

$ ./bootstrap && make && make install

看来事情没有成功,但我不确定出什么问题或如何进行。似乎也没有日志文件:

-bash-4.4$ CXX=g++ ./bootstrap --prefix=$HOME
---------------------------------------------
CMake 3.11.4, Copyright 2000-2018 Kitware, Inc. and Contributors
C compiler on this system is: gcc   -pthread
C++ compiler on this system is: g++   -pthread
Makefile processor on this system is: gmake
-bash-4.4$ gmake
gmake: *** No targets specified and no makefile found.  Stop.
-bash-4.4$ make
make: *** No targets specified and no makefile found.  Stop.
-bash-4.4$ find . -name Makefile
-bash-4.4$ find . -name makefile
-bash-4.4$ find . -name cmake
./Auxiliary/bash-completion/cmake

下一步是什么?


-bash-4.4$ ls *.log
ls: 0653-341 The file *.log does not exist.

1 个答案:

答案 0 :(得分:0)

似乎有几个问题。首先,Cmake无法使用IBM XLC。尝试使用XLC引导程序选择选项时,它无法处理,因此死了。

第二,解决此问题:

CC=gcc CXX=g++ ./bootstrap --prefix="$HOME/cmake"

结果:

$ CC=gcc CXX=g++ bash -x ./bootstrap --prefix="$HOME/cmake"
++ uname
+ cmake_system=AIX
+++ dirname ./bootstrap
++ cd .
++ pwd
+ cmake_source_dir=/home/noloader/build-llvm/cmake_build
...

+ gmake
g++   -pthread -I/home/noloader/build-llvm/cmake_build/Bootstrap.cmk \
 -I/home/noloader/build-llvm/cmake_build/Source \
 -I/home/noloader/build-llvm/cmake_build/Source/LexerParser \
 -I/home/noloader/build-llvm/cmake_build/Utilities \
 -c /home/noloader/build-llvm/cmake_build/Source/cmAddCustomCommandCommand.cxx-o \
 cmAddCustomCommandCommand.o
In file included from /home/noloader/build-llvm/cmake_build/Source/cmTarget.h:16:0,
                 from /home/noloader/build-llvm/cmake_build/Source/cmGlobalGenerator.h:21,
                 from /home/noloader/build-llvm/cmake_build/Source/cmAddCustomCommandCommand.cxx:11:
/home/noloader/build-llvm/cmake_build/Source/cmAlgorithms.h:8:10:
fatal error: cm_kwiml.h: No such file or directory
 #include "cm_kwiml.h"
          ^~~~~~~~~~~~
compilation terminated.
Makefile:4: recipe for target 'cmAddCustomCommandCommand.o' failed
gmake: *** [cmAddCustomCommandCommand.o] Error 1
+ RES=2
+ '[' 2 -ne 0 ']'
+ cmake_error 9 'Problem while running gmake'
+ res=9
+ shift 1

这里的问题是,没有文件cm_kwiml.h

$ pwd
/home/noloader/build-llvm/cmake_build

$ find . -name "cm_kwiml.h"
$

我不知道如何解决此问题。