【问题标题】:Building Cmake on AIX does not succeed?在 AIX 上构建 Cmake 不成功?
【发布时间】:2018-12-23 08:51:29
【问题描述】:

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

我下载了 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 脚本或 您选择的任何其他构建目录。一旦完成 成功运行make 和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.

我接下来的步骤是什么?


$ 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.

【问题讨论】:

  • 在 S.O. 上很少有 AIX 人。 (但你可能会走运!)。我在toolbox.com 的 AIX 部分看到了很好的答案,并且在 IBM 用户论坛上曾经有很好的支持。在我使用 AIX 的地方,安装任何东西都是一个为期 6 个月的项目,所以我会尝试将自己的解决方案编写为代码 ;-/ 。 YRMV。祝你好运。
  • 首先,将选项--verbose 添加到bootstrap

标签: cmake aix


【解决方案1】:

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

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

【讨论】:

  • 下载源码(cmake.org/files/v3.11/cmake-3.11.4.tar.gz),你会发现cmake-3.11.4/Utilities/cm_kwiml.h
  • FWIW,我在 AIX / XLC 上使用过 CMake(显然是成功的)...但那是两年前的事了,我不再可以访问 AIX机器。工件仍在my build framework 中。因此,如果 CMake 不再适用于 AIX,那就是一种回归。
  • 正在讨论使用 IBM XL C/C++ for AIX 构建 CMake 的问题here。
  • @DevSolar - 在GCC Compile Farm 申请一个帐户。他们有 8 台 PowerPC 机器。 GCC111 是带有 POWER7 的 AIX,而 GCC119 是带有 POWER8 的 AIX。或者,通过 noloader 发送电子邮件给我,gmail 帐户使用您的 SSH 密钥。我会暂时将您添加到我的帐户中。
猜你喜欢
  • 2020-10-24
  • 2015-10-28
  • 2018-03-11
  • 2019-07-31
  • 1970-01-01
  • 2018-01-15
  • 2015-06-12
  • 1970-01-01
  • 2020-11-01
相关资源
最近更新 更多