Description of problem: Failure to compile glusterfs with glibc 2.25. Version-Release number of selected component (if applicable): ALL Versions How reproducible: Attempt to compile Steps to Reproduce: 1. ./autogen.sh 2. ./configure 3. make Actual results: $ make make --no-print-directory --quiet all-recursive Making all in rpc/xdr/gen Making all in libglusterfs Making all in src CC libglusterfs_la-dict.lo In file included from iatt.h:16:0, from common-utils.h:44, from dict.c:20: /usr/include/sys/sysmacros.h:57:45: error: attempt to use poisoned "system" directly. If you did not intend to use a system-defined macro\n\ ^ make[4]: *** [Makefile:959: libglusterfs_la-dict.lo] Error 1 make[3]: *** [Makefile:776: all] Error 2 make[2]: *** [Makefile:462: all-recursive] Error 1 make[1]: *** [Makefile:601: all-recursive] Error 1 make: *** [Makefile:492: all] Error 2 Expected results: clean build. Additional info: see attached patch for details.
Created attachment 1329697 [details] pragma_exempt.patch
Hi Dan, I couldn't reproduce the error mentioned in the bug description on a Fedora 27 machine with glibc v2.26. Is that something specific to glibc v2.25? Or am I missing something here?
Sorry for the long silence. My distro incorporated my patch, and I haven't had time to add more information. My bet Fedora enables some sort of backwards compatibility for their glibc 2.25+ releases. This was a basic Gentoo install. I'll try to post more information this week. (In reply to Anoop C S from comment #2) > Hi Dan, > > I couldn't reproduce the error mentioned in the bug description on a Fedora > 27 machine with glibc v2.26. Is that something specific to glibc v2.25? Or > am I missing something here?
This is definitely still an issue and I'm currently seeing it with glibc 2.26 on Gentoo. The reason it affects Gentoo specifically is because it stopped implicitly including sysmacros.h via types.h, which glibc plans to do later. It's pure luck that the current include order does not affect other distributions like Fedora.
REVIEW: https://review.gluster.org/22886 (Compat: fix an Pragma poisoning error) posted (#1) for review on master by Amar Tumballi
REVIEW: https://review.gluster.org/22886 (compat.h: fix a \#pragma poisoning error) merged (#4) on master by Amar Tumballi