[Gluster-devel] Adventures in building GlusterFS

Jeff Darcy jdarcy at redhat.com
Thu Apr 2 00:57:58 UTC 2015


As many of you have undoubtedly noticed, we're now in a situation where
*all* regression builds are now failing, with something like this:

-----
cc1: warnings being treated as errors
/home/jenkins/root/workspace/rackspace-regression-2GB-triggered/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c:
In function ‘glusterd_snap_quorum_check_for_create’:
/home/jenkins/root/workspace/rackspace-regression-2GB-triggered/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c:2615:
error: passing argument 2 of ‘does_gd_meet_server_quorum’ from
incompatible pointer type
/home/jenkins/root/workspace/rackspace-regression-2GB-triggered/xlators/mgmt/glusterd/src/glusterd-server-quorum.h:56:
note: expected ‘struct list_head *’ but argument is of type ‘struct
cds_list_head *’
-----

The reason is that -Werror was turned on earlier today.  I'm not quite
sure how or where, because the version of build.sh that I thought builds
would use doesn't seem to have changed since September 8, but then
there's a lot about this system I don't understand.  Vijay (who I
believe made the change) knows it better than I ever will.  In any case,
this started me on a little journey of exploration.

I actually do builds a bit differently than Jenkins does, and as far as
I know differently than any other developer.  I do a complete RPM build
for every change, precisely to catch problems in that pipeline, but that
means some of the things I do might not be applicable or even safe when
"make install" is issued directly instead.

The first thing I had to do was add a couple of exceptions to -Werror
because of warnings that have been with us for ages.  Specifically:

        -Wno-error=cpp because multiple things generate warnings about
        _BSD_SOURCE and _SVID_SOURCE being deprecated

        -Wno-error=maybe-uninitialized because some of the qemu code is
        bad that way

That got me to the point where I could see - and hopefully debug -
today's issue.  As far as I can tell, the types changed with this patch:

        http://review.gluster.org/#/c/9492/
        glusterd: group server-quorum related code together

There's also a patch to fix the type mismatch that leads to the build
error:

        http://review.gluster.org/#/c/10105/
        mgmt/glusterd: set right definition of does_gd_meet_server_quorum()

Unfortunately, applying the later patch to my tree didn't solve the
problem.  I got similar errors in another related set of functions,
indicating that the type mismatch had just been pushed to a different
level.  However, by *reverting* the first patch, along with the flag
changes mentioned above, I was able to get a successful build.

My recommendations:

        (1) Apply the -Wno-error=cpp and -Wno-error=maybe-uninitialized
        changes wherever they need to be applied so that they're
        effective during normal regression builds

        (2) Revert patch 9492

        (3) Once regressions are running again, figure out how to make
        the necessary code changes so that (1) and (2) are no longer
        necessary

I'm unable to do either of these things myself.  Would anyone else like
to do so, or suggest an alternative remedy?


More information about the Gluster-devel mailing list