Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-1786

build failure on crc32-pclmul_asm

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Lustre 2.3.0
    • Fix Version/s: Lustre 2.3.0, Lustre 2.4.0
    • Labels:
      None
    • Environment:
      lustre version 2.2.93
      x86_64 system
      ARCH=x86_64
    • Severity:
      3
    • Epic:
    • Rank (Obsolete):
      4471

      Description

      When building lustre (version tagged 2.2.93) on x86_64 system, with ARCH environment variable set to x86_64, it fails as described below.

      # echo $ARCH
      x86_64
      # make rpms
      ...
      make[2]: Entering directory `/home/build/lustre-release/libcfs'
       (cd libcfs && make  top_distdir=../../lustre-2.2.93 distdir=../../lustre-2.2.93/libcfs/libcfs \
           am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
      make[3]: *** No rule to make target `crc32-pclmul_asm.c', needed by `distdir'.  Stop.
      

      Maybe having ARCH environment variable set when building lustre is not standard, but anyway the makefiles should not rely on its value, or it should recompute it.

      in libcfs/libcfs/Makefile.in

      ifeq ($(ARCH),x86)
      libcfs-linux-objs += linux-crypto-crc32pclmul.o
      libcfs-pclmul-obj += crc32-pclmul_asm.o
      endif
      ifeq ($(ARCH),i386)
      libcfs-linux-objs += linux-crypto-crc32pclmul.o
      libcfs-pclmul-obj += crc32-pclmul_asm.o
      endif
      ifeq ($(ARCH),x86_64)
      libcfs-linux-objs += linux-crypto-crc32pclmul.o
      libcfs-pclmul-obj += crc32-pclmul_asm.o
      endif
      
      ...
      
      libcfs-all-objs := debug.o fail.o nidstrings.o lwt.o module.o tracefile.o \
                         watchdog.o libcfs_string.o hash.o kernel_user_comm.o \
                         prng.o workitem.o upcall_cache.o libcfs_cpu.o \
                         libcfs_mem.o libcfs_lock.o $(libcfs-pclmul-obj)
      
      libcfs-objs := $(libcfs-linux-objs) $(libcfs-all-objs)
      
      

      in libcfs/libcfs/autoMakefile.in

      ...
      EXTRA_DIST := $(libcfs-all-objs:%.o=%.c) Info.plist tracefile.h prng.c \
                    user-lock.c user-tcpip.c user-bitops.c user-prim.c workitem.c \
                    user-mem.c kernel_user_comm.c fail.c libcfs_cpu.c \
                    libcfs_mem.c libcfs_lock.c linux/linux-tracefile.h
      ...
      DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
      ...
      distdir: $(DISTFILES)
      ...
      

      When the directive "$(libcfs-all-objs:%.o=%.c)" is applied to crc32-pclmul_asm.o, it adds a dependency on crc32-pclmul_asm.c file which does not exist.

      The problem does not appears when ARCH environment variable is not set because in that case libcfs-pclmul-obj is null.

      So I propose to update libcfs/libcfs/Makefile and move libcfs-pclmul-obj from libcfs-all-objs to libcfs-objs.

      libcfs-all-objs := debug.o fail.o nidstrings.o lwt.o module.o tracefile.o \
                         watchdog.o libcfs_string.o hash.o kernel_user_comm.o \
                         prng.o workitem.o upcall_cache.o libcfs_cpu.o \
                         libcfs_mem.o libcfs_lock.o
      
      libcfs-objs := $(libcfs-linux-objs) $(libcfs-all-objs) $(libcfs-pclmul-obj)
      

      Additionally, the ARCH variable should probably be replaced in libcfs/libcfs/Makefile.in.

        Attachments

          Activity

            People

            • Assignee:
              mdiep Minh Diep
              Reporter:
              pichong Gregoire Pichon
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: