This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Possible redifinition of _POSIX_C_SOURCE in ./pyconfig.h
Type: compile error Stage: resolved
Components: Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, corona10, miss-islington, nanjekyejoannah, pablogsal
Priority: normal Keywords: patch

Created on 2019-07-31 14:14 by nanjekyejoannah, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 16733 merged pablogsal, 2019-10-12 18:32
PR 16734 merged miss-islington, 2019-10-12 19:14
PR 17076 merged miss-islington, 2019-11-07 04:59
PR 17077 merged benjamin.peterson, 2019-11-07 05:19
Messages (6)
msg348806 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) Date: 2019-07-31 14:14
While compiling Python, I got this warning.

./pyconfig.h:1590:0: warning: "_POSIX_C_SOURCE" redefined
 #define _POSIX_C_SOURCE 200809L

In file included from /usr/include/s390x-linux-gnu/bits/libc-header-start.h:33:0,
                 from /usr/include/string.h:26,
                 from /homes/jnanjeky/projects/cpython/Modules/expat/xmltok.c:34:
/usr/include/features.h:294:0: note: this is the location of the previous definition
 # define _POSIX_C_SOURCE 199506L

I think there is need to investigate this warning and potential remedy.
msg354528 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2019-10-12 10:29
This is also reproducible on Ubuntu 18.04 gcc 7.4.0

In file included from /home/corona10/cpython/Modules/expat/expat_config.h:8:0,
                 from /home/corona10/cpython/Modules/expat/xmltok.c:49:
./pyconfig.h:1586:0: warning: "_POSIX_C_SOURCE" redefined
 #define _POSIX_C_SOURCE 200809L

In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33:0,
                 from /usr/include/string.h:26,
                 from /home/corona10/cpython/Modules/expat/xmltok.c:34:
/usr/include/features.h:294:0: note: this is the location of the previous definition
 # define _POSIX_C_SOURCE 199506L
msg354548 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-10-12 19:14
New changeset 8177404d520e81f16324a900f093adf3856d33f8 by Pablo Galindo in branch 'master':
bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733)
https://github.com/python/cpython/commit/8177404d520e81f16324a900f093adf3856d33f8
msg354551 - (view) Author: miss-islington (miss-islington) Date: 2019-10-12 19:32
New changeset ba44ea6ff8be2b7874c4358f89d5b6f4a558f711 by Miss Islington (bot) in branch '3.8':
bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733)
https://github.com/python/cpython/commit/ba44ea6ff8be2b7874c4358f89d5b6f4a558f711
msg356167 - (view) Author: miss-islington (miss-islington) Date: 2019-11-07 05:10
New changeset 30114c7119a9ae0e610d6974f57f22d8d05ed50d by Miss Islington (bot) in branch '2.7':
bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733)
https://github.com/python/cpython/commit/30114c7119a9ae0e610d6974f57f22d8d05ed50d
msg356168 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2019-11-07 05:29
New changeset 089e5f52a34377193a9e6c03088114b14c8507af by Benjamin Peterson in branch '2.7':
bpo-37731: Squish another _POSIX_C_SOURCE redefinition problem in expat. (GH-17077)
https://github.com/python/cpython/commit/089e5f52a34377193a9e6c03088114b14c8507af
History
Date User Action Args
2022-04-11 14:59:18adminsetgithub: 81912
2019-11-07 05:29:52benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg356168
2019-11-07 05:19:16benjamin.petersonsetpull_requests: + pull_request16587
2019-11-07 05:10:14miss-islingtonsetmessages: + msg356167
2019-11-07 04:59:48miss-islingtonsetpull_requests: + pull_request16586
2019-10-12 19:33:48pablogsalsetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.8, Python 3.9
2019-10-12 19:32:53miss-islingtonsetnosy: + miss-islington
messages: + msg354551
2019-10-12 19:14:21miss-islingtonsetpull_requests: + pull_request16313
2019-10-12 19:14:14pablogsalsetnosy: + pablogsal
messages: + msg354548
2019-10-12 18:32:21pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request16312
2019-10-12 10:29:49corona10setnosy: + corona10
messages: + msg354528
2019-07-31 14:28:12nanjekyejoannahsettype: behavior -> compile error
2019-07-31 14:14:39nanjekyejoannahcreate