Bug 1494654 - Failure to compile glusterfs with glibc 2.25, exempt sys/sysmacro.h from pragma poisoning.
Summary: Failure to compile glusterfs with glibc 2.25, exempt sys/sysmacro.h from prag...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: build
Version: mainline
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-22 18:23 UTC by Dan
Modified: 2019-06-25 05:00 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-06-25 05:00:46 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
pragma_exempt.patch (440 bytes, text/plain)
2017-09-22 18:24 UTC, Dan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 22886 0 None Merged compat.h: fix a \#pragma poisoning error 2019-06-25 05:00:44 UTC

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


Note You need to log in before you can comment on or make changes to this bug.