Skip to content

configure doesn't find "major()" on HP-UX v11.31 #55311

Description

@OrenHeld
mannequin
BPO 11102
Nosy @loewis, @ZackerySpytz, @michael-o
PRs
  • bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX #19856
  • Files
  • config.log
  • python-configure-hpux-major-fix.patch: Fixes the problem on HPUX. I'm really not sure if it's good for other platforms!
  • 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:

    assignee = None
    closed_at = None
    created_at = <Date 2011-02-02.20:05:29.971>
    labels = ['build', '3.9']
    title = 'configure doesn\'t find "major()" on HP-UX v11.31'
    updated_at = <Date 2020-06-18.09:13:10.934>
    user = 'https://bugs.python.org/OrenHeld'

    bugs.python.org fields:

    activity = <Date 2020-06-18.09:13:10.934>
    actor = 'michael-o'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Build']
    creation = <Date 2011-02-02.20:05:29.971>
    creator = 'Oren_Held'
    dependencies = []
    files = ['20652', '20653']
    hgrepos = []
    issue_num = 11102
    keywords = ['patch']
    message_count = 6.0
    messages = ['127757', '127758', '127760', '127935', '138314', '138385']
    nosy_count = 4.0
    nosy_names = ['loewis', 'Oren_Held', 'ZackerySpytz', 'michael-o']
    pr_nums = ['19856']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue11102'
    versions = ['Python 3.9']

    Activity

    1. OrenHeld commented on Feb 2, 2011

      OrenHeldmannequin
      MannequinAuthor

      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.

    2. added
      buildThe build process and cross-build
      on Feb 2, 2011
    3. OrenHeld commented on Feb 2, 2011

      OrenHeldmannequin
      MannequinAuthor

      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.

    4. loewis commented on Feb 2, 2011

      loewismannequin
      Mannequin

      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.

    5. OrenHeld commented on Feb 4, 2011

      OrenHeldmannequin
      MannequinAuthor

      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)

    6. OrenHeld commented on Jun 14, 2011

      OrenHeldmannequin
      MannequinAuthor

      Any tip on how to make this patch get committed? :)

    7. bitdancer commented on Jun 15, 2011

      @bitdancer
      Member

      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.

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9 (EOL)end of lifebuildThe build process and cross-build

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions