Details
-
Bug
-
Resolution: Low Priority
-
Minor
-
Lustre 2.0.0
-
Lustre 2.0.66
-
3
-
8639
Description
The dependencies listed for the libcfsutil.a target are incorrect. The sources for that library are listed in libcfs/libcfs/autoMakefile.am as:
libcfsutil_a_SOURCES = nidstrings.c util/parser.c util/parser.h util/platform.h \ util/l_ioctl.c util/util.c
Expanding out the above relative pathnames for the referenced [parser|platform].h files gives the following files:
libcfs/libcfs/util/parser.h libcfs/libcfs/util/platform.h
The problem is these files do not exist. My assumption is, the dependencies it is intending to use are the following files:
libcfs/include/libcfs/util/parser.h libcfs/include/libcfs/util/platform.h
Even worse, the [parser|platform].c files do not reference [parser|platform].h directly. These files are included through the directive:
#include <libcfs/libcfsutil.h>
But a dependency on libcfsutil.h is not in the *_SOURCES variable.
I think the right thing to do in this situation would be to fix these path issues using an "absolute" path to the needed files, using a reference to the top of the source tree. For example:
libcfsutil_a_SOURCES = $(top_srcdir)/libcfs/libcfs/util/nidstrings.c \ $(top_srcdir)/libcfs/libcfs/util/parser.c \ $(top_srcdir)/libcfs/libcfs/util/l_ioctl.c \ $(top_srcdir)/libcfs/libcfs/util/util.c \ $(top_srcdir)/libcfs/include/libcfs/util/parser.h \ $(top_srcdir)/libcfs/include/libcfs/util/platform.h \ $(top_srcdir)/libcfs/include/libcfs/libcfsutil.h
Although, full pathnames are not used throughout the build system for Lustre, thus the inconsistency of using full pathnames here is not ideal.
The patch submitted for LU-455, http://review.whamcloud.com/#change,1092, "fixes" this issue simply by removing the [parser|platform].h dependencies from the list of *_SOURCES.