在AIX上构建Cmake不成功



我正试图重现AIX上报告的一个问题。我需要在$HOME中安装CMake,因为机器缺少CMake并且我不是机器上的管理员。该机器是编译场上的GCC119。如果重要的话,GCC119就是ppc64。

我下载了CMake 3.11并解压到$HOME/cmake-3.11/中。根据README.rst:

UNIX/Mac OSX/MinGW/MSYS/Cygwin

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

我的下一步行动是什么?


$ g++ --version
g++ (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

似乎有几个问题。首先,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"
$

我不知道如何解决这个问题。

最新更新