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.

Title: configure doesn't find "major()" on HP-UX v11.31
Type: compile error Stage: patch review
Components: Build Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Oren_Held, ZackerySpytz, loewis, michael-o
Priority: normal Keywords: patch

Created on 2011-02-02 20:05 by Oren_Held, last changed 2022-04-11 14:57 by admin.

File name Uploaded Description Edit
config.log Oren_Held, 2011-02-02 20:05
python-configure-hpux-major-fix.patch Oren_Held, 2011-02-02 20:28 Fixes the problem on HPUX. I'm really not sure if it's good for other platforms! review
Pull Requests
URL Status Linked Edit
PR 19856 open ZackerySpytz, 2020-05-02 05:48
Messages (6)
msg127757 - (view) Author: Oren Held (Oren_Held) Date: 2011-02-02 20:05
The effect eventually is that on HP-UX v3 there are no os.major() and os.minor() functions.

I tried to dig deeper to find out what's wrong, and it seems that 'configure' script fails on 'major' check and thus disables the 'major' feature:

'configure' finds well that /usr/include/sys/sysmacros.h has makedev(), major(), minor() definitions (MAJOR_IN_SYSMACROS==1).

The problem is that including sys/sysmacros.h is not enough, it depends (but doesn't #include) sys/types.h for the definition of dev_t (needed by makedev() macro).

See attached config.log for configure's behavior.
msg127758 - (view) Author: Oren Held (Oren_Held) Date: 2011-02-02 20:28
Attaching a patch I've made for fixing the problem in HP-UX, simply by #including sys/types.h on the configure test..

1. I'm not sure it'll be good for all platforms; maybe we need more 'configure' magic here to make it #include <sys/types.h> on this configure test only when needed (e.g. HP-UX v3).

2. Once 'configure' decides to enable the "os.major" feature, 'make' simply compiles it well - I didn't have to fix things in Modules/posixmodule.c (apparently sys/types.h is already loaded). I'm not sure it's smart to count on it.
msg127760 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2011-02-02 21:01
AFAICT, including sys/types.h by default in the test should be fine. It's a standard header file (atleast for Posixish systems), so it should always be present, and including it shouldn't cause harm even if it's not needed.
msg127935 - (view) Author: Oren Held (Oren_Held) Date: 2011-02-04 20:09
Just a small note: after this patch applied, building Python 2.7.1 was successful on Linux (SLES 11, RHEL 5, Ubuntu 10.10), Solaris 10, and HP-UX 11 v3. (I didn't get to build Python on other platforms)
msg138314 - (view) Author: Oren Held (Oren_Held) Date: 2011-06-14 13:57
Any tip on how to make this patch get committed? :)
msg138385 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-06-15 16:22
Well, one way might be to set up and maintain an HP/UX buildbot :)

Other than that, just keep bugging us periodically until someone gets around to doing it.
Date User Action Args
2022-04-11 14:57:12adminsetgithub: 55311
2020-06-18 09:13:10michael-osetnosy: + michael-o
2020-05-02 05:55:06ZackerySpytzsetversions: + Python 3.9, - Python 2.7, Python 3.4, Python 3.5
2020-05-02 05:48:19ZackerySpytzsetnosy: + ZackerySpytz

pull_requests: + pull_request19172
stage: needs patch -> patch review
2014-09-27 16:25:50r.david.murraysetnosy: - r.david.murray
stage: commit review -> needs patch

versions: + Python 3.4, Python 3.5
2011-06-15 16:22:01r.david.murraysetnosy: + r.david.murray
messages: + msg138385

type: compile error
stage: commit review
2011-06-14 13:57:40Oren_Heldsetmessages: + msg138314
2011-02-04 20:09:47Oren_Heldsetmessages: + msg127935
2011-02-02 21:01:55loewissetnosy: + loewis
messages: + msg127760
2011-02-02 20:28:47Oren_Heldsetfiles: + python-configure-hpux-major-fix.patch

messages: + msg127758
keywords: + patch
2011-02-02 20:05:29Oren_Heldcreate