为OpenMPI 1.3

时间:2018-05-19 15:15:02

标签: autoconf openmpi

我正在尝试使用非常旧版本的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 dir?

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/。重新定义错误仍然存​​在。

0 个答案:

没有答案