<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:52:01 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-5501] new e2fsprogs causes llverfs build failures</title>
                <link>https://jira.whamcloud.com/browse/LU-5501</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;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&apos;t seen when building lustre in master.  I think that&apos;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.&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;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 &#8216;__u32&#8217;
/usr/include/ext2fs/ext2_fs.h:137: error: expected specifier-qualifier-list before &#8216;__u32&#8217;
/usr/include/ext2fs/ext2_fs.h:151: error: expected specifier-qualifier-list before &#8216;__u32&#8217;
/usr/include/ext2fs/ext2_fs.h:170: error: expected specifier-qualifier-list before &#8216;__u32&#8217;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;For some reason that&apos;s not entirely clear to me generic typedefs like __u32 aren&apos;t getting pulled in correctly when building strictly userspace code, like in lustre/utils, when #includes from /usr/include/ext2fs are used.&lt;/p&gt;</description>
                <environment>e2fsprogs-devel 1.42.11.wc2</environment>
        <key id="26056">LU-5501</key>
            <summary>new e2fsprogs causes llverfs build failures</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="yujian">Jian Yu</assignee>
                                    <reporter username="bogl">Bob Glossman</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Aug 2014 18:16:33 +0000</created>
                <updated>Tue, 4 Nov 2014 04:04:25 +0000</updated>
                            <resolved>Tue, 4 Nov 2014 04:04:25 +0000</resolved>
                                    <version>Lustre 2.5.3</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="92864" author="adilger" created="Fri, 29 Aug 2014 23:13:40 +0000"  >&lt;p&gt;Bob, is it enough to just switch the order of these include files, so &lt;tt&gt;#include &amp;lt;ext2fs/ext2fs.h&amp;gt;&lt;/tt&gt; comes before &lt;tt&gt;#include &amp;lt;e2p/e2p.h&amp;gt;&lt;/tt&gt;?  Could you please give this a try in your test environment and submit a patch in that case?&lt;/p&gt;</comment>
                            <comment id="92865" author="bogl" created="Fri, 29 Aug 2014 23:21:52 +0000"  >&lt;p&gt;no, just changing the order of the #includes and putting &amp;lt;ext2fs/ext2fs.h&amp;gt; first doesn&apos;t help. build still fails.&lt;/p&gt;</comment>
                            <comment id="93125" author="pjones" created="Wed, 3 Sep 2014 16:32:20 +0000"  >&lt;p&gt;Yu, Jian is looking into this one&lt;/p&gt;</comment>
                            <comment id="93142" author="yujian" created="Wed, 3 Sep 2014 19:37:11 +0000"  >&lt;p&gt;&apos;__u32&apos; is defined in ext2fs/ext2_types.h, which is included in ext2fs/ext2_fs.h. I&apos;ll look at what changes were made on ext2fs/ext2_types.h.&lt;/p&gt;</comment>
                            <comment id="93148" author="yujian" created="Wed, 3 Sep 2014 20:00:52 +0000"  >&lt;p&gt;Hi Andreas,&lt;/p&gt;

&lt;p&gt;I saw the following change on lib/ext2fs/ext2_types.h.in, which was committed on Jul 4, 2014:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;commit 5023510dd7f0ab40a216d3600ab665e2053cc070
Author: Andreas Dilger &amp;lt;adilger@dilger.ca&amp;gt;
Date:   Fri Jul 4 23:34:10 2014 -0400

    blkid,ext2fs: avoid name clash with __u{8,16,32,64}
    
    Try to avoid name clashes with definitions of __u8, __u16, __u32,
    and __u64 in userspace, in case other headers also define these
    types.  Define HAVE___{S,U}{8,16,32,64} preprocessor macros to
    show that these types are already defined.
    
    This would avoid the need to check for _BLKID_TYPES_H in ext2_types.h
    and _EXT2_TYPES_H in blkid_types.h, but since older versions of these
    headers did not use HAVE___U8 et.al. keep these checks around for now.
    
    Report an error if there are no 64-bit types available.  The code
    will not compile if these are not available.
    
    Signed-off-by: Andreas Dilger &amp;lt;adilger@dilger.ca&amp;gt;
    Signed-off-by: Theodore Ts&apos;o &amp;lt;tytso@mit.edu&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It looks like this is the culprit that causes the issue in this ticket. &lt;/p&gt;</comment>
                            <comment id="93167" author="yujian" created="Thu, 4 Sep 2014 00:50:59 +0000"  >&lt;p&gt;Bob verified that installing e2fsprogs built with the above change backed out did make the llverfs and llverdev build problem go away. I&apos;m investigating if there is a way to fix it instead of reverting it.&lt;/p&gt;</comment>
                            <comment id="93247" author="adilger" created="Thu, 4 Sep 2014 22:33:50 +0000"  >&lt;p&gt;Could you please explain the actual problem further?  The &amp;#95;&amp;#95;u32 type is declared in ext2_types.h unless HAVE&amp;#95;&amp;#95;&amp;#95;U32 is already defined.  In the older code, it unconditionally declared the &amp;#95;&amp;#95;u32 type, even if it was already declared elsewhere.&lt;/p&gt;

