1
1
libsysfs headers are required for libibverbs v1.0 (i.e., OFED 1.0 and
OFED 1.1), meaning that <infiniband/verbs.h> would #include
<sysfs/libsysfs.h>.  Hence, if the libsysfs headers did not exist on a
system, including <verbs.h> would fail.  

With older versions of Autoconf, we would simply test for the
''presence'' of the <infinband/verbs.h> and not actually try to
''use'' it.  This could leave OMPI in a weird situation on systems
that did not have the sysfs headers installed: configure would
complete successfully, but the build of the openib btl would fail.
Some users complained, thinking that there was a real compile error in
the OMPI code base.

Hence, we decided that it would be better to AC_CHECK_HEADER for the
sysfs header files in configure.  If the sysfs header files were not
found, configure would abort.  Users generally understand when
configure aborts, and know how to read the output and fix the
underlying problem; it was ''much'' more obvious than having the OMPI
build fail for nebulous reasons much later.

Note that we also checked for / added -lsysfs, but that wasn't
necessary because libibverbs already run-time linked to it (i.e.,
libibverbs couldn't have been installed if the sysfs libraries weren't
installed).

However, there are now two reasons why the check for sysfs's header
files is no longer necessary:

 * Newer versions of Autoconf are now used for OMPI tarballs that
   check for both the presence '''and''' usability of header files.
   Hence, AC_CHECK_HEADER for <infiniband/verbs.h> will actually try
   to ''use'' it, so if the sysfs header files are not installed,
   AC_CHECK_HEADER will (rightfully) fail.
 * libibverbs v1.1 (i.e., OFED 1.2 and beyond) does not require
   libsysfs at all (headers or libraries).  

When checking for the sysfs header files, OMPI's configure ''forces''
you to have sysfs installed, even though it may not be needed (e.g.,
libibverbs v1.1 and beyond).  Clearly, this is not good (especially
since the sysfs software package is now deprecated, and some Linux
distros no longer install it by default).

So this commit simply removes the check for the sysfs header files and
libraries, allowing OMPI to be build on systems with libibverbs >=1.1 that
do not have sysfs installed.

For systems with libibverbs 1.0, if they do not have the sysfs headers
installed, we'll still fail AC_CHECK_HEADER and therefore still fail
configure properly.  I expanded the warning message to say that if
libibverbs 1.0 is being used, check to ensure that sysfs is installed,
yadda yadda yadda.

This commit was SVN r14971.

The following Trac tickets were found above:
  Ticket 1045 --> https://svn.open-mpi.org/trac/ompi/ticket/1045
Этот коммит содержится в:
Jeff Squyres 2007-06-08 23:34:05 +00:00
родитель 6710f202d9
Коммит 36679de8d8

Просмотреть файл

@ -54,15 +54,6 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
AC_MSG_WARN([Not building component.])
ompi_check_openib_happy="no"])])
AS_IF([test "$ompi_check_openib_happy" = "yes"],
[AC_CHECK_HEADER(
[sysfs/libsysfs.h],
[AC_CHECK_LIB([sysfs],
[sysfs_open_class],
[],
[AC_MSG_WARN([libsysfs not found. Can not build component.])
ompi_check_openib_happy="no"])])])
AS_IF([test "$ompi_check_openib_happy" = "yes"],
[OMPI_CHECK_PACKAGE([$1],
[infiniband/verbs.h],
@ -113,7 +104,9 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
AS_IF([test "$ompi_check_openib_happy" = "yes"],
[$2],
[AS_IF([test ! -z "$with_openib" -a "$with_openib" != "no"],
[AC_MSG_ERROR([OpenFabrics support requested (via --with-openib) but not found. Aborting])])
[AC_MSG_WARN([OpenFabrics support requested (via --with-openib) but not found.])
AC_MSG_WARN([If you are using libibverbs v1.0 (i.e., OFED v1.0 or v1.1), you *MUST* have both the libsysfs headers and libraries installed. Later versions of libibverbs do not require libsysfs.])
AC_MSG_ERROR([Aborting.])])
$3])
])