Я пробую очень старую версию 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/
.Ошибка переопределения сохраняется.