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: Multiprocessing module fails to build on Solaris 11.3
Type: compile error Stage: resolved
Components: Extension Modules Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: clallen, iritkatriel, spackard
Priority: normal Keywords: patch

Created on 2018-07-10 07:54 by clallen, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Python-2.7.15-Modules_multiprocessing_h.patch clallen, 2018-07-10 07:58 GNU diff patch for Modules/_multiprocessing/multiprocessing.h
solaris_gcc_mutiprocessing.diff spackard, 2018-10-09 16:07 GNU diff path for Modules/_multiprocessing/multiprocessing.h
Messages (5)
msg321364 - (view) Author: Clint Allen (clallen) * Date: 2018-07-10 07:54
The build of this module fails with this error:


In file included from /usr/include/limits.h:12:0,
                 from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/limits.h:168,
                 from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/syslimits.h:7,
                 from /usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/limits.h:34,
                 from Include/Python.h:19,
                 from /opt/apps/salt-build/Python-2.7.15/Modules/_multiprocessing/multiprocessing.h:12,
                 from /opt/apps/salt-build/Python-2.7.15/Modules/_multiprocessing/multiprocessing.c:9:
/usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/include-fixed/sys/feature_tests.h:363:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications        and pre-2001 POSIX applications"


Changing the value of _XOPEN_SOURCE from 500 to 600 in Modules/_multiprocessing/multiprocessing.h fixes it.
msg327425 - (view) Author: Steven Packard (spackard) Date: 2018-10-09 16:07
I don't think you can blindly change that value of that definition. It will likely break the compilation of the module using Solaris Sun Studio while fixing compilation with gcc. The attached patch should do the correct thing in the presence of either toolchain.
msg331440 - (view) Author: Clint Allen (clallen) * Date: 2018-12-09 16:47
Agreed, that is a better approach.
I have tested your patch successfully with gcc on Solaris 11.3.
msg382156 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-11-30 14:47
_XOPEN_SOURCE is no longer defined in multiprocessing.h. Is there anything left to do here or can we close it as out of date?
msg382215 - (view) Author: Clint Allen (clallen) * Date: 2020-12-01 05:26
I don't see anything further needed with this issue.  Closing it is fine with me.
History
Date User Action Args
2022-04-11 14:59:02adminsetgithub: 78260
2020-12-01 06:26:29iritkatrielsetstatus: open -> closed
resolution: out of date
stage: resolved
2020-12-01 05:26:09clallensetstatus: pending -> open

messages: + msg382215
2020-11-30 14:47:29iritkatrielsetstatus: open -> pending
nosy: + iritkatriel
messages: + msg382156

2018-12-09 16:47:16clallensetmessages: + msg331440
2018-10-09 16:07:39spackardsetfiles: + solaris_gcc_mutiprocessing.diff
nosy: + spackard
messages: + msg327425

2018-07-10 07:58:07clallensetfiles: + Python-2.7.15-Modules_multiprocessing_h.patch
keywords: + patch
2018-07-10 07:54:31clallencreate