&lt;p&gt;This shouldn&apos;t affect the llverfs.c and llverdev.c programs, since they don&apos;t use &amp;#95;&amp;#95;u32 themselves.  I&apos;m also wondering where the HAVE_EXT2FS_EXT2FS_H define is coming from?  I see that the programs themselves don&apos;t include config.h and at least on my system this isn&apos;t defined by the build environment:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;gcc -DHAVE_CONFIG_H -I. -I../..  -D__arch_lib__ -D_LARGEFILE64_SOURCE=1 -DLUSTRE_UTILS=1 -D_FILE_OFFSET_BITS=64 -include /usr/src/lustre-head/config.h -I/usr/src/lustre-head/libcfs/include -I/usr/src/lustre-head/lnet/include -I/usr/src/lustre-head/lustre/include  -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -MT llverdev.o -MD -MP -MF .deps/llverdev.Tpo -c -o llverdev.o llverdev.c
mv -f .deps/llverdev.Tpo .deps/llverdev.Po
/bin/sh ../../libtool --tag=CC   --mode=link gcc -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -L../../lnet/utils  -o llverdev llverdev.o -lext2fs -lblkid -lkeyutils
libtool: link: gcc -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -o llverdev llverdev.o  -L/usr/src/lustre-head/lnet/utils -lext2fs -lblkid -lkeyutils
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Maybe this has been a longstanding problem, but it is only exposed on some new platform because &lt;tt&gt;HAVE_EXT2FS_EXT2FS_H&lt;/tt&gt; is now defined by the build environment?&lt;/p&gt;</comment>
                            <comment id="93257" author="bogl" created="Fri, 5 Sep 2014 00:01:23 +0000"  >&lt;p&gt;Andreas,  strongly suspect the HAVE_EXT2FS_EXT2FS_H is in fact coming from the lustre config.h.  Present in your example compile line as: &quot;-include /usr/src/lustre-head/config.h&quot;&lt;/p&gt;

&lt;p&gt;That constant is #define&apos;d in both my master build, where the build works, and the b2_5 build, where the build fails.&lt;/p&gt;

&lt;p&gt;Can&apos;t say why the #includes aren&apos;t working as you describe, it seems like they should.  I do confirm that backing out the 1 e2fsprogs commit that changes the ext2fs #includes does fix the problem.&lt;/p&gt;</comment>
                            <comment id="93302" author="adilger" created="Fri, 5 Sep 2014 07:11:34 +0000"  >&lt;p&gt;Bob, what does the installed /usr/include/ext2fs/ext2_types-x86_64.h look like?  When building b2_5 against e2fsprogs-1.42.11.wc2 I see in the configure output:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;checking ext2fs/ext2fs.h usability... no
checking ext2fs/ext2fs.h presence... yes
configure: WARNING: ext2fs/ext2fs.h: present but cannot be compiled
configure: WARNING: ext2fs/ext2fs.h:     check for missing prerequisite headers?
configure: WARNING: ext2fs/ext2fs.h: see the Autoconf documentation
configure: WARNING: ext2fs/ext2fs.h:     section &quot;Present But Cannot Be Compiled&quot;
configure: WARNING: ext2fs/ext2fs.h: proceeding with the compiler&apos;s result
configure: WARNING:     ## ----------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.whamcloud.com/ ##
configure: WARNING:     ## ----------------------------------------- ##
checking for ext2fs/ext2fs.h... no
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which is probably why HAVE_EXT2FS_EXT2FS_H is not defined on my test system where I develop e2fsprogs.  My config.h does show HAVE___U32 is declared, so the ext2_types.h header should just skip these definitions entirely.&lt;/p&gt;

&lt;p&gt;It might be useful to compile with &quot;-E&quot; to see what the actual code looks like after CPP is finished.&lt;/p&gt;</comment>
                            <comment id="93321" author="bogl" created="Fri, 5 Sep 2014 15:12:39 +0000"  >&lt;p&gt;Andreas, when I build b2_5 I see the following configure status&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;checking ext2fs/ext2fs.h usability... no
