Repository navigation
configure doesn't find "major()" on HP-UX v11.31 #55311
Description
Activity
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.
- addedbuildThe build process and cross-buildThe build process and cross-build
on 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.
-
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.
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)
Any tip on how to make this patch get committed? :)
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.
- addedbuildThe build process and cross-buildThe build process and cross-build
on Jun 15, 2011
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: