Title: MSYS build fails with `S_IXGRP' undeclared
Type: Stage: resolved
Components: Build Versions: Python 3.2
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Martin.Ellison, amaury.forgeotdarc, brian.curtin, loewis, mewalig, orefalo, rpetrov, vstinner, yurivict
Priority: normal Keywords: patch

Created on 2010-06-28 12:43 by Martin.Ellison, last changed 2019-10-22 23:11 by vstinner. This issue is now closed.

File name Uploaded Description Edit
unnamed Martin.Ellison, 2010-06-28 13:32
python-3.2.patch yurivict, 2011-06-11 17:14
Messages (9)
msg108823 - (view) Author: Martin Ellison (Martin.Ellison) Date: 2010-06-28 12:43
Python 2.6.5 build fails on MSYS with the following messages

martin@EDWARD /c/Downloads/Python-2.6.5
$ make
gcc -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -
I. -IInclude -I./Include   -DPy_BUILD_CORE -o Python/import.o Python/import.c
Python/import.c: In function `write_compiled_module':
Python/import.c:882: error: `S_IXGRP' undeclared (first use in this function)
Python/import.c:882: error: (Each undeclared identifier is reported only once
Python/import.c:882: error: for each function it appears in.)
Python/import.c:882: error: `S_IXOTH' undeclared (first use in this function)
Python/import.c: In function `PyImport_ImportModuleNoBlock':
Python/import.c:2063: warning: unused variable `me'
make: *** [Python/import.o] Error 1
msg108827 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-06-28 13:00
I don't think MSYS (or mingw32) is supported at all.
I'm even surprised that the build went so far.
msg108830 - (view) Author: Martin Ellison (Martin.Ellison) Date: 2010-06-28 13:32
I thought Python ran everywhere. That's what the documentation says.


On 28 June 2010 21:00, Amaury Forgeot d'Arc <> wrote:

> Amaury Forgeot d'Arc <> added the comment:
> I don't think MSYS (or mingw32) is supported at all.
> I'm even surprised that the build went so far.
> ----------
> assignee:  -> loewis
> nosy: +amaury.forgeotdarc, loewis
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
msg108831 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-06-28 14:04
> I thought Python ran everywhere. That's what the documentation says.

Python does *run* on Windows (when compiled with Visual Studio or gcc via Cygwin), it just might not be setup to build with the MSYS compiler.
msg108863 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-06-28 20:51
Martin (Ellison): What people are trying to say is that likely, nobody will be working on this, and likely so for the next few years. So unless you volunteer to provide a patch, I recommend to close the issue as "won't fix". Unassigning myself.
msg138171 - (view) Author: Yuri (yurivict) Date: 2011-06-11 17:14
I fixed all build problems on the current MinGW32. python.exe builds ok, but build fails since python.exe can't find some modules after this. Not sure why.
msg144937 - (view) Author: Olivier Refalo (orefalo) Date: 2011-10-05 03:48
hum, your patch actually works on MSYS !

ok.. so I am pretty much having the very some issue.

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can't find encoding
msg153890 - (view) Author: mewalig (mewalig) Date: 2012-02-21 18:26
If I am reading this right, then in the below part of the patch, slave_name does not get set before it is used if __MINGW32__ is not defined. this can be fixed by moving the "#endif" up to the line before
    slave_name = ptsname(master_fd); /* get name of slave */


+#if !defined(__MINGW32__)
     sig_saved = PyOS_setsig(SIGCHLD, SIG_DFL);
     /* change permission of slave */
     if (grantpt(master_fd) < 0) {
@@ -4143,10 +4156,15 @@
     slave_name = ptsname(master_fd); /* get name of slave */
     if (slave_name == NULL)
         return posix_error();
+#if !defined(__MINGW32__)
     slave_fd = open(slave_name, O_RDWR | O_NOCTTY); /* open slave */
+    slave_fd = open(slave_name, O_RDWR); /* open slave */
msg355175 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-10-22 23:11
No activity since 2012, I close the issue.
Date User Action Args
2019-10-22 23:11:39vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg355175

resolution: out of date
stage: resolved
2013-08-04 14:19:52rpetrovsetnosy: + rpetrov
2012-02-21 18:26:51mewaligsetnosy: + mewalig
messages: + msg153890
2011-10-05 03:48:01orefalosetnosy: + orefalo

messages: + msg144937
versions: + Python 3.2, - Python 2.6
2011-06-11 17:14:31yurivictsetfiles: + python-3.2.patch

nosy: + yurivict
messages: + msg138171

keywords: + patch
2010-06-28 20:51:34loewissetassignee: loewis ->
messages: + msg108863
2010-06-28 14:04:33brian.curtinsetnosy: + brian.curtin
messages: + msg108831
2010-06-28 13:32:21Martin.Ellisonsetfiles: + unnamed

messages: + msg108830
2010-06-28 13:00:55amaury.forgeotdarcsetassignee: loewis

messages: + msg108827
nosy: + amaury.forgeotdarc, loewis
2010-06-28 12:43:50Martin.Ellisoncreate