autoconf - 为 OpenMPI 1.3 定义宏
问题描述
我正在尝试非常旧的 OpenMPI 1.3版本。
我可以运行autogen.sh
生成configure
. 但是在运行时make
出现以下错误:
In file included from event.c:37:0:
../../opal/event/compat/sys/_time.h:47:8: error: redefinition of 'struct timeval'
struct timeval {
^
In file included from /usr/include/x86_64-linux-gnu/sys/select.h:45:0,
from /usr/include/x86_64-linux-gnu/sys/types.h:219,
from /usr/include/stdlib.h:314,
from ../../opal/include/opal_config_bottom.h:372,
from ../../opal/include/opal_config.h:1341,
from event.c:28:
/usr/include/x86_64-linux-gnu/bits/time.h:30:8: note: originally defined here
struct timeval
^
In file included from event.c:37:0:
../../opal/event/compat/sys/_time.h:55:8: error: redefinition of 'struct timespec'
struct timespec {
^
In file included from /usr/include/x86_64-linux-gnu/sys/select.h:43:0,
from /usr/include/x86_64-linux-gnu/sys/types.h:219,
from /usr/include/stdlib.h:314,
from ../../opal/include/opal_config_bottom.h:372,
from ../../opal/include/opal_config.h:1341,
from event.c:28:
/usr/include/time.h:120:8: note: originally defined here
struct timespec
^
我检查了包含_time.h
带有ack
. 例如,该文件opal/event/event.c
包含该标题。它有以下几行:
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <sys/_time.h>
#endif
所以看起来我需要在整个项目中定义宏 HAVE_SYS_TIME_H 来迁移问题。怎么做?
更新:我只是注意到sys/time.h
退出/usr/include/linux/time.h
. sys
映射到linux
目录吗?
PS:运行autoreconf -i
出现如下错误:
$ autoreconf -i
aclocal: error: acinclude.m4:111: file 'config/mca_no_configure_components.m4' does not exist
autoreconf: aclocal failed with exit status: 1
我创建了一些丢失的文件并重新运行autoreconf -i
,然后出现以下错误:
$ autoreconf -i
sh: 1: config/ompi_get_version.sh: not found
sh: 1: config/ompi_get_version.sh: not found
sh: 1: config/ompi_get_version.sh: not found
sh: 1: config/ompi_get_version.sh: not found
sh: 1: config/ompi_get_version.sh: not found
sh: 1: config/ompi_get_version.sh: not found
sh: 1: config/ompi_get_version.sh: not found
sh: 1: config/ompi_get_version.sh: not found
sh: 1: config/ompi_get_version.sh: not found
configure.ac:934: error: Could not find project list - rerun autogen.sh without -l
config/ompi_mca.m4:37: OMPI_MCA is expanded from...
configure.ac:934: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
所以我认为autogen.sh
是必须的。
PS2:我试过了./configure CPPFLAGS=-I/usr/include/ CFLAGS=-I/usr/include/
。重新定义错误仍然存在。
解决方案
推荐阅读
- docker - ARM Docker 上的无头 Chromium - Segfault
- maven - 为什么我只能从 log4j2 打印出“错误”?
- sh - 在 Shell 中,如何一次对目录中的两个文件运行命令?
- r - 试图找出 R 组内周间美元的百分比变化
- python - 无法在 conda 环境中打开 spyder
- javascript - 节点错误号 ECONNREFUSED gmail 停止工作
- javascript - 防止使用 ng-hide 隐藏的内容在页面上短暂呈现?
- rust - 是否有类似 vec 的链表的等效宏!在锈
- bit-manipulation - 在任意两位中间加一点
- azure - 如何连接自定义域和 Azure 域