Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.3.0, Lustre 2.4.0
    • Lustre 2.3.0
    • None
    • lustre version 2.2.93
      x86_64 system
      ARCH=x86_64
    • 3
    • 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

          [LU-1786] build failure on crc32-pclmul_asm
          pjones Peter Jones added a comment -

          Landed for 2.3 and 2.4

          pjones Peter Jones added a comment - Landed for 2.3 and 2.4

          Submitted patch for 2.3 branch as well at http://review.whamcloud.com/#change,3839

          simmonsja James A Simmons added a comment - Submitted patch for 2.3 branch as well at http://review.whamcloud.com/#change,3839

          When lustre modules are building for kernel, Kbuild set ARCH and it is used at Makefile to detect current architecture.

          aboyko Alexander Boyko added a comment - When lustre modules are building for kernel, Kbuild set ARCH and it is used at Makefile to detect current architecture.

          What do you mean by "this variable [ARCH] came from Kbuild" ?

          pichong Gregoire Pichon added a comment - What do you mean by "this variable [ARCH] came from Kbuild" ?

          No, I don`t plan this change. The ARCH is used at Makefile to check architecture and this variable came from Kbuild. The current issue happend for user mode build only, because kernel objects was put to user mode autoMakefile.

          aboyko Alexander Boyko added a comment - No, I don`t plan this change. The ARCH is used at Makefile to check architecture and this variable came from Kbuild. The current issue happend for user mode build only, because kernel objects was put to user mode autoMakefile.

          Alexander,
          Do you plan to replace the ARCH variable in libcfs/libcfs/Makefile.in ?
          This change does not appear in the patch #3801 you submitted.

          pichong Gregoire Pichon added a comment - Alexander, Do you plan to replace the ARCH variable in libcfs/libcfs/Makefile.in ? This change does not appear in the patch #3801 you submitted.

          If this pans out we will need a patch for 2.3 branch as well before it closes.

          simmonsja James A Simmons added a comment - If this pans out we will need a patch for 2.3 branch as well before it closes.

          Builds now. Any test besides sanity77 and running IOR with checksums enabled.

          simmonsja James A Simmons added a comment - Builds now. Any test besides sanity77 and running IOR with checksums enabled.
          aboyko Alexander Boyko added a comment - http://review.whamcloud.com/3801

          People

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

            Dates

              Created:
              Updated:
              Resolved: