Bug 13830 - [vfs_glusterfs]compile failed with vfs_glusterfs module once glusterfs packages installed
Summary: [vfs_glusterfs]compile failed with vfs_glusterfs module once glusterfs packag...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-11 22:45 UTC by Joe Guo (mail address dead)
Modified: 2019-11-05 17:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Guo (mail address dead) 2019-03-11 22:45:49 UTC
In Ubuntu1804 docker image, CI passed before.
However, once glusterfs packages installed, e.g.: glutsterfs-common for deb, glusterfs-devel for rpm, a lot more compile errors appear. Currently I will remove it from dependencies to mute errors, but we need to fix it in future.

Example:
```
 /builds/catalyst-samba/samba/samba-ctdb.stderr <==
In file included from ../../source3/include/includes.h:252:0,
                 from ../../source3/modules/vfs_glusterfs.c:38:
../../source3/modules/vfs_glusterfs.c: In function ‘vfs_gluster_set_volfile_servers’:
../../source3/modules/vfs_glusterfs.c:177:12: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Werror=format=]
   DBG_INFO("server %d %s\n", server_count, server);
            ^
../../source3/../lib/util/debug.h:227:15: note: in definition of macro ‘DBG_PREFIX’
   && (dbgtext body) )
               ^~~~
../../source3/modules/vfs_glusterfs.c:177:3: note: in expansion of macro ‘DBG_INFO’
   DBG_INFO("server %d %s\n", server_count, server);
   ^~~~~~~~
../../source3/modules/vfs_glusterfs.c:254:15: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Werror=format=]
   DBG_WARNING("Failed to set %d out of %d servers parsed\n",
               ^
        server_count - server_success, server_count);
        ~~~~~~~~~~~~~~~~
../../source3/../lib/util/debug.h:227:15: note: in definition of macro ‘DBG_PREFIX’
   && (dbgtext body) )
               ^~~~
../../source3/modules/vfs_glusterfs.c:254:3: note: in expansion of macro ‘DBG_WARNING’
   DBG_WARNING("Failed to set %d out of %d servers parsed\n",
   ^~~~~~~~~~~
../../source3/modules/vfs_glusterfs.c:254:15: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Werror=format=]
   DBG_WARNING("Failed to set %d out of %d servers parsed\n",
               ^
../../source3/../lib/util/debug.h:227:15: note: in definition of macro ‘DBG_PREFIX’
   && (dbgtext body) )
               ^~~~
../../source3/modules/vfs_glusterfs.c:254:3: note: in expansion of macro ‘DBG_WARNING’
   DBG_WARNING("Failed to set %d out of %d servers parsed\n",
   ^~~~~~~~~~~
cc1: all warnings being treated as errors


```
Comment 1 Anoop C S 2019-11-05 10:22:19 UTC
(In reply to Joe Guo from comment #0)
These have been fixed via the following commit:

commit bd5b4a16c7e45b4deafb9071d915b90740d45543
Author: Andreas Schneider <asn@samba.org>
Date:   Tue Apr 23 12:57:02 2019 +0200

    s3:modules: Fix size types
    
    error: assuming signed overflow does not occur when simplifying
    conditional to constant [-Werror=strict-overflow]
    
    Signed-off-by: Andreas Schneider <asn@samba.org>
    Reviewed-by: Ralph Boehme <slow@samba.org>

Feel free to close the bug report.