You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
configure doesn't find "major()" on HP-UX v11.31 #55311
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).
Attaching a patch I've made for fixing the problem in HP-UX, simply by #including sys/types.h on the configure test..
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).
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.
loewis commented on Feb 2, 2011
loewismannequin
Mannequin
More actions
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.
OrenHeld commented on Feb 4, 2011
OrenHeldmannequin
MannequinAuthor
More actions
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)
OrenHeld commented on Jun 14, 2011
OrenHeldmannequin
MannequinAuthor
More actions
Any tip on how to make this patch get committed? :)
Activity
OrenHeld commentedon Feb 2, 2011
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.
OrenHeld commentedon Feb 2, 2011
Attaching a patch I've made for fixing the problem in HP-UX, simply by #including sys/types.h on the configure test..
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).
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.
loewis commentedon Feb 2, 2011
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.
OrenHeld commentedon Feb 4, 2011
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)
OrenHeld commentedon Jun 14, 2011
Any tip on how to make this patch get committed? :)
bitdancer commentedon Jun 15, 2011
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.