Bug 1494654

Summary: Failure to compile glusterfs with glibc 2.25, exempt sys/sysmacro.h from pragma poisoning.
Product: [Community] GlusterFS Reporter: Dan <dan>
Component: buildAssignee: Niels de Vos <ndevos>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: anoopcs, bugs, chewi, dan, kkeithle, ndevos
Target Milestone: ---Keywords: Patch, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-25 05:00:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
pragma_exempt.patch none

Description Dan 2017-09-22 18:23:16 UTC
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.

Comment 1 Dan 2017-09-22 18:24:02 UTC
Created attachment 1329697 [details]
pragma_exempt.patch

Comment 2 Anoop C S 2017-11-29 08:35:00 UTC
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?

Comment 3 Dan 2018-01-01 17:38:13 UTC
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?

Comment 4 James Le Cuirot 2018-02-13 16:09:07 UTC
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.

Comment 5 Worker Ant 2019-06-18 04:21:09 UTC
REVIEW: https://review.gluster.org/22886 (Compat: fix an Pragma poisoning error) posted (#1) for review on master by Amar Tumballi

Comment 6 Worker Ant 2019-06-25 05:00:46 UTC
REVIEW: https://review.gluster.org/22886 (compat.h: fix a \#pragma poisoning error) merged (#4) on master by Amar Tumballi