checking ext2fs/ext2fs.h presence... yes
configure: WARNING: ext2fs/ext2fs.h: present but cannot be compiled
configure: WARNING: ext2fs/ext2fs.h:     check for missing prerequisite headers?
configure: WARNING: ext2fs/ext2fs.h: see the Autoconf documentation
configure: WARNING: ext2fs/ext2fs.h:     section &quot;Present But Cannot Be Compiled&quot;
configure: WARNING: ext2fs/ext2fs.h: proceeding with the preprocessor&apos;s result
configure: WARNING: ext2fs/ext2fs.h: in the future, the compiler will take precedence
configure: WARNING:     ## ----------------------------------------- ##
configure: WARNING:     ## Report this to http://bugs.whamcloud.com/ ##
configure: WARNING:     ## ----------------------------------------- ##
checking for ext2fs/ext2fs.h... yes
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note that in spite of the WARNINGS, similar to the ones you show, mine eventually says &quot;checking for ext2fs/ext2fs.h... yes&quot; anyway.  My config.h therefore has:&lt;/p&gt;

&lt;p&gt;#define HAVE_EXT2FS_EXT2FS_H 1&lt;/p&gt;

&lt;p&gt;I will attach the /usr/include/ext2fs/ext2_types-x86_64.h present when the b2_5 build fails.&lt;/p&gt;</comment>
                            <comment id="93323" author="bogl" created="Fri, 5 Sep 2014 15:15:13 +0000"  >&lt;p&gt;include file from e2fsprogs 1.42.11.wc2 present when b2_5 build fails&lt;/p&gt;</comment>
                            <comment id="93325" author="bogl" created="Fri, 5 Sep 2014 15:34:22 +0000"  >&lt;p&gt;output of compile of llverfs.c with -E&lt;/p&gt;</comment>
                            <comment id="93630" author="adilger" created="Tue, 9 Sep 2014 23:27:21 +0000"  >&lt;p&gt;It looks like this problem is isolated to b2_5&apos;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 &quot;normal&quot; build line that does not implicitly include config.h (which is really intended for the kernel) into userspace programs:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;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
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;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&apos;t exist), so I didn&apos;t see this problem.  The dependency on libtool was added to master via &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4606&quot; title=&quot;Lustre hard codes libzfs.so.1 in lustre/utils/mount_utils_zfs.c&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4606&quot;&gt;&lt;del&gt;LU-4606&lt;/del&gt;&lt;/a&gt; change &lt;a href=&quot;http://review.whamcloud.com/10193&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10193&lt;/a&gt; (commit v2_5_59_0-19-g3e8c354) and on b2_5 via &lt;a href=&quot;http://review.whamcloud.com/11297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11297&lt;/a&gt; (commit v2_5_2_0-32-g0d77156).  The HAVE___U32 et.al. #defines were removed from configure on master via &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5018&quot; title=&quot;e2fsprogs build failed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5018&quot;&gt;&lt;del&gt;LU-5018&lt;/del&gt;&lt;/a&gt; change &lt;a href=&quot;http://review.whamcloud.com/10258&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10258&lt;/a&gt; so the only affected version is actually 2.5.3 AFAIK.&lt;/p&gt;

&lt;p&gt;It may be that the only work needed is to cherry-pick &lt;a href=&quot;http://review.whamcloud.com/10258&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/10258&lt;/a&gt; onto b2_5 for 2.5.4, and in the meantime the patch affecting e2fsprogs can be temporarily reverted.&lt;/p&gt;

&lt;p&gt;I&apos;ve pushed a patch to b2_5 that cherry-picks 10258 (resolving a few conflicts): &lt;a href=&quot;http://review.whamcloud.com/11840&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11840&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="93702" author="bogl" created="Wed, 10 Sep 2014 15:53:10 +0000"  >&lt;p&gt;I confirm that building b2_5 with &lt;a href=&quot;http://review.whamcloud.com/11840&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11840&lt;/a&gt; added works OK with new e2fsprogs #includes.  I agree this is a better solution than backing out the e2fsprogs mod.&lt;/p&gt;</comment>
                            <comment id="93894" author="adilger" created="Fri, 12 Sep 2014 21:11:26 +0000"  >&lt;p&gt;I&apos;ve also pushed &lt;a href=&quot;http://review.whamcloud.com/11901&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11901&lt;/a&gt; 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;</comment>
                            <comment id="93900" author="bogl" created="Fri, 12 Sep 2014 22:29:09 +0000"  >&lt;p&gt;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.&lt;/p&gt;</comment>
                            <comment id="98263" author="pjones" created="Tue, 4 Nov 2014 04:04:25 +0000"  >&lt;p&gt;Fix for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5018&quot; title=&quot;e2fsprogs build failed&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5018&quot;&gt;&lt;del&gt;LU-5018&lt;/del&gt;&lt;/a&gt; has landed to master and b2_5&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="24596">LU-5018</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="23082">LU-4606</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="15700" name="ext2_types-x86_64.h" size="3686" author="bogl" created="Fri, 5 Sep 2014 15:15:13 +0000"/>
                            <attachment id="15701" name="llverfs.E" size="215226" author="bogl" created="Fri, 5 Sep 2014 15:34:22 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwtzb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15348</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>