Opened 3 years ago
Closed 3 years ago
#16939 closed defect (fixed)
samba fails to build if xfsprogs-5.19.0 and glibc-2.36 are installed
Reported by: | pierre | Owned by: | Douglas R. Reno |
---|---|---|---|
Priority: | high | Milestone: | 11.2 |
Component: | BOOK | Version: | git |
Severity: | blocker | Keywords: | |
Cc: |
Description ¶
The error is the usual header clash:
[2365/4200] Compiling source3/lib/sysquotas_xfs.c In file included from /usr/include/linux/fs.h:19, from /usr/include/xfs/linux.h:36, from /usr/include/xfs/xfs.h:9, from /usr/include/xfs/xqm.h:9, from ../../source3/lib/sysquotas_xfs.c:36: /usr/include/linux/mount.h:95:6: error: redeclaration of ‘enum fsconfig_command’ 95 | enum fsconfig_command { | ^~~~~~~~~~~~~~~~ In file included from ../../lib/replace/system/filesys.h:40, from ../../libcli/smb/smb_util.h:23, from ../../libcli/smb/smb_common.h:31, from ../../source3/include/smb.h:29, from ../../source3/include/includes.h:275, from ../../source3/lib/sysquotas_xfs.c:21: /usr/include/sys/mount.h:189:6: note: originally defined here 189 | enum fsconfig_command | ^~~~~~~~~~~~~~~~ /usr/include/linux/mount.h:96:9: error: redeclaration of enumerator ‘FSCONFIG_SET_FLAG’ 96 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ | ^~~~~~~~~~~~~~~~~ /usr/include/sys/mount.h:191:3: note: previous definition of ‘FSCONFIG_SET_FLAG’ with type ‘enum fsconfig_command’ 191 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ | ^~~~~~~~~~~~~~~~~
and several other "error: redeclaration of ..."
The problem is that the clash is between a header included by samba and one included by xfs, so that fixing it is not just a matter of removing a #include line.
Change History (6)
comment:1 by , 3 years ago
follow-up: 3 comment:2 by , 3 years ago
There is a patch series applied for Glibc-2.37 to avoid the conflict between sys/mount.h and kernel headers, but the upstream does not think the patches are fine for backporting into 2.36 and if we apply the patch we'll have to release 11.2-rc2 :(.
comment:3 by , 3 years ago
Replying to Xi Ruoyao:
There is a patch series applied for Glibc-2.37 to avoid the conflict between sys/mount.h and kernel headers, but the upstream does not think the patches are fine for backporting into 2.36 and if we apply the patch we'll have to release 11.2-rc2 :(.
This could cause so many problems :(
I'll try to come up with a proper workaround. I don't want to release with no quota support
comment:4 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 3 years ago
According to an archlinux patch sys/mount.h does not need to be included from lib/replace/system/filesys.h (on linux). So maybe just remove the "#include <sys/mount.h>" line from that file (there will be an empty #if...#endif, that does not hurt I think).
comment:6 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
An easy workaround is to use --without-quotas in configure. But it disables all quotas, not only xfs ones.