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

new e2fsprogs causes llverfs build failures

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • Lustre 2.5.3
    • None
    • e2fsprogs-devel 1.42.11.wc2
    • 3
    • 15348

    Description

      Some lustre code uses #include files coming from the e2fsprogs rpms, in particular the #include files in /usr/include/ext2fs. With the new version #include files from the latest v1.42.11.wc2 e2fsprogs some strictly user level code that uses those #incudes fail. The only thing that stops this bug from being a Blocker is that it isn't seen when building lustre in master. I think that's due to some of the restructuring of lustre #include that have happened lately in master. It is seen when building in b2_5 and earlier branches.

      Pretty sure this is due to changes in e2fsprogs #includes as it is only seen when the new 1.42.11 is installed, not seen with 1.42.9 and earlier. example errors:

      gcc -DHAVE_CONFIG_H -I. -I../..  -D__arch_lib__ -D_LARGEFILE64_SOURCE=1 -DLUSTRE
      _UTILS=1 -D_FILE_OFFSET_BITS=64 -include /home/bogl/other-lustre/config.h -I/hom
      e/bogl/other-lustre/libcfs/include -I/home/bogl/other-lustre/lnet/include -I/hom
      e/bogl/other-lustre/lustre/include  -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror 
      -MT llverfs.o -MD -MP -MF .deps/llverfs.Tpo -c -o llverfs.o llverfs.c
      In file included from /usr/include/e2p/e2p.h:14,
                       from llverfs.c:97:
      /usr/include/ext2fs/ext2_fs.h:129: error: expected specifier-qualifier-list before ‘__u32’
      /usr/include/ext2fs/ext2_fs.h:137: error: expected specifier-qualifier-list before ‘__u32’
      /usr/include/ext2fs/ext2_fs.h:151: error: expected specifier-qualifier-list before ‘__u32’
      /usr/include/ext2fs/ext2_fs.h:170: error: expected specifier-qualifier-list before ‘__u32’
      

      For some reason that's not entirely clear to me generic typedefs like __u32 aren't getting pulled in correctly when building strictly userspace code, like in lustre/utils, when #includes from /usr/include/ext2fs are used.

      Attachments

        Issue Links

          Activity

            [LU-5501] new e2fsprogs causes llverfs build failures
            pjones Peter Jones added a comment -

            Fix for LU-5018 has landed to master and b2_5

            pjones Peter Jones added a comment - Fix for LU-5018 has landed to master and b2_5
            bogl Bob Glossman (Inactive) added a comment - - edited

            Have verified e2fsprogs with 11901 patch builds OK and generates 1.42.12.wc1 version rpms. With that version installed both master and current b2_5 (without patch 11840) build OK, no build failures in lustre/utils seen. So far have only confirmed this on latest el6.5. Will gradually do other versions and distros as time permits.

            bogl Bob Glossman (Inactive) added a comment - - edited Have verified e2fsprogs with 11901 patch builds OK and generates 1.42.12.wc1 version rpms. With that version installed both master and current b2_5 (without patch 11840) build OK, no build failures in lustre/utils seen. So far have only confirmed this on latest el6.5. Will gradually do other versions and distros as time permits.

            I've also pushed http://review.whamcloud.com/11901 to temporarily revert the e2fsprogs 5023510dd7 commit from the master-lustre branch. This will allow building e2fsprogs against Lustre 2.5.3 until change 11840 lands and is released.

            The 11901 patch is based on the lustre patch series rebased onto the upstream e2fsprogs-1.42.12 release, and will build as 1.42.12.wc1.

            adilger Andreas Dilger added a comment - I've also pushed http://review.whamcloud.com/11901 to temporarily revert the e2fsprogs 5023510dd7 commit from the master-lustre branch. This will allow building e2fsprogs against Lustre 2.5.3 until change 11840 lands and is released. The 11901 patch is based on the lustre patch series rebased onto the upstream e2fsprogs-1.42.12 release, and will build as 1.42.12.wc1.

            I confirm that building b2_5 with http://review.whamcloud.com/11840 added works OK with new e2fsprogs #includes. I agree this is a better solution than backing out the e2fsprogs mod.

            bogl Bob Glossman (Inactive) added a comment - I confirm that building b2_5 with http://review.whamcloud.com/11840 added works OK with new e2fsprogs #includes. I agree this is a better solution than backing out the e2fsprogs mod.

            It looks like this problem is isolated to b2_5's use of libtool to build the llverfs.c and llverdev.c programs. Testing on b2_4 does not show this problem, even though HAVE___U32 and HAVE_EXT2FS_EXT2FS_H are defined in config.h. That is because the lustre/utils/Makefile uses a "normal" build line that does not implicitly include config.h (which is really intended for the kernel) into userspace programs:

            gcc -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -L../../lnet/utils  -o llverfs llverfs.o
            gcc -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -L../../lnet/utils  -o llverdev llverdev.o  -lblkid
            

            I did my e2fsprogs testing on my test system running master (~2.6.0) and on my production system running b2_4 (where the crazy libtool inclusion didn't exist), so I didn't see this problem. The dependency on libtool was added to master via LU-4606 change http://review.whamcloud.com/10193 (commit v2_5_59_0-19-g3e8c354) and on b2_5 via http://review.whamcloud.com/11297 (commit v2_5_2_0-32-g0d77156). The HAVE___U32 et.al. #defines were removed from configure on master via LU-5018 change http://review.whamcloud.com/10258 so the only affected version is actually 2.5.3 AFAIK.

            It may be that the only work needed is to cherry-pick http://review.whamcloud.com/10258 onto b2_5 for 2.5.4, and in the meantime the patch affecting e2fsprogs can be temporarily reverted.

            I've pushed a patch to b2_5 that cherry-picks 10258 (resolving a few conflicts): http://review.whamcloud.com/11840

            adilger Andreas Dilger added a comment - It looks like this problem is isolated to b2_5's use of libtool to build the llverfs.c and llverdev.c programs. Testing on b2_4 does not show this problem, even though HAVE___U32 and HAVE_EXT2FS_EXT2FS_H are defined in config.h. That is because the lustre/utils/Makefile uses a "normal" build line that does not implicitly include config.h (which is really intended for the kernel) into userspace programs: gcc -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -L../../lnet/utils -o llverfs llverfs.o gcc -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -L../../lnet/utils -o llverdev llverdev.o -lblkid I did my e2fsprogs testing on my test system running master (~2.6.0) and on my production system running b2_4 (where the crazy libtool inclusion didn't exist), so I didn't see this problem. The dependency on libtool was added to master via LU-4606 change http://review.whamcloud.com/10193 (commit v2_5_59_0-19-g3e8c354) and on b2_5 via http://review.whamcloud.com/11297 (commit v2_5_2_0-32-g0d77156). The HAVE___U32 et.al. #defines were removed from configure on master via LU-5018 change http://review.whamcloud.com/10258 so the only affected version is actually 2.5.3 AFAIK. It may be that the only work needed is to cherry-pick http://review.whamcloud.com/10258 onto b2_5 for 2.5.4, and in the meantime the patch affecting e2fsprogs can be temporarily reverted. I've pushed a patch to b2_5 that cherry-picks 10258 (resolving a few conflicts): http://review.whamcloud.com/11840
            bogl Bob Glossman (Inactive) added a comment - - edited

            output of compile of llverfs.c with -E

            bogl Bob Glossman (Inactive) added a comment - - edited output of compile of llverfs.c with -E

            People

              yujian Jian Yu
              bogl Bob Glossman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: